Activity Forums Salesforce® Discussions what is MVC in salesforce?

  • Thomas

    Member
    November 5, 2018 at 8:44 pm

    This is a good link -
    https://developer.salesforce.com/docs/atlas.en-us.216.0.pages.meta/pages/pages_intro.htm

    Salesforce has created a comprehensive platform for building on-demand applications. Like other sophisticated application development platforms, the Lightning platform offers separate tools for defining:

    (M) The structure of the data—that is, the data model

    (V) The layouts that specify how that data should be displayed—that is, the user interface

    (C) The rules that detail how that data can be manipulated—that is, the business logic

    Splitting up application development tools based on whether they affect the data model, business logic, or user interface is also known as the Model-View-Controller (MVC) application development pattern—the Model is the data model, the View is the user interface, and the Controller is the business logic.

     

  • William

    Member
    December 31, 2018 at 3:39 am

    Salesforce is based on the MVC architecture that has three components — Model — View — Controller. MVC is a software architecture pattern that separates the information representation from the users’ interaction with it. Salesforce is based on traditional MVC paradigm where interaction with the database is easier than your expectations and secure too.

    Model show what schema is used to represent the system completely?

    View layer shows how the schema is represented?

    Controllers are used to performing actions whenever the user interacts.

  • Nitesh

    Member
    January 2, 2019 at 11:33 am

    MODEL
    The model is your database objects in Salesforce. The include the standard Salesforce objects like Leads, Contacts, Accounts, Opportunities etc but it also includes any custom objects you've created.

    VIEW
    The view represents the presentation of the data (i.e. the user interface).

    Pages - While often just called "pages", what we are talking about is Visualforce pages. They are the building blocks of the user interface. Visualforce uses HTML to lay out the appearance of the application interface. Each page is referenced by a unique URL just like a regular webpage. The pages themselves also contain Visualforce Components which can be invoked by simple tags inside the page.

    Components - these are both standard and custom Visualforce Components. Think of them like widgets that you can add to your pages. Once you write the code once, you can reuse it on multiple pages. Components are important because they allow for this reuse. Components can be styled with CSS.

    CONTROLLER
    Controllers are the building blocks of the actual application logic. The controllers are written in Apex code and they end up controlling and enforcing all the business logic.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos