Lightning Tips for Visualforce Devs! #Salesforce
Abhi Tripathi ?
Salesforce Architect xAmazon | Salesforce Certified Application Architect | 16x Salesforce Certs | Blogger
As per salesforce, lightning is the collection of tools and technologies behind a significant upgrade to the Salesforce platform. There are many things salesforce launched under lightning like Process Builder, Lightning App Builder, Community Builder are all build using aura framework.
Using Lightning component, we make business ready components, and the component are ready to use in Salesforce1, Lightning experience and communities.
And if we talk about the performance, then lightning calls the server whenever it needed not all the times, not like we do in visualforce pages, just for clicking a button visualforce calls the server, but lightning framework is not designed like that. because of that it increases the efficiency of the application.
Aura framework uses JSON to send the data to client and to the server, the best part is lightning development is faster compared to visualforce pages, as the application we develop lightning facilitates parallel design.
What's the difference between Lightning and Visualforce?
As we all were using Visualforce pages, they were static, basically page-centric model, as we discussed earlier visualforce page was designed to help implement salesforce classic look and feel, where on click of a button, it will hit to the server, but in lightning its different.
Visualforce pages has optional use of Javacsript and CSS, using Javascript we can do some client side processing in visualforce, Visualforce was meant for desktop, later on after Salesforce1, we started adding more CSS or Bootstrap etc, to make our visualforce pages work with Salesforce1.
Its kind of changing our way of working on apps, Lightning follows app-centric model, with Lightning you can send an interaction to the Salesforce servers and then update a specific component, this make performance of the application far more better. We can decide in lightning weather to process functionality on client side or server, lightning component comes in Bundles, that has there own files, for example Component, Controller, Helper, CSS, Documentation etc, you can optionally define weather you want to use the controller or not. Developing lightning component is much more complex then visualforce as you building an app not a page. It supports the latest in browser technology such as HTML5, CSS3, and touch events.