Activity › Forums › Salesforce® Discussions › Is Lightning Components build on the MVC pattern in Salesforce?
Tagged: Controller Model, MVC Pattern, Salesforce Framework, Salesforce Lightning Components, Server-Side Controller, View Controller Database
-
Is Lightning Components build on the MVC pattern in Salesforce?
Posted by Deepak on January 31, 2020 at 1:24 PMIs Lightning Components build on the MVC pattern in Salesforce?
Pooja replied 6 years, 4 months ago 5 Members · 4 Replies -
4 Replies
- [adinserter block='9']
-
No, There are similarities but Lightning components is View Controller Controller Model. The main difference between the Lightning component and MVC is dual controller design. Dual controller design means when you interact with Salesforce, your components will have a server-side controller in addition to the client-side controller.
-
Hi deepak,
There are similarities, to be sure, but it would be more correct to say that
Lightning Components is View-Controller-Controller-Model, or perhaps View-Controller-Controller-Database.
Why is “controller” doubled up in that pattern name? Because when interacting with Salesforce, your components will have a server-side controller in addition to the client-side controller. This dual controller design is the key difference between Lightning Components and MVC.
-
No, Lightning components do not build on the MVC pattern in Salesforce.
Log In to reply.