Jump to content

Ember.js

From Wikipedia, the free encyclopedia
Ember.js
Original author(s)Yehuda Katz
Developer(s)Ember Core Team
Initial release8 December 2011;12 years ago(2011-12-08)
Stable release
5.11.0[1]Edit this on Wikidata / 19 August 2024;14 days ago(19 August 2024)
RepositoryEmber.js Repository
Written inJavaScript
Operating systemCross-platform
TypeJavaScript library
LicenseMIT License[2]
Websiteemberjs.com

Ember.jsis anopen-sourceJavaScriptweb frameworkthat utilizes a component-servicepattern.It is designed to allow developers to create scalablesingle-page web applicationsby incorporating commonidioms,best practices, and patterns from other single-page-app ecosystem patterns into the framework.[3]

Ember is used on many websites includingHashiCorp,DigitalOcean,Apple Music,Square, Inc.,Intercom,Discourse,Groupon,LinkedIn,Live Nation,Ghost,Nordstrom,andTwitch.[4][5][6]Although primarily considered a framework for the web, it is also possible to build desktop and mobile applications with Ember when utilizing ahybrid app pattern.[7][8][9]The most notable example of an Ember desktop application isApple Music,a feature of theiTunesdesktop application.[10]

The Ember trademark is owned by Tilde Inc.[11]

History

[edit]

In December 2011, theSproutCore2.0 framework was renamed to Ember.js, to reduce confusion between the application framework and the widget library ofSproutCore1.0.[12][13]The framework was created by Yehuda Katz, a member of thejQuery,Ruby on RailsandSproutCorecore teams.

Design

[edit]

According to the company, Ember was designed around four key ideas:

Web applications
Ember sets out to provide a solution to the client-side application problem.[citation needed]
More productivity
Ember is one component of a set of tools to provide a development stack. Ember CLI provides an application structure and build pipeline with an add-on.[14][15]
Stability
Ember aims to prioritize backward compatibility and allow it to be maintained while still evolving the framework.[16]
Future web standards
Ember was an adopter of standards around JavaScript and the web, including promises,web componentsand ES6 syntax.[17][18]Yehuda Katz, one of Ember's co-founders, is a member on TC39, which is the committee responsible for future versions of the JavaScript language.[19]

Like Ruby on Rails, Ember followsconvention over configuration(CoC), and thedon't repeat yourself(DRY) principle.[20]It has been described as a highly opinionated framework built to be very flexible.[21]

Concepts

[edit]

According to the company, Ember consists of five key concepts:[22]

Routes
In Ember, the state of an application is represented by a URL. Each URL has a corresponding "route object" that controls what is visible to the user.
Models
Every route has an associated model, containing the data associated with the current state of the application.[23]While one can use window.fetch to loadJSONobjects from a server and use those objects as models, most applications use a model library such as Ember Data to handle this.
Templates
Templates are used to build the application's HTML and are written with theHTMLBarstemplating language. (HTMLBars is a variation ofHandlebarsthat builds DOM elements rather than a String.)[24]
Components
A component is a custom HTML tag. Its behavior is implemented using JavaScript, and its appearance is defined using HTMLBars templates. Components "own" their data. They can also be nested and can communicate with their parent components through actions (events). Other component libraries, such as Polymer can also be used with Ember.[25]
Services
Services are just singleton objects to hold long-lived data such as user sessions.[26]
Ember also providesdependency injection,declarativeone-way data-flow, tracked properties, and automatically updatingtemplates.[27]

Ember software / Addons

[edit]

Ember.js is one component of a complete front-end stack built and supported by the Ember core team.

Ember CLI

[edit]

Ember-CLI aims to bring convention over configuration to build tools. A command line utility based onbroccoli,running the commandember new <app-name>generates a new Ember app with the default stack.[28]This provides:

  • Standard file and directory structure
  • Development server with live reload
  • Testing framework[29]
  • Dependencies managed vianpm.[30]
  • ES6/ES7+ syntax support (using Babel)
  • Asset management (including combining, minifying, and versioning)[31]

Other features include:

  • Blueprints, which are code generators for creating models, controllers, components, and so on that are needed in an application. Custom blueprints can also be created.[32]
  • Addons, which provide the ability to extend the features of Ember CLI,.[33]Addons are installed by typingember install <addon-name>.Around two thousand add-ons are currently available (as of 2018)[34]including add-ons forCoffeeScript,LESS,Sass,Compass andMocha.[35]

Ember Data

[edit]

Most Ember applications use Ember Data, a data-persistence library providing many of the facilities ofobject-relational mapping(ORM).[36]However it is also possible to use Ember without Ember Data.[37]

Ember Data maps client-side models to server-side data. It can then load and save records and their relationships without any configuration via aRESTfulJSONAPI that implements the JSON API specification,[38]provided certain conventions are followed.[39]However it is also configurable and can work with servers through the use of adapters and addons.[40]JSON API has server library implementations forPHP,Node.js,Ruby,Python,Go,.NETandJava.[41]Connecting to a Java-Spring-based server is also documented.[42]

The first stable version of Ember Data (labeled 1.13 to align with Ember itself) was released on June 18 June 2015.[43]

Ember Inspector

[edit]

The Ember Inspector is an extension currently available for theMozilla FirefoxandGoogle Chromeweb browsers for debugging Ember applications.[44][45]Features include the ability to see which templates, components, and views are currently rendered, see the properties of any Ember object with a UI that computes bindings and computed properties, and access one's application's objects from the console.[46]If Ember Data is used, one can also see the records loaded for each model.

  • The Object Inspector allows viewing and editing of the runtime contents of Ember Objects and Classes.
  • The View Tree visually displays the structure of the rendered Ember application.
  • The Routes tab allows one to determine and follow the router state and the URLs used to represent routes.
  • The Data tab shows the models in the application and the records loaded for each model.
  • The Info tab displays dependency versions.
  • The Deprecations tab allows for stack traces of deprecation warnings that do not trigger exceptions.
  • The Promises tab allows for the tracing of code through asynchronous operations.
  • The Container tab is used to check which objects have been loaded.
  • The Render Performance tab is for determining what is slowing down an Ember application.

Fastboot

[edit]

Fastboot is an Ember CLI add-on created by the Ember core team that gives Ember developers the ability to run their apps inNode.js.This feature allows end users to see HTML and CSS right away, with JavaScript downloading in the background and taking over once it has fully loaded.[47]

Liquid Fire

[edit]

Liquid Fire provides animation support for Ember applications.[48]Features include animated transitions between routes and between models within a single route. It provides a DSL for solidifying spatial route relationships, cleanly separated from view-layer implementation details. An example would be to animate a screen transition so that the new screen appears to slide in from one edge of the browser.[49]

Release process

[edit]

See the releases blog for the full list of releases and detailed changelog.

Release cycle

[edit]

Ember follows a six-week release cycle, inspired by the rapid release cycle ofGoogle Chrome.[50]

Starting with Ember 2.0, related projects supported by the core team have their releases coordinated, and share a version number with Ember itself.[51]

Upgrading and backward compatibility

[edit]

Ember follows thesemantic versioningconvention.[52]In particular, breaking changes are only introduced at significant version numbers, such as 1.0, 2.0, etc. While new features can be added at point releases (1.1, 1.2...), and features deprecated, no breaking changes to the public APIs are introduced. Tooling was also under development in 2015 to help streamline the upgrade process.[53]

In addition to this process, several steps were taken to mitigate issues around upgrading to the 2.0 release:

  • All major 2.0 features were introduced early and spread out over several releases to reduce many of the issues caused by upgrades.
  • Most features that were removed are still available through add-ons.

The process follows the core Ember principle of Stability without Stagnation and is in marked contrast to the upgrade plans of similar projects such asAngularJS.[54]

Future development

[edit]

Project status can be tracked via the core team meeting minutes.[55]However, major changes to Ember go through the Request For Comment process.[56]This gives the Ember community a chance to give feedback on new proposals. Notable RFCs include:

  • Engines. Engines allow multiple logical applications to be composed together into a single application from the user's perspective. Currently released as an experimental add-on.[57][58]
  • Release cycle improvements. Among other things, it proposes changes to Ember CLI to support "svelte builds", which will strip out deprecated and unused features.[59]
  • Outlet Focusing. Making Ember accessible by default. This RFC aims to improve the user experience for people using screen readers.[60]

Sponsorship

[edit]

Unlike other projects such asAngularJS(Google) andReact(Facebook) which have the backing of one main company, Ember.js has a variety of sponsors and backers. These include users of the framework such asYahoo!,LinkedInandBustle.[61][62]

References

[edit]
  1. ^"Release 5.11.0".19 August 2024.Retrieved22 August2024.
  2. ^"ember.js/LICENSE".GitHub.Retrieved27 April2017.
  3. ^Aghassipour, Alexander; Chacko, Shajith (30 Nov 2012)."Enterprise Apps Are Moving To Single-Page Design".TechCrunch.
  4. ^"Building With Ember.js at Groupon".TalentBuddy.Retrieved15 Oct2015.
  5. ^"Discourse-Built with Ember.js".GitHub.Retrieved15 Jul2015.
  6. ^"Intercom".
  7. ^"Ember-Write Once, Run Everywhere".GitHub.5 Jul 2015.
  8. ^"Build better desktop apps with Ember".SpeakerDeck.5 Jul 2015.
  9. ^"Wicked Good Ember 2015 talk - Build better desktop apps with Ember, video".5 Jul 2015.
  10. ^"Built with ember - Apple Music".BuiltWithEmber.Retrieved21 Jul2016.
  11. ^"Ember.js: Legal".emberjs.com.Retrieved2019-02-14.
  12. ^"SproutCore 2.0 becomes Ember.js".The H.13 Dec 2011.
  13. ^"Amber.js (formerly SproutCore 2.0) is now Ember.js".yehudakatz.com. 12 Dec 2011.
  14. ^"Ember CLI".Retrieved15 Dec2018.
  15. ^"Ember Addons".Retrieved15 Dec2018.
  16. ^Asay, Matt (4 November 2014)."Innovating Fast And Slow: EmberJS Insists," We Don't Need To Break The Web "".ReadWrite.Retrieved18 Jun2015.
  17. ^"JavaScript Promises".Mozilla.Retrieved18 Jun2015.
  18. ^"Web Components".WebComponents.Retrieved18 Jun2015.
  19. ^"TC39: Members".TC39Wiki.Retrieved18 Jun2015.
  20. ^"What we've learned from Ember.js after 2 months developing our new product".Solid.16 December 2014.Retrieved3 November2015.
  21. ^"Top Reasons Why Industry Experts Use Ember.js And How You Can Adopt It Yourself".TalentBuddy.Retrieved14 October2015.
  22. ^Frank Treacy."5 Essential Ember 2.0 Concepts You Must Understand".EmberIgniter.Archived fromthe originalon 27 July 2016.Retrieved31 August2015.
  23. ^"Ember.js - Models: Introduction".Emberjs.Retrieved21 Jan2014.
  24. ^Jackson, Robert."HTMLBars".GitHub.Retrieved18 February2015.
  25. ^"How To Add Polymer To Your Ember Project".ProgramWithErik.27 March 2015.Retrieved11 Aug2015.
  26. ^"Ember Services Tutorial".ProgramWithErik.26 July 2015.Retrieved27 July2015.
  27. ^Bango, Rey (14 Mar 2013)."Getting Into Ember.js".Nettuts+.
  28. ^"Ember CLI".Retrieved15 Dec2018.
  29. ^"Ember testing".Retrieved15 Dec2018.
  30. ^"Ember CLI-managing dependencies".Retrieved15 Dec2018.
  31. ^"Ember CLI asset compilation".Retrieved15 Dec2018.
  32. ^"Ember CLI Blueprints".Retrieved15 Dec2018.
  33. ^"Ember CLI Writing Addons".Retrieved15 Dec2018.
  34. ^"Ember Addons directory".emberobserver.com.Retrieved15 Dec2018.
  35. ^"Ember CLI Overview".Retrieved15 Dec2018.
  36. ^"Ember Data README".GitHub.Retrieved4 Dec2013.
  37. ^"Ember without Ember Data".Evil Trout. 23 March 2013.Retrieved2 Jan2014.
  38. ^"JSON API specification".Retrieved16 Jun2015.
  39. ^"Ember.js Models".Emberjs.Retrieved26 Jun2015.
  40. ^"Ember Observer-Data".EmberObserver.Retrieved16 Jun2015.
  41. ^"JSON API implementations".JSON API.Retrieved26 Jun2015.
  42. ^"Integrating Ember.js with the Spring Framework".SpringEmber.20 August 2014.Retrieved26 Jun2015.
  43. ^"Ember Data 1.13 release".18 June 2015.Retrieved18 Jun2015.
  44. ^"Firefox Addons - Ember Inspector".Mozilla.Retrieved5 August2015.
  45. ^"Chrome Web Store - Ember Inspector".Chrome Web Store.Retrieved18 Feb2014.
  46. ^"Ember Inspector".Ember.js.Retrieved28 Jun2015.
  47. ^"Inside Fastboot. Faking the DOM in node".Emberjs.8 January 2015.Retrieved19 June2015.
  48. ^"Liquid Fire: Animations & Transitions for Ember Apps".GitHub.Retrieved19 June2015.
  49. ^"Animations in Ember.js with liquid-fire".airpair.com. Archived fromthe originalon 8 November 2020.Retrieved10 July2015.
  50. ^"New Ember release process".6 September 2013.Retrieved19 June2015.
  51. ^"Ember Project at 2.0".16 June 2015.Retrieved19 June2015.
  52. ^"Ember API Freeze".18 January 2013.Retrieved19 June2015.
  53. ^"Ember Watson Addon".Retrieved19 June2015.
  54. ^"Angular 2.0 announcement".29 October 2014.Retrieved19 June2015.
  55. ^"Ember core team meeting minutes".Emberjs.Retrieved5 Jul2015.
  56. ^"Ember RFC process".Emberjs.Retrieved18 Jun2015.
  57. ^"Ember Engines".EmberAddons.com.Retrieved19 Jan2016.
  58. ^"Engines".Emberjs.Retrieved3 Feb2015.
  59. ^"Refining the Release Process RFC".Emberjs.Retrieved18 Jun2015.[permanent dead link]
  60. ^"Outlet Focusing RFC".Emberjs.Archived fromthe originalon 24 September 2016.Retrieved18 Jun2015.
  61. ^"Ember sponsors".Emberjs.Retrieved18 Jun2015.
  62. ^"Interview with Mike North, Principal Software Engineer, Yahoo".Emberweekend.Retrieved10 Aug2015.

Further reading

[edit]
[edit]