Ember-Data Basics

As the official persistence library of the ember.js framework, ember-data has become more performant, more customizable, and an even more valuable library over time.

Ember-Data Basics

Custom Transforms

By specifying custom ember-data transforms, we can define new types of attributes on our model. We'll build our own "color", "array" and "object" custom ember-data transforms.

  • Custom TransformsTransforms vs. Other Options

    Ember-data transforms allow us to define other types of model attributes. We'll look at the practical differences between using transforms, compared to computed properties or serializer logic. Then, we'll finish by defining the parts needed for a complete ember-data transform, and go through a non-trivial example together.

  • Custom TransformsExercise: Three Transforms

    Build three transforms so that you can access some interesting API data on our large example app:

    • RGB color
    • Array
    • Object

    With reasonable unit tests for at least one of the three. Ensure that you handle important edge cases (like null value) appropriately.


Clever Caching

Ember-data's caching features are often under-utilized, resulting in extra time to fetch data with each page load. We'll explore some simple caching strategies that will translate to major performance gains!

Featuring: Fastboot

We'll look at how ember-data's store can work hand-in-hand with Ember's server-side rendering technology, by way of a fastboot feature called shoebox storage, to land pages on the screen with lightning speed!

Helpful Hooks

Ember-data is easier to customize than ever, but it takes experience to find the right balance between an tangled application adapter monolith, and dozens of single-purpose modules that repeat common logic.