You are previewing Ember.js Web Development with Ember CLI.
O'Reilly logo
Ember.js Web Development with Ember CLI

Book Description

Build ambitious single-page web applications using the power of Ember.js and Ember CLI

In Detail

Ember.js is a JavaScript framework based on the Model View Controller design pattern. It brings proven design principles and practices to modern web-based application development and helps you focus on solving your core business problem.

Ember.js Web Development with Ember CLI is for the next generation of web developers who want to build powerful single-page web applications using the simplicity of Ember CLI and the sophistication of the upcoming Ember 2.0. Starting with an introduction to Ember.js, you will explore its object-oriented pattern, cover classes and other properties, diving into great techniques to define your routes when managing applications, and using object and array controllers to encapsulate the application display logic.

Unlike many other books that merely skim the surface, this book has a strong focus on Ember CLI, which will soon be the de facto mode for building apps with Ember.

What You Will Learn

  • Get started with your first Ember.js application using Ember CLI and learn about its MVC pattern

  • Understand the object-oriented design principles used in Ember.js including classes and structures

  • Discover how to use the Ember.js templating system and default handlers

  • Manage your single-page web application states using Ember.js router and customize templates

  • Learn to use controllers to communicate display logic to templates

  • Communicate with your backend server using Ember Data models

  • Build reusable Ember.js components and learn how to customize them

  • Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at If you purchased this book elsewhere, you can visit and register to have the files e-mailed directly to you.

    Table of Contents

    1. Ember.js Web Development with Ember CLI
      1. Table of Contents
      2. Ember.js Web Development with Ember CLI
      3. Credits
      4. About the Author
      5. Acknowledgments
      6. About the Reviewers
        1. Support files, eBooks, discount offers, and more
          1. Why subscribe?
          2. Free access for Packt account holders
      8. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      9. 1. Getting Started with Building Ambitious Ember.js Applications with Ember CLI
        1. The evolution of ambitious web applications
        2. An introduction to Ember.js
        3. The Ember.js MVC pattern
        4. An introduction to Ember CLI
          1. Asset pipeline
          2. Modules
          3. Managing the dependencies of your application
          4. Content security add-on
        5. Setting up your first Ember.js application using Ember CLI
          1. Prerequisites
          2. Creating a new application
          3. The app folder structure
          4. Supporting files and folders
          5. Running your first Ember.js application
        6. Building and deploying your Ember CLI application
        7. Migrating existing Ember applications to Ember CLI
        8. Code samples used in this book
        9. Summary
      10. 2. Understanding Ember.js Object-oriented Patterns
        1. Ember.js object model
        2. Reuse via mixins
        3. Computed properties
          1. Getter and setter methods
        4. Observers in Ember.js
        5. Bindings across objects
        6. Prototype extensions
        7. Summary
      11. 3. Rendering Using Templates
        1. An introduction to JavaScript templates using Handlebars.js
        2. HTMLBars and Handlebars
        3. Defining templates
          1. Handlebars.js expressions
          2. Handlebars.js conditionals
            1. If, else, and unless
            2. Displaying a list of items using Handlebars.js
          3. Binding HTML tag attributes
          4. Action event bubbling
          5. Handlebars.js input helpers
          6. Building custom Handlebars.js helpers
          7. Using the concise Emblem.js templating language
            1. Installation
            2. Using Emblem.js
        4. Summary
      12. 4. Managing Application State Using Ember.js Routes
        1. Application state
        2. Creating your first route
          1. Resources and nested templates
          2. Injecting the model for your template
        3. Making routes dynamic
          1. Route's serialize method
          2. Setting up the controller
        4. Customizing templates to render
        5. The location API
        6. Summary
      13. 5. Handling Display Logic Using Ember.js Controllers
        1. Introducing controllers
        2. Object controller and array controller
        3. Connecting controllers
        4. Summary
      14. 6. Communicating with the API Server Using ember-data
        1. Introducing ember-data
        2. Defining ember-data models
        3. Defining relationships between your ember-data models
          1. One-to-one
          2. One-to-many
          3. Many-to-many
        4. Understanding the ember-data identity map – DS.Store
        5. Working with records
          1. Finding the records
          2. Modifying the records
        6. The default REST adapter and serializer
          1. Sideloaded relationships
          2. Customizing the DS.RESTAdapter
            1. Customizing the URL endpoints
        7. Example application
        8. Summary
      15. 7. Building Reusable Components
        1. Introducing Ember views and components
          1. Custom tags with Ember.Component
          2. Defining your own components
          3. Passing data to your component
        2. Providing custom HTML to your components
        3. Extending Ember.Component
          1. Changing your component's tag
          2. Adding custom CSS classes to your component
          3. Adding custom attributes to your component's DOM element
        4. Handling actions for your component
        5. Mapping component actions to the rest of your application
        6. Summary
      16. Index