Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MVC

sjonnet
April 16, 2012

 MVC

sjonnet

April 16, 2012
Tweet

More Decks by sjonnet

Other Decks in Technology

Transcript

  1. Models Manage the behavior of the application data •Represent knowledge

    and data •Respond to changes of state •Isolated from views and controllers •Sometimes grouped (e.g collections / stores) Monday, April 16, 12
  2. Views •In most cases can be considered the UI •Typically

    render to a specific user interface element •Many frameworks rely on templating for this •Multiple views can exist for single models Render models into a form suitable for user interaction Monday, April 16, 12
  3. Controllers •Sits between models and views •(May) perform business logic

    and data manipulation •It’s role in client-side MVC heavily varies •Some replace it with a router, others use it as a logic handler Receive input and instruct models and views to respond accordingly Monday, April 16, 12
  4. Implementations • Backbone.js • Spine.js • JavaScriptMVC • AngularJS •

    SproutCore • YUILibrary Broke.js Fidel.js Sammy.js KnockoutJS (MVVM) ExtJS Monday, April 16, 12
  5. Popular •Backbone.js - light, mature, popular. •JavaScriptMVC - MVC, integrated

    dev tools •Spine.js - light, best option for CoffeeScript devs •SproutCore - 2.0 is also light, good docs Monday, April 16, 12