Tuesday, 20 March 2018

How Do Visualforce Pages Compare to S-Controls

How Do Visualforce Pages Compare to S-Controls?

Important
Visualforce pages supersede s-controls. Organizations that haven’t previously used s-controls can’t create them. Existing s-controls are unaffected, and can still be edited.
Visualforce pages are considered the next-generation of s-controls and should be used instead of s-controls whenever possible, both for their increased performance and the ease with which they can be written. The following table outlines the differences between Visualforce pages and s-controls.
Visualforce PagesS-Controls
Required technical skillsHTML, XMLHTML, JavaScript, Ajax Toolkit
Language styleTag markupProcedural code
Page override modelAssemble standard and custom components using tagsWrite HTML and JavaScript for entire page
Standard Salesforce component libraryYesNo
Access to built-in platform behaviorYes, through the standard controllerNo
Data bindingYes
Developers can bind an input component (such as a text box) with a particular field (such as Account Name). If a user saves a value in that input component, it is also saved in the database.
No
Developers can't bind an input component with a particular field. Instead, they must write JavaScript code that uses the API to update the database with user-specified field values.
Stylesheet inheritanceYesNo, must bring in Salesforce stylesheets manually
Respect for field metadata, such as uniquenessYes, by default
If a user attempts to save a record that violates uniqueness or requiredness field attributes, an error message is automatically displayed and the user can try again.
Yes, if coded in JavaScript using a describe API call
If a user attempts to save a record that violates uniqueness or requiredness field attributes, an error message is only displayed if the s-control developer wrote code that checked those attributes.
Interaction with ApexDirect, by binding to a custom controllerIndirect, by using Apex webService methods through the API
PerformanceMore responsive because markup is generated on the Lightning Platform platformLess responsive because every call to the API requires a round trip to the server—the burden rests with the developer to tune performance
Page containerNativeIn an iFrame

No comments:

Post a Comment