Ember.js
Ember.js logo | |
Developer(s) | Yehuda Katz, Tom Dale and Ember.js contributors |
---|---|
Initial release | 2011 |
Stable release | 1.4.0
/ February 13, 2014 |
Repository | |
Written in | JavaScript |
Operating system | Cross-platform |
License | MIT License |
Website | emberjs |
Ember.js is an open-source client-side JavaScript web application framework based on the model-view-controller (MVC) software architectural pattern. It allows developers to create scalable single-page applications[1] by incorporating common idioms and best practices into a framework that provides a rich object model, declarative two-way data binding, computed properties, automatically-updating templates powered by Handlebars.js, and a router for managing application state.[2]
Basic Concepts
Routes
A Route object represents the state of the application and corresponds to a url.[3] Routes are defined in the application's Router object using the map method[4]
Models
Every route has an associated Model object, containing the data associated with the current state of the application.[5] While one can use JQuery to load JSON objects from a server and use those objects as models,[6] most applications use a model library such as Ember Data to handle this.
Controllers
Controllers are used to decorate models with display logic.[7] A controller typically inherits from ObjectController if the template is associated with a single model record, or an ArrayController if the template is associated with a list of records.[8]
Templates
Templates are written using Handlebars and are used to dynamically build the HTML used throughout the application.
Views
Views are used to add sophisticated handling of user events to templates or to add reusable behavior to a template.[9]
Components
Components are a specialized view for creating custom elements that can be easily reused in templates.[10]
Ember Data
Most Ember.js applications use Ember Data, a data persistence library that maps client-side models to server-side data, although it is also possible to use Ember.js without Ember Data.[11] By default, Ember Data can load and save records and their relationships without any configuration via a RESTful JSON API that follows certain conventions,[12] providing many of the facilities of an ORM, but it is also easily configurable and can work with any server through the use of adapters. Ember Data is currently in beta and its API should not be considered stable until version 1.0.[13]
History
In December 2011, the SproutCore 2.0 framework was renamed to Ember.js, to reduce confusion between the application framework and the widget library of SproutCore 1.0.[14][15] The framework was created by Yehuda Katz, a member of the jQuery, Ruby on Rails and SproutCore core teams. Like many of Katz's other projects, it advocates for convention over configuration.
For a full calendar of release dates, view the Ember Release Notes
References
- ^ Aghassipour, Alexander; Chacko, Shajith (30 Nov 2012). "Enterprise Apps Are Moving To Single-Page Design". TechCrunch.
- ^ Bango, Rey (14 Mar 2013). "Getting Into Ember.js". Nettuts+.
- ^ "Ember.js - Routing: Introduction". emberjs.com. Retrieved 21 Jan 2014.
- ^ "Ember.js - Routing: Defining your routes". emberjs.com. Retrieved 21 Jan 2014.
- ^ "Ember.js - Models: Introduction". emberjs.com. Retrieved 21 Jan 2014.
- ^ "Ember.js - Models: Introduction". emberjs.com. Retrieved 21 Jan 2014.
- ^ "Ember.js - Controllers: Introduction". emberjs.com. Retrieved 21 Jan 2014.
- ^ "Ember.js - Controllers: Representing Multiple Models With ArrayController". emberjs.com. Retrieved 21 Jan 2014.
- ^ "Ember.js - Views: Introduction". emberjs.com. Retrieved 21 Jan 2014.
- ^ "Ember.js - Components: Introduction". emberjs.com. Retrieved 21 Jan 2014.
- ^ "Ember without Ember Data". Evil Trout. Retrieved 2 Jan 2014.
- ^ "Ember.js Models". emberjs.com. Retrieved 4 Dec 2013.
- ^ "Ember Data README". Retrieved 4 Dec 2013.
- ^ "SproutCore 2.0 becomes Ember.js". The H. 13 Dec 2011.
- ^ "Amber.js (formerly SproutCore 2.0) is now Ember.js". yehudakatz.com. 12 Dec 2011.