30725 Slices
Medium 9781491932933

16. Final Thoughts

Jason Strimpel O'Reilly Media ePub

Charlie Robbins

I do not know what I may appear to the world, but to myself I seem to have been only like a boy playing on the sea-shore, and diverting myself in now and then finding a smoother pebble or a prettier shell than ordinary, whilst the great ocean of truth lay all undiscovered before me.

Isaac Newton

In October 2009, I had never written JavaScript professionally. In fact, I had barely spent more than a few hours playing with the language. At the time I was writing frontend trading systems and other bank software in WPF (Windows Presentation Foundation), a technology I had been involved with at Microsoft. If you had told me that “isomorphic JavaScript” would become this widespread a concept before my original writing on the topic, I surely would have laughed. I want to highlight these facts to remind you that you really don’t know what is possible until you try.

Isomorphic JavaScript was not the main topic of my original blog post on the subject, “Scaling Isomorphic Javascript Code.” The term was just a footnote to contextualize and justify what I thought was a much more impactful software design pattern at the time. The way that developers have adopted the term and abstract concept far more than any concrete software design pattern is fascinating.

See All Chapters
Medium 9781491932933

15. “Colony” Case Study: Isomorphic Apps Without Node

Jason Strimpel O'Reilly Media ePub

Patrick Kunka, Richard Davis, and Andrew Barker

Colony is a global film-streaming platform connecting content owners with passionate fans through exclusive extra content. In a landscape of significant competition, our go-to-market strategy relies heavily on a world-class product and user experience, with ambitions to redefine the way film is consumed online.

An important differentiation between Colony’s video-on-demand model and that of competitors like Netflix is our transactional business model: content on our platform is open to the public to browse and purchase on a pay-as-you-go basis, and isn’t hidden behind a subscription paywall. We benefit from letting Google crawl and index our entire catalogue as a result. On top of this, the nature of our product requires a dynamic user interface that must frequently update to reflect changes to a complex application state. For example, elements must update to reflect whether the user is signed in or not, and whether the content bundle (or parts of it) is owned or at a certain point in its rental period. While our initial prototype was built using out-of-the-box ASP.NET MVC, we soon realized that turning our frontend into a single-page app would vastly improve our ability to deal with these challenges, while also enabling our backend and frontend teams to work independently of one another by “decoupling” the stack.

See All Chapters
Medium 9781491932933

14. Brisket

Jason Strimpel O'Reilly Media ePub

Wayne Warner

Brisket is an isomorphic JavaScript framework built on top of Backbone.js. Brisket was developed by my team, the Consumer Web team at Bloomberg LP. It was published in Bloomberg’s organization on GitHub on October 2, 2014 under the Apache 2 open source license.

My team engineered Brisket with three guiding principles:

Before diving deeper into Brisket, why did we build it?

Like most frameworks, Brisket was born out of a product need. In late 2013, my team was tasked with relaunching Bloomberg.com’s opinion section as a new digital media product, BloombergView.com. The product team and designers had ambitious goals for the new site:

We had 4 engineers and 3 months (12 weeks).

At the time, my team had only built traditional sites—server-side rendered pages with a mashup of client-side (in the browser) code to handle interactivity. A good example of a traditional website is IGN.com. We used Ruby on Rails for our server-side rendering, and a combination of jQuery, some Backbone.js, and vanilla JavaScript for our client-side code. We built only traditional sites because they are great for quickly rendering pages on the server and provide strong SEO.

See All Chapters
Medium 9781491932933

12. Isomorphic React.js at WalmartLabs

Jason Strimpel O'Reilly Media ePub

Jason Strimpel and Maxime Najim

We are going through an application architecture metamorphosis at WalmartLabs. We are just now slowly beginning to emerge from our warm, secure Java cocoon and have started to spread our beautiful isomorphic JavaScript wings. It is this transition that we will be sharing in this chapter.

Walmart has undergone many changes since early 2013. This is because executive leadership set the wheels in motion years ago to make the digital and physical experience seamless for Walmart customers. A large part of this has been an investment in technology and infrastructure. It has been an evolutionary process. Some technologies and projects have thrived and others have become extinct. So it goes. Extinctions have occurred for a variety of reasons, but we learn from each and move forward. One of the latest and most germane to this book is the gradual extinction of Java and Backbone + Handlebars in the UI layer in Walmart.com. In the world of software nothing really dies unless the business or a particular initiative dies. The same problem is just solved in a different (and hopefully better) way using other technologies (Figure 12-1).

See All Chapters
Medium 9781491932933

11. Closing Thoughts

Jason Strimpel O'Reilly Media ePub

Jason Strimpel

We covered a lot of material in Part II, which provided a solid understanding of how isomorphic JavaScript applications work. Armed with this knowledge you can now evaluate and amend existing solutions, or create something entirely new to meet your specific needs. However, before you venture out into this brave new world, a bit of reflection on what we have covered will help you to be even better equipped to take the next steps into isomorphic development. We will begin this process with a quick review of what we built in Part II, why we built it, and its limitations.

Throughout Part II we progressively built an application core and a simple example that leveraged the core. While this was instrumental in learning the concepts, we don’t recommend using this core in a production application. The core was written solely for this book as a learning device. There are better production-ready libraries for handling common functionality like managing session history, such as history. history and other modules were intentionally not utilized in order to focus on learning the underlying concepts and native APIs as opposed to learning a library API. However, leveraging highly adopted and well-supported open source solutions is a good idea because these libraries will likely cover edge cases that we might not have accounted for in our code.

See All Chapters

See All Slices