Navigation

Home
Search
Submit A Resource
Contact Us
About Functionn

Subscription Options


Subscribe By Email (265+)


Lists


Archives

Nov 3, 2012

Author: Hirvesh Posted At: 11/03/2012 Tags: , , , , , , , , , , , ,

Chaplin - An Application Architecture Using Backbone.js

Share:

Chaplin is an architecture for JavaScript applications using the Backbone.js library. The code is derived from moviepilot.com, a large single-page application. 

While developing several web applications using Backbone.js,  Chaplin Developers felt the need for conventions on how to structure such applications. While Backbone is fine at what it’s doing, it’s not a framework for single-page applications. Yet it’s often used for this purpose.

Chaplin is mostly derived and generalized from the codebase of moviepilot.com, a real-world single-page application. Chaplin tries to draw the attention to top-level application architecture. “Application” means everything above simple routing, individual models, views and their binding.

Backbone is an easy starting point, but provides only basic, low-level patterns. Especially, Backbone provides little to structure an actual application. For example, the famous “Todo list example” is not an application in the strict sense nor does it teach best practices how to structure Backbone code.

To be fair, Backbone doesn’t intend to be an all-round framework so it wouldn’t be appropriate to blame Backbone for this deliberate limitations. Nonetheless, most Backbone use cases clearly need a sophisticated application architecture. This is where Chaplin enters the stage.


Features

  • CoffeeScript class hierarchies as well as object composition
  • Module encapsulation and lazy-loading using AMD modules
  • Cross-module communication using the Mediator and Publish/Subscribe patterns
  • Controllers for managing individual UI views
  • Rails-style routes which map URLs to controller actions
  • A route dispatcher and a top-level view manager
  • Extended model, view and collection classes to avoid repetition and enforce conventions
  • Strict memory management and object disposal
  • A collection view for easy and intelligent list rendering

Requirements: Backbone.js
Demo: https://github.com/chaplinjs/chaplin
License: MIT License

Daily Posts, Be Updated, Subscribe:

Want Free Web Resources? Enter Your Email And We'll Send It To You - Daily! (265+ Subscribers)

Yup, it's that straight forward! Enter your email address below and we'll send you the latest web resources to your inbox, everyday. We don't do spam. Ever.

Trending Posts On Functionn This Week

Share:

Other Interesting Resources:

0 comments:

Post a Comment

 


Recent Posts

Popular Categories



Popular Components



Popular Licenses