Modular JavaScript -- Transforming an Existing Codebase

Semmy Purewal (Netflix)
3:00pm–3:30pm Tuesday, 04/21/2015
Application architectures
Location: Salon 9
Average rating: ***..
(3.53, 15 ratings)
Slides:   1-PDF 


These days, most web developers know that modules are incredibly awesome, and that they solve a wide array of problems that plagued large-scale JavaScript development as little as three years ago. But what happens when you’re presented with an older codebase that was written without modules? How do you even start to leverage them in a global-variable oriented, monolithic application?

At Netflix, the JavaScript layer that supports our award-winning UI on most game consoles and consumer electronics devices was just such a project. In this case-study, I’ll talk about how our team gradually transformed our code from a naively concatenated monolith into an architected, shareable set of small modules over the course of a year.

In doing so, I’ll describe the difficulties we encountered, the tools that helped us, and some of the interesting solutions that emerged along the way. I’ll also share some common JavaScript module patterns along with their limitations and pitfalls, making this session useful to all modern JS developers.


Attendees will get the most out of this section if they know JavaScript at an intermediate lever, and have at least a passing familiarity with JavaScript modules.

Photo of Semmy Purewal

Semmy Purewal


Semmy Purewal spent about a decade teaching computer science and working as a freelance JavaScript consultant. During that time, he worked with a diverse group of clients that included startups, nonprofits, and research labs. These days, he primarily works as a software engineer in San Jose, CA.

Comments on this page are now closed.


Semmy Purewal
04/22/2015 9:59am PDT

Hi Krishna,

We just uploaded them! Let me know if you have problems.


Krishna Santhanam
04/22/2015 6:29am PDT

Hi Semmy:

Could you upload your slides for this presentation? Thanks!