Activity › Forums › Salesforce® Discussions › Can anyone help me with Model, View and Controller concept in Salesforce?
-
Can anyone help me with Model, View and Controller concept in Salesforce?
Posted by Himanshu on April 30, 2016 at 5:15 PMCan anyone help me with Model, View and Controller concept in Salesforce? Any help would be appreciated.
Madison replied 8 years, 9 months ago 4 Members · 3 Replies -
3 Replies
-
Salesforce MVC-
We write SFDC visual force (VF pages). Each VF page is associated with a Controller and this controller may be a custom controller or a standard controller.Visualforce uses the model-view-controller (MVC) paradigm.
Saleforce MVC pattern contains below three modules:
1.Model
2.View
3.ControllerModel:
What schema and data does salesforce uses to represent the system completely. In salesforce, we can say that sObjects are the model as every entity in salesforce is mapped to some sObject.
View:
How the schema and data is represented. Visualforce is used to present the data to users.
Controller:
How the interface actions. Controllers are used to perform the actions whenever users interact with visual force.
- [adinserter block='9']
-
Hi Himanshu,
Model-View-Controller :-
Model –
The Model is simply the underlying database. In Visualforce, it’s the collection of Salesforce objects and fields that we’d represent and modify in our page.
View –
The View is the code that makes up our page’s UI. In our case, it’s all of our Visualforce, HTML, CSS, and Javascript code.
Controller –
The Controller is the middle layer between the model and the view. It’s the Apex code that interacts with the database according to the view’s needs.
-
Hello Himanshu,
Here I will share MVC in SalesForce diagram which explains brief overview. Find below diagram
For MVC detailed description please check this site TekSlate.com Hope you like it.
Thanks.
Log In to reply.