Wrapping your head around the Ember app suite - differences compared to working with a simple Ember

I started using the ember application suite and went through his guides . However, I ran into problems related to the differences between a regular application, and in such a way that the Ember App Kit structures the various bits using ES6 modules instead of stuffing everything into a global variable used as a namespace (like an application).

I found that this aspect is not very clearly explained:

  • How does Ember apply its magic to auto-generated models, views, routes, and controllers?
  • Where can he find them?
  • What naming conventions should I follow?
  • If I created a template, route or controller, and Ember does not find / does not detect it and simply generates a default in its place, how to find out where it looks; or else debug in this situation?
  • How is this different from standard Ember app development compared to development using the Ember App Kit?

We really appreciate in advance!


EDIT (20140506):

These resources explain ES6 and EAK modules very well:

+6
source share
2 answers

I really did a blog series on this topic just a few weeks ago. I start with the main (globals) ember application and convert it to 8 different posts.

In the end, you have a Gruntfile with tasks just like EAK (but you created it all manually - in one step)

+5
source

Stefan Penner explains modules well on the Ember App Kit website, but sums it up:

The Ember App Kit uses the ES6 Module Transpiler to convert all your Ember classes to AMD modules. In "normal" Ember development, you assign classes as properties of your application ...

App.IndexController = Ember.Controller.extend(...); 

But with EAK, you write your modules in ES6 syntax:

 export default Ember.Controller.extend(...); 

Transpiler will use the file name as the basis for its module name (provided that it is stored in app/controllers/index.js :

 define('controllers/index', Ember.Controller.extend(...)); 

The Ember App Kit then uses a custom converter to search for modules using AMD, instead of looking for them as properties of your application on camels. (I have no reputation for posting another link, so google for ember-jj-abrams-resolver.)

If Ember searches for a module and does not find it, it behaves the same as outside of EAK.

+4
source

All Articles