Hi
Folks, Today I’m writing about MVC the MODEL, VIEW, CONTROLLER in Force.com
application development platform. MVC is basically an Architecture Pattern
which has some separation of concerns, in a Software.
Separation
of Concerns means that classifying a Module in Sub-Modules which are integrated
and interactive to each other.
Components
A
Model basically manages data and enforces rules and validations on the data,
currently in context. It’s a central component of the design pattern.
A
View is your HTML/Javascript based representation of your data pulled from your
Model. It can be a chart or some tabular formatted page to view information.
A
Controller is a conveying medium between model and view which helps view to
show data by pulling it from model. It basically accepts inputs and converts
into instructions or commands to model or view.
Working
A
model stores the data retrieved by the controller and displayed in the view.
A
view generates new outputs for the user based on the changes in the model.
A
controller sends commands to model to change the state or it can send commands
to view to change the representation of the model.
Benefits
There
are two key benefits of MVC design pattern that we can attach multiple views to
a model to show data in different ways. And we can change the way that a view
responds to an input by a user, without changing the view’s presentation.
So
this is it for now and as we move ahead with our topics we’ll learn more about
the MVC architecture pattern. I’m hoping that this article will help you to
know a basic about MVC.
Stay
tuned to Salesforce Nation…
Comments
Post a Comment