New Perspectives On Web Design

(C. Jardin) #1

CHAPTER 2 Writing Maintainable, Future-Friendly Code


Scalable JavaScript
An approach that I devised for a complete JavaScript application architec-
ture that scales and grows as your application does. The primary approach
is to separate an application into a series of small pieces, each with specific
responsibilities and constraints. The architecture can be built on top of any
JavaScript library and extended through the addition of plugins at each
level. There is no single JavaScript library for this approach, as it was pre-
sented as a high-level architectural design (though there are many imple-
mentations to be found online). See my slides and transcript on SlideShare^4
for more information.

ember.js
Ember.js^5 is a complete application framework that includes everything
you need to build a JavaScript application. It provides an MVC framework
plus routing capabilities. These are all mixed in with Handlebars^6 , a tem-
plating language. Ember.js is opinionated — there’s a way to do everything:
the Ember.js way. Doing so allows you to focus on building your applica-
tion rather than worrying about the design of the surrounding architec-
ture.

object-oriented CSS
OOCSS is an approach created by Nicole Sullivan to make CSS more main-
tainable. The general idea is to create small, reusable objects (a combination
of markup and CSS classes) that represent common patterns. With enough
of these small pieces, you can create an infinite number of pages that look
different even though they use the same underlying patterns.

4 http://smashed.by/js-architecture
5 http://emberjs.com
6 http://handlebarsjs.com
Free download pdf