Skip to content
stickice edited this page May 19, 2020 · 18 revisions

Groups:

  1. dsNo1

Ember.js

Alt text

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. 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 convention over configuration.

OVERVIEW

Ember.js is an open-source JavaScript web framework, based on the Model–view–viewmodel (MVVM) pattern. It allows developers to create scalable single-page web applications by incorporating common idioms and best practices into the framework.
Ember is used on many popular websites, including Apple Music, Square, Inc., Discourse, Groupon, LinkedIn, Vine, Live Nation, Nordstrom, Twitch, and Chipotle.Although primarily considered a framework for the web, it is also possible to build desktop and mobile applications in Ember. The most notable example of an Ember desktop application is Apple Music, a feature of the iTunes desktop application. The Ember trademark is owned by Tilde Inc.

DESIGN PHILOSOPHY

There are several key ideas:

Focus on ambitious web applications

Ember sets out to provide a wholesale solution to the client-side application problem. This is in contrast to many JavaScript frameworks that start by providing a solution to the V in MVC (Model–View–Controller), and attempt to grow from there.

More productive out of the box

Ember is one component of a set of tools that work together to provide a complete development stack. The aim of these tools is to make the developer productive immediately. For example, Ember CLI, provides a standard application structure and build pipeline. It also has a pluggable architecture and over 3500 addons to enhance and extend it. Stability without stagnation This is the idea that backward compatibility is important and can be maintained while still innovating and evolving the framework.

Future web standards foresight

Ember has been an early adopter and pioneer of many standards around JavaScript and the web including promises, web components and ES6 syntax. Yehuda Katz, one of Ember's cofounders, is a member on TC39, which is the committee responsible for future versions of the JavaScript language. Like Ruby on Rails, Ember follows Convention over Configuration (CoC), and the Don't Repeat Yourself (DRY) principle. It has been described as a highly opinionated framework built to be very flexible.

CORE CONCEPTS

At its core, Ember's UIs are HTML driven - every part of the UI that is shown to the user is defined in an HTML template somewhere in your application. Because of this, templates are central to Ember, and one of the most important parts of the framework.
Ember consists of five key concepts:

Components

A component is a custom HTML tag. 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.

Routing

Regardless of how the URL becomes set, the Ember router then maps the current URL to one or more route handlers. A route handler can do several things:

  • It can render a template.
  • It can load a model that is then available to the template.
  • It can redirect to a new route, such as if the user isn't allowed to visit that part of the app.
  • It can handle actions that involve changing a model or transitioning to a new route.

Services

A Service is an Ember object that lives for the duration of the application, and can be made available in different parts of your application. Services are useful for features that require shared state or persistent connections. Example uses of services might include:

  • User/session authentication.
  • Geolocation.
  • WebSockets.
  • Server-sent events or notifications.
  • Server-backed API calls that may not fit Ember Data.
  • Third-party APIs.
  • Logging.

Ember Data

Ember Data, a powerful set of tools for formatting requests, normalizing responses, and efficiently managing a local cache of data. In Ember Data, models are objects that represent the underlying data that your application presents to the user. Note that Ember Data models are a different concept than the model method on Routes, although they share the same name.

In-Depth Topics

FUTURE DEVELOPMENT

Project status can be tracked via the core team meeting minutes. However major changes to Ember go through the Request For Comment process. 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 addon.
  • Release cycle improvements. Among other things it proposes changes to Ember CLI to support "svelte builds", which will strip out deprecated and unused features.
  • Outlet Focusing. Making Ember accessible by default. This RFC aims to improves the user experience for people using screen readers.

Clone this wiki locally