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

 

This chapter covers

  • An introduction to Ember Data and core concepts
  • Using Ember Data models and model associations
  • Using the built-in RESTAdapter to interface with your server
  • Customizing the RESTAdapter

Distilled down to a single statement, Ember Data is the Object Relational Mapping framework for the web. Ember Data lets you interact with your server side in a straightforward and intuitive manner, while keeping the required code to a minimum. If you can also customize the format that your server provides its data in, you’ll be up and running on your client side with a minimal amount of code.

But not everyone can adapt the back-end application to fit with the standard REST-based API that Ember Data expects out of the box. For these situations, Ember Data offers pluggable adapters and serializer APIs so that your Ember.js application can understand your specific server-side data APIs.

This chapter starts with the basic building blocks and patterns that make up the core of Ember Data before it delves into how you can use the built-in RESTAdapter and RESTSerializer to get data in and out of your Ember.js application. It wraps up with an overview of how you can implement custom adapters and serializers so that Ember Data works with the server-side API that you already have in place.

5.1. Using Ember Data as an application cache

5.2. Firing up Ember Data

5.3. Ember Data model associations

5.4. Customizing the adapter and serializer

5.5. Summary

sitemap