Wednesday, September 12, 2018

JTD-DesignerSeries-6-VisualforceBeginner


What is Visualforce
Who doesn't know about MVC, a pattern which almost all 3-tier web architectures & framework consider as foundation for developer tools & technologies[M-Model, V-View, C-Controller]. User Interface is another term to define the view layer, and primarily rendered by browsers these days.
Visualforce framework helped developers quickly create pages with standard styling by re-using tag based markup components & common actions with standard controllers. Developers write custom controllers & extensions to override the standard behavior, and permissions are handled with profile as custom controllers execute in system mode.
Visualforce Rendering
Visualforce is compiled, stored in the lightning platform and rendered as html by browsers. When the page is saved by a developers, it is complied and error free metadata is saved to the org repository on the cloud. When the page is requested, visualforce renderer transforms the metadata instructions into the html DOM and rendering by the browser updates the view layer.

Visualforce Page runtime is quite different in classic & lightning, with classic container owning the execution context & provides lot of control to the developer but lightning experience creates an iFrame context within the lightning container and it requires quite a bit of tweaking when the visualforce component has to use lightning platform services, though sforce.one utility is embedded in the component.
Visualforce Mobile
Salesforce Classic, developed primarily with Visualforce & Apex, became mobile with launch of Salesforce1 mobile app. Architects, usually say, that it is quite important to understand how we are going to address the mobile requirements in an enterprise ecosystem rather than in Salesforce ecosystem. Not being a savvy mobile consultant, I would say, generically, understand the Level 0 / Level 1 process & data points, [Are we talking about native mobile app / or Salesforce App, Data layer is with 2-3 salesforce objects / or are we talking custom data model in salesforce / or outside CRM application], and discussion on these data points can help with the design layer. Remote Objects along with SLDS can be used to create standard visualforce mobile components with standard objects, and developer can use advance javascript skills to use Javascript Remoting.
Visualforce Mobile provides easy low code tools like global actions, object specific actions & mobile cards to improve the mobile experience in Salesforce App. 
Visualforce in Lightning Experience
By now we understand that Lightning Experience is primarily powered by lightning components similar to other Javascript frameworks, but Salesforce suggests that for the most part standard visualforce components should work in Lightning Experience, and developers should able to apply styles to provide the Lightning look & feel. Though, Org with lot of visualforce customization should use the Gap Analysis & other methodologies for a successful upgrade & rollout.
Links & References
a) Visualforce Developer Guide
b) https://trailhead.salesforce.com/modules/visualforce_fundamentals
c) https://trailhead.salesforce.com/en/trails/lex_dev_lc_vf

No comments:

Post a Comment