The emergence of reactive programming in JavaScript was inevitable. Applications became more sophisticated and more complicated and developers looked to other languages to alleviate the stress.
Early jQuery-augmented apps ended up in a mess of code and it was difficult to keep track of what code altered what part of a web page. The MVC pattern made its way to JavaScript, providing more structure and clarity, but it wasn't enough. Surely there was something else out there that could help with the complexity of modern apps.
On one hand, reactive programming techniques do make life easier. Instead of worrying about bi-directional data flow and trying to determine what updated what, reactive data flows in one direction. Developers will say this makes their code "easier to reason about". I can say first hand that there's truth to this. But that's not the whole story.
Reactive programming can also introduce its own cognitive loads. Am I dealing with hot or cold observables? Which collection of Rx operators can I use to accomplish what I need in the most efficient manner? Like many situations in computer programming, it gets easier with experience, but adopting reactive JavaScript should be intentional. Just because you can doesn't mean you should.
This eMag is meant to give an easy-going, yet varied introduction to reactive programming with JavaScript. Modern web frameworks such as Angular, React, and Vue have embraced reactive programming in different ways, not to mention the myriad framework and library options. The rise in immutability and functional reactive programming have added to the discussion and it's important for modern JavaScript developers to have an idea of what's going on, even if they're not using it themselves. It's equally important to know why you're using something, as it is to know why you're not using something.
Free download
Reactive JavaScript eMag includes:
- The SAM Pattern: Lessons Learned Building Functional Reactive Front-End Architectures - Modern User Experience requires an architecture that is able to continuously "react" not just to user inputs, but also to its broader environment. In this article, Jean-Jacques Dubray and Gunar C. Gessner talk about the lessons learned implementing the SAM pattern with different frameworks and libraries.
- Language-Level Reactivity with Elm - Reactive programming is becoming more prevalent in the JavaScript programming world. But, it's always added on as an afterthought or a library. But what if it could exist by default, inherent to the language? Richard Feldman shows how the Elm language is just that. Elm doesn't just try to make JavaScript better, it tries to rewrite the developer experience and make it inherently better.
- Virtual Panel: State of Reactive in JavaScript and Elm - Reactive programming in JavaScript and the web has fairly mature libraries, yet there is much more work to do before it becomes ubiquitous. In this virtual panel, we speak with Tylor Steinberger, Brian Hicks and Brian Cavalier - three experts that work with reactive technologies about where we're at and where we're headed.
- Seven Operators to Get Started with RxJS - If you're just getting started with Reactive JavaScript and RxJS, the list of available operators can be overwhelming. If you're just getting started, which ones do you actually need? In this article, Vinvent Tunru introduces seven operators along with examples that will help you get a feel for when each of these operators could come in handy.
- Q&A with Paul Daniels and Luis Atencio on RxJS in Action - RxJS In Action provides a solid introduction to RxJS and lays out what the future of reactive JavaScript programming looks like. In this Q&A session, authors Paul Daniels and Luis Atencio talk more about RxJS, where it fits into the JavaScript landscape and how it affects JavaScript developers.
InfoQ eMags are professionally designed, downloadable collections of popular InfoQ content - articles, interviews, presentations, and research - covering the latest software development technologies, trends, and topics.