Application Architecture

Learn about the architecture and workflow of Ember applications.

Ember follows the MVC (model-view-controller) software design pattern. MVC essentially means that our application should consist of a separate data model, a separate view layer, and a separate controller. These three layers should be separated into three different objects. Let’s discuss each layer of the MVC design pattern in detail in the following subsections.

MVC pattern

  • Model: The model is an object that contains only the application’s data. The model has nothing to do with the data logic, which is how the data is presented to the user.
  • View: The view is the presentational layer that presents the model’s data to the user. The view can access the model’s data, but it has nothing to do with the manipulation of the data contained in the model.
  • Controller: The controller acts as a middleman between the view and the model. The controller entertains the events that are triggered on the view. It listens to the events and executes defined actions. When data needs to be rendered on an event, the controller calls a function on the model and reflects the results of that operation on the view.

The illustration below shows the whole flow of the MVC pattern:

Get hands-on with 1200+ tech skills courses.