Understanding the Basics

The applications you build on follows a building block layer logic of MVC(Model-View-Controller). Being able to quickly identify on which building block you are working would help on studying the different exam outline.

From wikipedia.

The model is the domain-specific representation of the data upon which the application operates. Domain logic adds meaning to raw data (for example, calculating whether today is the user’s birthday, or the totals, taxes, and shipping charges for shopping cart items). When a model changes its state, it notifies its associated views so they can be refreshed.

Many applications use a persistent storage mechanism such as a database to store data. MVC does not specifically mention the data access layer because it is understood to be underneath or encapsulated by the model. Models are not data access objects; however, in very simple apps that have little domain logic there is no real distinction to be made. Also, the ActiveRecord is an accepted design pattern which merges domain logic and data access code – a model which knows how to persist itself.

The view renders the model into a form suitable for interaction, typically a user interface element. Multiple views can exist for a single model for different purposes.

The controller receives input and initiates a response by making calls on model objects.

NOTE: What I post for my study preparations here are my own understanding and interpretation which are open for corrections and discussions. So please feel free to comment for corrections, I’m always eager to learn.

One thought on “ Understanding the Basics

Comments are closed.