Ember.js in Action
Joachim Haagen Skeie
  • June 2014
  • ISBN 9781617291456
  • 264 pages
  • printed in black & white

An excellent resource to guide you through this awesome new technology!

Michael A. Angelo, Laird Technologies

Ember.js in Action is a crisp tutorial that introduces the Ember.js framework and shows you how to build production-quality web applications. You'll begin with the basic architecture: client- and server-side MVC, integrating Ember.js with your favorite back end, handling data ... and more. You'll explore the amazing Handlebars templating engine that automatically updates your apps when the data behind them changes. Along the way, you'll develop a complete Ember.js application and learn how to deploy, administer, and update it efficiently.

About the Technology

Ember.js is a JavaScript MVC framework that handles important tasks like managing code modules, maintaining state, and expediting reliable data flow. It provides the patterns, components, and scaffolding you need to build ambitious web applications.

About the book

Ember.js in Action introduces the Ember.js framework and shows you how to build full-featured, desktop-quality web applications. You'll begin with the basic architecture: client- and server-side MVC and how to integrate Ember.js with your favorite back end. Then you'll explore the amazing Handlebars templating engine that automatically updates your apps when the data behind them changes. Along the way, you'll develop a complete Ember.js application and learn how to deploy, administer, and update it efficiently.

Table of Contents detailed table of contents



about this Book

about the Cover Illustration

Part 1. Ember.js fundamentals

1. Powering your next ambitious web application

1.1. Who is Ember.js for?

1.2.1. The rise of asynchronous web applications

1.2.2. Moving toward the Ember.js model

1.3. Overview of Ember.js

1.3.1. What is Ember.js?

1.3.2. The parts that make up an Ember.js application

1.4. Your first Ember.js application: Notes

1.4.1. Getting started with the Notes application

1.4.2. Creating a namespace and a router

1.4.3. Defining application routes

1.4.4. Creating and listing notes

1.4.5. Selecting and viewing a note

1.4.6. Deleting notes

1.5. Summary

2. The Ember.js way

2.1. Using bindings to glue your objects together

2.2. Updating templates automatically

2.3. Computed properties

2.4. Observers

2.5. The Ember.js object model

2.6. Data synchronization between layers with Ember.js

2.7. Summary

3. Putting everything together using Ember.js Router

3.1. Introducing the Ember.js in Action Blog

3.2. The predicament of server-side Model-View-Controller patterns

3.2.1. The Ember MVC pattern

3.2.2. Putting everything together

3.3. Ember Router: Ember.js’s take on statecharts

3.4. Ember.js in Action Blog part 1: the blog index

3.4.1. Getting the blog router started

3.4.2. Adding views and templates

3.4.3. Displaying a list of blog posts

3.5. Ember.js in Action Blog part 2: adding the blog post route

3.6. Dependency injection and using the Ember Container

3.6.1. Connecting controllers through the needs property

3.6.2. Connecting objects via the Ember Container

3.7. Summary

4. Automatically updating templates with Handlebars.js

4.1. What’s in a template?

4.1.1. Simple expressions

4.1.2. Block expressions

4.2. Built-in block expressions

4.2.1. The if and if-else block expressions

4.2.2. The {{unless}} block expression

4.2.3. The {{with}} block expression

4.2.4. Handlbars.js comments

4.3. Using Handlebars.js with Ember.js

4.3.1. Defining templates inside index.html

4.3.2. Defining templates directly in the Ember.TEMPLATES hash

4.3.3. Creating Handlebars.js template-backed Ember.js views

4.4. Ember.js-provided Handlebars.js expressions

4.4.1. The {{view}} expression

4.4.2. The {{bind-attr}} expression

4.4.3. The {{action}} expression

4.4.4. The {{outlet}} expression

4.4.5. The {{unbound}} expression

4.4.6. The {{partial}} expression

4.4.8. The {{render}} expression

4.4.9. The {{control}} expression

4.4.10. The {{input}} and {{textarea}} expressions

4.4.11. The {{yield}} expression

4.5. Creating your own expressions

4.6. Summary

Part 2. Building ambitious web apps for the real world

5. Bringing home the bacon — interfacing with the server side using Ember Data

5.1. Using Ember Data as an application cache

5.1.1. Defining Ember Data models

5.1.2. Ember Data is an identity map

5.1.3. Relationships between model objects

5.1.4. Model states and events

5.1.5. Communicating with the back end

5.2. Firing up Ember Data

5.2.1. Fetching data from your models

5.2.2. Specifying relationships between your models

5.3. Ember Data model associations

5.3.1. Understanding the Ember Data model relationships

5.3.2. Ember Data sideloaded records

5.4. Customizing the adapter and serializer

5.4.1. Writing a custom adapter but keeping the default serializer

5.4.2. Writing custom adapters and serializers

5.4.3. Custom URLs

5.5. Summary

6. Interfacing with the server side without using Ember Data

6.1. Introducing Ember Fest

6.1.1. Understanding the application router

6.1.2. Using the model() hook to fetch data

6.1.3. Implementing an identity map

6.2. Fetching data

6.2.1. Returning a specific task via the find() function

6.2.2. Returning all talks via the findAll() function

6.2.3. Implementing the Emberfest.Talk model class

6.3. Persisting data

6.3.1. Submitting a new talk via the createRecord() function

6.3.2. Updating a talk’s data via the updateRecord() function

6.3.3. Deleting a talk via the delete () function

6.4. Summary

7. Writing custom components

7.1. About Ember custom components

7.2. Implementing a selectable list

7.2.1. Defining the selectable-list component

7.2.2. The selectable-list-item component

7.2.3. The delete-modal component

7.2.4. Deleting an item using the three components

7.3. Implementing a tree menu

7.3.1. The tree-menu data model

7.3.2. Defining the tree-menu component

7.3.3. Defining the tree-menu-item and tree-menu-node components

7.3.4. Supporting single selections

7.4. Summary

8. Testing your Ember.js application

8.1. Performing unit testing with QUnit and PhantomJS

8.1.1. Introduction to QUnit

8.1.2. Executing from the command line with PhantomJS

8.1.3. Integrating QUnit and PhantomJS

8.2. Writing a simple Ember.js unit test with QUnit

8.3. Performing integration testing

8.3.1. Introducing Sinon

8.3.2. Integration test for adding a new alert

8.4. Using Ember.Instrumentation for performance testing

8.5. Summary

Part 3. Advanced Ember.js topics

9. Authentication through a third-party system — Mozilla Persona

9.1. Integrating a third-party authentication system with Ember.js

9.1.1. Performing first-time login and user registration

9.1.2. Logging in to Montric via the third-party authentication provider

9.2. Signing in users via HTTP cookies

9.3. Summary

10. The Ember.js run loop — Backburner.js

10.1. What is the run loop?

10.1.1. Introducing the Ember.js TodoMVC application

10.1.2. The Ember.js run loop explained

10.2. Executing code within the constraints of the run loop

10.2.1. Executing code inside the current run loop

10.2.2. Executing code inside the next run loop

10.2.3. Executing code inside a future run loop

10.2.4. Executing code inside a specific queue

10.2.5. Executing repeated tasks with the run loop

10.3. Summary

11. Packaging and deployment

11.1. Understanding JavaScript application packaging and assembly

11.1.1. Choosing a directory structure

11.1.2. Structuring your custom-written source code

11.1.3. Organizing non-JavaScript assets

11.1.4. Following the Ember.js application assembly process

11.2. Using Grunt.js as your build tool

11.2.1. Bootstrapping Montric’s Grunt.js build

11.2.2. Concatenating the JavaScript code

11.2.3. Extracting plugin configurations to separate files

11.2.4. Linting out common bugs

11.2.5. Precompiling Handlebars templates

11.2.6. Minifying your source code

11.2.7. Considering advantages and drawbacks of Grunt.js

11.3. Summary


What's inside

  • Working with Ember Data
  • Mastering Handlebars templates
  • Advanced JavaScript techniques
  • Covers Ember.js 1.0

About the reader

Readers of this book need to know JavaScript. No prior experience with Ember.js is required.

About the author

Joachim Haagen Skeie is an experienced web application developer and the author of Montric, an open source monitoring tool built using Ember.js.

placing your order...

Don't refresh or navigate away from the page.
print book $33.74 $44.99 pBook + eBook + liveBook
Additional shipping charges may apply
Ember.js in Action (print book) added to cart
continue shopping
go to cart

eBook $26.99 $35.99 3 formats + liveBook
Ember.js in Action (eBook) added to cart
continue shopping
go to cart

Prices displayed in rupees will be charged in USD when you check out.
customers also reading

This book 1-hop 2-hops 3-hops

FREE domestic shipping on three or more pBooks