Javascript Application Design Patterns, By Example

Javascript development is dominated by libraries libraries like Backbone, Spine, and of course jQuery (surprise!). However, it isn’t an issue of what library to use but rather how to use it.

Understanding how some frameworks provide scaffolding and architecture to a seemingly non-deterministic glob of javascript can be a key component in our arsenal of javascript tricks. Having this knowledge essentially unlocks the last door to creating truly great and immersive web applications by letting the developer logically separate concerns and dependencies.

Alternative patterns to modules

Modules are regularly used in MVC applications..but there are other patterns that can make building large apps easier too.￼Remember that jQuery generally plays a smaller role in larger-apps than most people might think. The 2nd.MD calendar and booking code, and the chat portal, could easily operate without jQuery.

Facade – high level interfaces to large bodies of code that hide MOST of the unerlying complexity

“When you put up a facade, you’re usually creating an outward appearance which conceals a different reality. Think of it as simplifying the API presented to other developers”

Essential Javascript Design Patterns

Simplifies usage through a limited, simpler API

Hides the inner-workings of the library, allows implementation to be less important

That is all for now! Remember that how you organize your code and architect your application can really simplify complex programs to an almost natural instinct. Hone your skills on these approaches and you will master techniques needed to really grow as a developer!