1

We are developing application using HTML 5 in salesforce. In most of the examples available we can see that logic, data biding and UI implemented in same page. Even entire application they have developed in one page only (Just rendering sections of page).

It is very difficult to maintain application and somehow I am not satisfied with it. Can we implement MVC architecture and is there any documentation available?

2 Answers 2

4

If you're writing a Salesforce1 Application, you want to use a SinglePage application. It's much more efficient. What you want to do on the controller side though is use JS Remoting. For more on this, See the Visualforce Developer’s Guide, Salesforce1 Mobile App Developer Guide and also go through the Trailhead Modules related to Visualforce, Lightning and Mobile.

1

You can implement MVC in Salesforce using Apex and Visualforce. Visualforce uses the traditional model-view-controller (MVC) paradigm, with the option to use auto-generated controllers for database objects, providing simple and tight integration with the database. You can write your own controllers, or extensions to controllers, using Apex Code. Visualforce also provides AJAX components, and embeds the formula expression language for action, data and component binding interaction. Here are some documentation available.

https://developer.salesforce.com/page/An_Introduction_to_Visualforce http://www.sfdc99.com/2015/02/11/the-model-view-controller-pattern/ http://www.salesforcetutorial.com/model-view-controller-mvc/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .