Maciej Walusiak

Summarized using AI

Panel: Modern JS

Dawid Pośliński and Maciej Walusiak • April 16, 2018 • Wrocław, Poland

The panel discussion titled "Modern JS" features speakers Dawid Pośliński and Maciej Walusiak at the wroc_love.rb 2018 conference, focusing on the evolution and future of JavaScript development. The conversation starts with a provocative comparison of old libraries like jQuery and Prototype, suggesting that modern JavaScript no longer requires these tools due to advancements in browsers and features like query selectors. Key points discussed include:

  • Redundancy of Older Libraries: The speakers argue against the use of jQuery and Prototype, highlighting that eliminating them could potentially save build sizes significantly.

  • Emergence of CSS-in-JS: This approach has gained acceptance, resolving many maintainability issues associated with traditional CSS. It aligns well with component-based architectures, which developers increasingly prefer.

  • Trends in Modern JavaScript: CSS-in-JS, reactive programming (notably in frameworks like React and Ember), and conventions that streamline code maintenance are identified as persistently beneficial trends in JavaScript.

  • The Role of Node.js: While JavaScript is essential for front-end development, the speakers note that other languages, like Ruby on Rails, may be better suited for backend roles, reflecting the diversity in technology stacks needed for different tasks.

  • Future of JavaScript: The potential rise of WebAssembly and its implications for JavaScript applications are discussed, alongside recent TC39 proposals that could enhance language features. The speakers express curiosity about how these developments might shape the JavaScript landscape in the coming years.

  • Adaptation and Standards: The importance of standards such as JSON API and GraphQL for API design is emphasized, along with the necessity for developers to remain adaptable when choosing technologies.

  • Innovative Tools: The advantages of tools like Stimulus and TypeScript are acknowledged, marking them as promising for future JavaScript management.

In conclusion, the panel encourages developers to remain open-minded towards emerging technologies and standards, as being adaptive is key in the ever-evolving JavaScript ecosystem. The discussion reflects a deep understanding of both current trends and future potential in modern JavaScript development.

Panel: Modern JS
Dawid Pośliński and Maciej Walusiak • April 16, 2018 • Wrocław, Poland

wroclove.rb 2018

00:00:13.650 Maybe let's start with a serious question: jQuery or Prototype? Well, I would say none of them, because you don't have to use them anymore. Some toolsets might still use them under the hood, but due to changes in browsers, we have new features like query selectors and other rapid developments. We can get rid of this redundancy. For example, not using these libraries can save thirty-five kilobytes of code from our build size. So if we can have a lower build size, why should we bother with them?
00:01:04.799 As for the question of whether we should use jQuery or Prototype, I think we should use funny address—it’s the best, in my opinion. This leads us to the next question: which current trends in JavaScript have stood the test of time and which are likely to persist? One thing I believe is gaining traction in modern JavaScript is CSS-in-JS. Up until now, it was often described as a bad pattern, but recently, almost all modern libraries are using it.
00:01:46.100 CSS-in-JS resolves many problems we always had with CSS. For instance, it's much more maintainable when using a component-based architecture. If you remove a component or a leaf with a certain class, you previously had to search through all your CSS files for references to that class, which was always a hassle. This new approach improves maintainability and also reduces the size of your bundle, which is essential for your website.
00:02:42.049 These trends are becoming common, with tools that originated a few years ago still being widely used. In our case, frameworks that adopt the best practices from the Rails community can be extremely beneficial. For instance, there are frameworks that took cues from Rails, which is particularly relevant since this is a Ruby conference.
00:03:35.790 Another notable trend is reactive programming. From what I understand, it's popular in both React and Ember. This paradigm allows you to think of your virtual DOM as being based on your application’s state. You simply write the state and the actions, and it’s observable; thus, the virtual DOM reflects this state, updating automatically.
00:04:42.180 The advantage is that you don’t have to think about when or how to update certain components — this is handled for you based on your state. If we understand that the virtual DOM reflects this state, we can derive how it should look at any point in time without needing to think about it consciously. Both React and Ember implement this concept effectively, which is particularly useful, especially for those who may initially find JavaScript challenging.
00:05:56.760 In a sense, the best code is no code because it implies you don’t have to maintain it or test that part of the code. Having conventions like the ones offered by these libraries significantly reduces the effort needed for updates in case of API changes. To put this in perspective, Radix seems to have the opposite approach: it often requires excessive code to parse data, which can lead to poor design, as people may feel compelled to write custom code when standard solutions already exist.
00:06:58.090 Following conventions works best in a development environment. Establishing a solid principle means you code less and get more done. This allows you to focus on business domains and improvements, which keeps your customers happy—it's a win-win situation.
00:07:53.400 Regarding the future of JavaScript development, do you think we might all exclusively become JavaScript developers in two years? I think there’s a distinction to make here. If we consider the backend, Node.js is not the primary option in many companies. Many tasks are better suited to other languages, like Ruby on Rails, which excels in quick prototyping and development. If extensive performance is needed, developers may opt for languages that offer better speed.
00:09:18.330 Node.js does face a lot of competition as a backend solution. However, regarding front-end development, JavaScript will definitely be essential for at least the next few years. I'm also intrigued by web assembly and its potential for JavaScript applications, although I'm uncertain if that transition will occur next year. If web assembly integrates garbage collection and supports hosting objects from various languages, it could indeed simplify the development of isomorphic applications.
00:10:25.510 The question of whether JavaScript will maintain its relevance is complicated, primarily due to its tight integration with the Document Object Model. Although some argue that JavaScript is dying and can be replaced by better languages, the reality is that JavaScript is strongly tied to how we interact with webpages, which suggests that it may endure for a long time. Exploring new frameworks and concepts is essential.
00:11:56.000 In the next year, developers may find excitement in recent TC39 proposals, including the pipeline operator and class modifiers. These features are currently in various stages of development, and Babel is actively supporting their implementation. Additionally, reactive programming is expected to gain significant traction, and progressive web applications (PWAs) are increasingly being developed, which suggests a shift towards offline applications.
00:13:42.830 Microsoft’s investment in PWAs hints at a future where they push heavily for TypeScript and other JavaScript frameworks as part of their development strategy. The ongoing discussions highlight just how rapidly things change, noting the potential of TypeScript to improve maintainability and productivity in JavaScript projects.
00:15:48.500 While the effectiveness of tools like Opal may be questioned, the potential for languages like Rust to be compiled to WebAssembly offers new possibilities. Companies like LinkedIn are reportedly exploring these methods to improve performance and reduce load times, which might also reshape our development paradigms.
00:16:55.330 As the conversation wraps up, it’s worth discussing the importance of standards in API design, with formats like JSON API and GraphQL gaining traction. From personal experience, sticking rigidly to any one standard isn’t always the best idea, especially if alternatives provide better utility for specific cases.
00:19:01.080 As we wrap up, I would encourage everyone to remain open-minded when selecting which technologies to adopt. Standards facilitate onboarding new team members and reduce the need for excessive documentation, thus enhancing collaboration. Even though choosing a path may seem daunting, the key is to stay adaptive.
00:20:02.760 Lastly, what are your thoughts on using Stimulus and TypeScript? Both have unique advantages in improving the development process. While not everyone has explored them yet, they are promising tools that provide distinct advantages in managing JavaScript projects.
00:22:33.650 Thank you, everyone, for your questions and participation in this panel. It has been an enlightening discussion.
Explore all talks recorded at wroclove.rb 2018
+13