March 01, 2016
From, with love.

Walled Garden Frameworks

Hi everyone,

I was recently listening to a podcast that described the process of creating a pencil. Did you know that there is basically no way to make a modern pencil by yourself? The pieces come from different countries and only come together to make the actual pencil at the very last stage. If you were dropped in the middle of a forest, away from civilization, you wouldn't be able to get close to creating a pencil. Think about that the next time someone asks you to write something down.

In many ways, the story of the pencil reminds me of what's going on today with JavaScript architecture. The trend has been to move away from "walled garden" frameworks like Ember and Angular in favor of micro-libraries that are added together to create the architecture you need. YUI was the first big walled garden to close up shop, saying that they would rather focus on building great micro-libraries. (That was sad to me, as I spent a lot of time working on and with YUI.) Does that mean walled gardens have no place in today's JavaScript architecture?

With micro-libraries, you do get a lot of control, so you can pick and choose different pieces suited specifically to your needs. That control, however, comes with a cost. First, there's a big upfront cost of evaluating each of the pieces. Then, you need to find or create the "glue" that allows these pieces to work together. And last, you have to train your developers to understand this framework you've cobbled together from a variety of sources. Going forward, you'll need to keep up with upgrades to each and risk that those pieces, or your glue, won't quite work with future changes. In short, you're stopping to create a pencil before writing down your shopping list. There's a big upfront cost before you can get to the job you actually want to do (building a product or writing down your shopping list).

Frameworks like Ember and Angular are great for people who don't have the time or expertise to create their own architecture from micro-libraries. You can get up and running quickly, knowing that all the pieces you're going to use are designed to work together. Instead of creating your own documentation for how to develop, you can refer to the documentation provided by the framework itself. The walled garden framework is the pencil you buy for a few cents so you can start writing immediately. The upfront cost is small, so you can get started faster.

So yes, walled garden frameworks still make a lot of sense for a large number of developers. In fact, I'd recommend that anyone starting a new company should strongly consider using Ember or Angular for their first version. You'll spend a lot more time getting the work done that matters and a lot less time creating a pencil.

Be well.


P.S. Many people said they really liked the recommended book section and were sad to see it go. So, I'm going to rotate between recommended books and reader questions going forward. As always, thanks for the feedback!
JavaScript WeeklySponsor: The O'Reilly Fluent Conference
Subscribers get Fluent Exhibit Hall Plus pass for free with code EXPO.

Recommended Links

Preload: What Is It Good For? (article)
One of the ongoing challenges in web development is controlling when resources are downloaded and when they should be applied to the page. This article looks into the new <link rel="preload"> specification and shows how this might, finally, solve this problem for good. 

Canceled as the Third State (article)
ES6 promises currently have two states: fulfilled and rejected. In the search for a way to cancel promises, this proposal contends that cancelled should be a third state that can be triggered on a promise before it is resolved. This state would not be equivalent to a rejection (which is an unexpected result) and would rather represents an entirely new state that responds in a different manner. 

Adding Promise Support to Core (article)
Node.js has long been built on APIs using callbacks. With the inclusion of promises in ES6, there is an effort underway to see how promise support can be added to the core Node.js APIs. This article details some of the history and current state of the discussions, as well as the most likely path forward and the remaining open issues. A great read that shows how thoughtful you must be when making large changes to a popular project.

Recommended Book

We tend to think that we are logical, but upon deeper inspection, people tend to make the same logic errors repeatedly. Predictably Irrational explores these logic errors and seeks not to explain why they happen but rather when they happen (because we're still not sure why). For instance, why do we behave so differently when something is free vs. when it costs one cent? The incremental cost is incredibly low, yet this one cent difference causes a dramatic change in behavior. After reading this book, you'll think more deeply about how you're making everyday decisions and whether others are trapped in a situation that forced them to make an irrational decision.

Recently on NCZOnline

Reflections on ESLint's success
It's hard for me to believe, but I first conceived and created ESLint[1] in June 2013 and first announced it's availability in July 2013[2]. As frequent readers might recall, the primary goal of ESLint was to create a linter with rules that could be loaded at runtime. I had seen some problems in our JavaScript...

React and the economics of dynamic web interfaces
I've been doing web development since 2000, and in that time I've seen eras marked by libraries and frameworks come and go. The Ajax era began around the same time as the jQuery era began, the Backbone era began several years later, and the React era really began about two years ago. Each of these...

Why I'm not using your open source project
When you think of open source software, you might think of a few specific projects depending on your area of interest. If you work on web applications, the term "open source" might conjure up visions of Apache or Node.js; if you're into big data, then perhaps Hadoop comes to mind; if you care a lot...


Love this newsletter? Hate it? Have suggestions for how to make it better? When you subscribe to the newsletter, you can just reply to send in feedback.

Ready to subscribe?

Join 2,000 others and subscribe to get the newsletter delivered to your inbox every other Tuesday. 
If you enjoy this newsletter and would like to support my work (including the newsletter, my blog, my books, and ESLint), please consider becoming a patron. I provide a lot of free content and your support allows me to spend more time doing so, and there are great rewards for patrons.
Copyright © 2016 Nicholas C. Zakas, All rights reserved.

unsubscribe from this list    update subscription preferences