Skip to content

Instantly share code, notes, and snippets.

View oligriffiths's full-sized avatar

Oli Griffiths oligriffiths

View GitHub Profile
@oligriffiths
oligriffiths / ember-ember data.md
Last active March 2, 2018 16:20
Thoughts on removing ember data from ember

The problem

Ember currently ships with ember data, and it is assumed that you will be using ember data within your application. The getting started guides also make the same assumption, and introduce ember data, before even mentioning that one can return a POJO or a promise that returns a POJO, for example an ajax request.

This contributes to the cognitive load of "learning ember" and I believe contributes substantially to the "steep learning curve" associated with learning ember. Ember data is indeed, a relatively complex product, with at least 4 core concepts to learn (models, store, adapters, serializers). To make matters worse, if your API isn't a nicely structure JSON-API, you're in for a hard time whilst you naviagte the ember data documentation to work out what to do. All of this is unnecessary to a new adopter to ember, and is likely to scare them off the framework entirely.

Background

Whilst some colleagues of mine worke

class Plugin
{
shouldBuild() {
return this.inputs.hasChanges();
}
build() {
for (let input of this.inputs) {
input.readFileSync('path/to/file');
}