November 12, 2015
Among the major announcements at Dreamforce in October, Lightning Experience and Lightning Components and Applications are generally available to users in the Winter ‘16 release. All of these, combined with the Lightning App Builder and the Lightning Component App Exchange, allow administrators to build complex, professional apps using point-and-click tools.
These changes dramatically update Salesforce’s look and feel as a response to customer asks. According to Bluewolf’s The State of Salesforce report, 90% of Sales Cloud users cite “improving the user experience of sales apps” among their most important sales strategies. Employee experience is getting the attention it deserves: one-third of companies surveyed named an employee-facing initiative as one of their top three objectives for 2016.
I recently started building my first big Lightning application, and I saw some refreshing changes, mainly inspired by other Single Page Application frameworks:
- Javascript is king.
The logic is now in the front end on a Javascript controller with actions that respond to events. The data is also in the front-end easily accessible from the controller. The framework provides dynamic rendering of components and data binding to make sure the page is always up to date. This improves performance dramatically and takes Salesforce development from the fringe world of Apex to a widely known and supported language that is going through an enormous boom. - Bundles.
Each component and application is actually a folder with the markup, the controller, a utils class, style, documentation… Everything is much more organized and is much easier to develop without having to import an endless list of static resources. My only caveat is that this bundle structure is rigid, I would love to be able to have the ability to add more javascript classes or have my images inside the bundle for example. - Decoupled reusable components.
Salesforce is really pushing for the Single Page Application model with independent decoupled components that load as needed. The framework uses Event-driven programming to handle component iteration making this decoupling easier. This is a huge shift of paradigm compared with Visualforce but makes for much more scalable applications. It also helps integrating functionality and components from different sources (custom built, from the App Exchange, standard Salesforce) together (No more iframes on standard pages) and ultimately allows for building apps using just point-and-click tools. - Separate styling and functionality.
Lightning native components are minimally styled. For the Lightning look and feel Salesforce uses the Lightning Design System, a CSS framework in the realm of Bootstrap that makes it easier to get the Lightning UI: Is supported by Salesforce, consistent with the standard look, and integrates well with other stylesheets. Visualforce developers surely remember how painful it was to change small details on a native component while still trying to use Salesforce styling. - Extendability.
Components have a object oriented approach and can inherit other components. The advantages are widely known but ultimately it makes for more organized, reusable and manageable components. - Mobile friendly.
Both the Lightning system and the framework were designed mobile first and they make it easier to develop an application that looks good on any device. This paradigm is present from the core with the available components and how the UI is designed.
The main drawbacks with the lightning UI are mainly with what’s still missing but can be solved:
- Not a lot of components.
There are still very few native components and lot of the functionality needs to be written from scratch. This includes a lot of functionality that is already available on Salesforce1 or is in the Aura Framework and that would make programming in Lightning much easier. - Salesforce integration.
Unfortunately, the framework is still pretty independent from the rest of the platform metadata. Things like fieldsets, picklist values, field or object labels are only available by calling the metadata API or defining a server action. This makes creating a dynamic application customizable by admins much more complex. - Testing.
I think one of the best things about Salesforce is forcing developers to test code to enforce quality. There are testing tools available for JS but I’m missing a Lightning testing framework that makes it easier to unit test components (and that exists on the original Aura framework). - IDE support.
Programming in Lightning is still not as comfortable as it could be. Eclipse or Mavensmate have some support but there are some things that are still not possible outside the dreaded Salesforce Developer Console.
I’m very excited for Lightning and I think its functionality will only improve. Salesforce seems to be adopting the industry latest trends and best practices and creating a framework that can evolve to provide more beautiful and user-friendly UI that is more scalable and easier to program. The new framework makes it faster and easier for developers and administrators to build more beautiful and customizable applications to improve the user experience, drive adoption, and customize the platform with the perfect tools to boost efficiency.
Interested to learn more about Salesforce Lightning? Connect with our experts.