A free, open source framework for building web apps
"It helps you build your web applications quickly and guides you towards writing scalable, maintainable code."
Jen Weber, Ember Learning TeamStarted way back in 2007 as SproutCore
Always a migration path! π
6 week release cadence
RFC Process as well (Request for Comments)A really, really great community
Can have a big learning curve at first; however, once concepts are understood, the productivity π
(Working on lowering the learning curve!)
npm install -g ember-cli
ember new ember-quickstart
Defines all routes in your application
Does the work for you when a user navigates to https://your-app.com/users
"...a library for robustly managing model data in your Ember.js applications."
Ember Data GitHubEmber Inspector - helps you view what's in the store
You don't have to use Ember Data
"...responsible for displaying templates, loading data, and setting up application state."
Ember Docs
ember generate route users
When you generate a route, a JavaScript file and Handlebars template are created
The route is automatically added to the router.js file for you
"...routable object which receives a single property from the Route β model β which is the return value of the Route's model() method."
Ember Docs
ember generate controller users
Paired with a route of the same name
EX: /routes/users.js + /controllers/users.jsCombination of HTML + Handlebars
Receives properties from a Controller or Component and renders HTML
Think of your Route Template as your "page"
Typically made up of many HTML elements + componentsTemplates can render things differently based on what you pass them
HTML + Handlebars = templatesοΈ
"...used to encapsulate markup and style into reusable content."
Ember DocsDo you reuse some functionality a lot? May want to move it to a component.
(tests!!!!!)
ember generate component colors-card
When you generate a component, a JavaScript file and Handlebars template are created
You pass properties & actions into a component and it renders HTML
{{colors-card}}
{{!-- or... --}}
{{colors-card colors=(array 'white' 'blue')}}
Learn a bit more about ours!
A property created that is dependent on one or many other properties
They get re-evaluated when the keys change
Lazily-loaded, so only compute when you ask about them or if something changes
"...an Ember object that lives for the duration of the application, and can be made available in different parts of your application."
Ember Docs
ember generate service my-service
Services can be injected into all of the other objects we already discussed
Services are singletons - think about state