Posts

Showing posts from November, 2012

Ember.js MVC tutorial

Image
The Ember.js framework uses a model-view-controller (MVC) pattern of application architecture. Many other frameworks and platforms also use this pattern, so you may have heard of it before. Although the concepts are consistent across platforms, the implementation can vary heavily. Therefore, it is important to understand how Ember.js's MVC implementation differs from what you may be familiar with. MVC Basics The purpose of the MVC pattern is to separate key concerns so that objects can more easily be tested, maintained, and reused. The model is where most application data is kept. Models are generally specified in advance, using a schema or some other type of template in order to formalize and optimize data storage and retrieval. It is often implemented in the form of a data type, class, or database table. An example of a model would be a User , which is made up of username and password string fields. Many User objects can be created and stored, and they are usually not r

Ember.js tutorial for beginners

 What is Ember.js? Ember is a JavaScript framework for creating ambitious web applications that eliminates boilerplate and provides a standard application architecture. Eliminate Boilerplate There are some tasks that are common to every web application. For example, taking data from the server, rendering it to the screen, then updating that information when it changes. Since the tools provided to do this by the browser are quite primitive, you end up writing the same code over and over. Ember.js provides tools that let you focus on your app instead of writing the same code you've written a hundred times. Because we've built dozens of applications ourselves, we've gone beyond the obvious low-level event-driven abstractions, eliminating much of the boilerplate associated with propagating changes throughout your application, and especially into the DOM itself. To help manage changes in the view, Ember.js comes with a templating engine that will automatically update t