Jump to content

Ember.js

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Vine77 (talk | contribs) at 23:12, 15 February 2014 (Update infobox with 1.4.0 release). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Ember.js
Developer(s)Yehuda Katz, Tom Dale and Ember.js contributors
Initial release2011 (2011)
Stable release
1.4.0 / February 13, 2014; 10 years ago (2014-02-13)
Repository
Written inJavaScript
Operating systemCross-platform
LicenseMIT License
Websiteemberjs.com

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

  1. ^ Aghassipour, Alexander; Chacko, Shajith (30 Nov 2012). "Enterprise Apps Are Moving To Single-Page Design". TechCrunch.
  2. ^ Bango, Rey (14 Mar 2013). "Getting Into Ember.js". Nettuts+.
  3. ^ "Ember.js - Routing: Introduction". emberjs.com. Retrieved 21 Jan 2014.
  4. ^ "Ember.js - Routing: Defining your routes". emberjs.com. Retrieved 21 Jan 2014.
  5. ^ "Ember.js - Models: Introduction". emberjs.com. Retrieved 21 Jan 2014.
  6. ^ "Ember.js - Models: Introduction". emberjs.com. Retrieved 21 Jan 2014.
  7. ^ "Ember.js - Controllers: Introduction". emberjs.com. Retrieved 21 Jan 2014.
  8. ^ "Ember.js - Controllers: Representing Multiple Models With ArrayController". emberjs.com. Retrieved 21 Jan 2014.
  9. ^ "Ember.js - Views: Introduction". emberjs.com. Retrieved 21 Jan 2014.
  10. ^ "Ember.js - Components: Introduction". emberjs.com. Retrieved 21 Jan 2014.
  11. ^ "Ember without Ember Data". Evil Trout. Retrieved 2 Jan 2014.
  12. ^ "Ember.js Models". emberjs.com. Retrieved 4 Dec 2013.
  13. ^ "Ember Data README". Retrieved 4 Dec 2013.
  14. ^ "SproutCore 2.0 becomes Ember.js". The H. 13 Dec 2011.
  15. ^ "Amber.js (formerly SproutCore 2.0) is now Ember.js". yehudakatz.com. 12 Dec 2011.