An introduction to Ember.js

Ember.js is a JavaScript framework based on the MVC design pattern. It tries to bring proven design principles and practices into modern web-based application development and lets you focus on solving core business problems.

Ember.js is a highly opinionated framework and takes a lot of inspiration from the Ruby on Rails convention over configuration philosophy. Convention over configuration, also known as coding by convention, is a design philosophy wherein things work as expected, provided they follow a common set of guidelines.

One example of convention over configuration in the MVC world would be, if there was a class called HomeController, the framework would automatically look for a model class named Home, and make the instance of the model available to the HomeController class. The benefit we get from this is that we did not wire up the controller and model in any configuration file. If we follow the naming guidelines set up by the framework, it takes care of injecting the correct model class to the controller. This results in code that is more concise and follows a particular standard of doing things.

Ember.js is full of such convention over configuration methods, and we shall discuss them later in the chapter.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.227.82