Ember.js Basics

Resources

What it is

  • Ember.js is an open-source Javascript framework with the Model–view–viewmodel pattern.
  • Ember is an opinionated framework. This means that most architectural design decisions have been made for you by the developers of the framework. The advantage of this is that anyone who knows Ember can load your code and understand within a few minutes what is going on.

Core Concepts

Ember Core Concepts

  1. Ember router maps a URL to a route handler
  2. Route handler renders a template, then a model that is available to the template. Templates use Handlebars syntax.
  3. Models save data in a “persistent state”, which is fancy language for putting it in a database or data store of some kind.
  4. Components control how the UI behaves. They have two parts: A handlebars template and a javascript source file that defines the behavior.

Installing and running a project

Install:

$ npm install -g ember-cli@2.6

Creating a new app:

$ ember new 

Starting the development server. You must be in the project folder (cd to it). It will serve on http://localhost:4200/

$ ember server

or ember s for short



Comments

Leave a Reply

Webmentions

If you've written a response on your own site, you can enter that post's URL to reply with a Webmention.

The only requirement for your mention to be recognized is a link to this post in your post's content. You can update or delete your post and then re-submit the URL in the form to update or remove your response from this page.

Learn more about Webmentions.