A world that’s exploding with multiple devices needs apps that are responsive at the speed of lightning. An answer to this need is Salesforce1 Lightning—a platform launched at Dreamforce 2014 that offers a component framework and a gamut of tools that helps partners, developers and even business analysts to build apps, integrate data and automate business processes in a flash. Lightning’s App Builder and Components technologies help to customize and deploy new apps to mobile devices running Salesforce1.
In this Webinar we will learn about:
1) Introduction to Lightning
2) Lightning empowering Salesforce 1
3) Before and after Lightning – A comparison
4) Blocks of Lightning
The inspiration behind Lightning
People prefer carrying their businesses in their pockets. We have powerful Smartphones and tabs, which make business more efficient and comfortable. In the present scenario, there is a huge demand for mobile applications.
With regard to the Salesforce 1 platform:
With more than 4 million applications and 1.8 million developers, the Salesforce 1 platform is a trusted and proven platform for innovative companies around the world. Now these facts show what the impact of mobile is, especially the impact on Salesforce audiences.
For an enterprise like Salesforce, just building mobile apps was not enough. The next natural step was to deliver mobile apps faster and on time to the market. The need to develop mobile apps faster is what inspired Salesforce to develop the lightning technology.
Differentiating between Salesforce 1 & Lightning
The name “lightning” itself reflects its status as the next version of the Salesforce 1 platform. However, when we say the next generation of Salesforce 1 platform, there is confusion; a lack of differentiation between Salesforce 1 and Lightning. So, let’s clear the air:
Salesforce 1 is the platform and lightning is the layer on top of it.
Lightning needs the Salesforce 1 platform to demonstrate its power. So, if you want a lightning mobile application to run on your mobile device, you first need the Salesforce 1 application installed on your mobile device. Then you can get your lightning application into your Salesforce 1 mobile.
Now, when you focus on the term lightning, this itself emphasizes on the number of cool tools it provides which will help you boost the speed of mobile app development phenomenally. It comes with a component framework and cool set of tools, which can be used by both the admins and developers, so that you can build responsive applicants of any screen size. So lightning focuses on empowering both the admins and the developers, i.e. the technical and nontechnical Salesforce users.
Another key area that lightning is going to help its customers with is reusability. The component, once developed, will be used by multiple users for multiple applications. On top of this, Salesforce is also providing components to the users so that all can leverage and make the most of the standard available components. We can use these beneficial components to get our custom applications built on mobile phones.
Lightning also takes on one of the biggest pain points in mobile app development—building mobile applications that can scale to different devices in uniform design.
How Lightning empowers the Salesforce 1 platform
Before lightning was launched, the normal procedure was that admins would communicate their business needs for mobile applications to the developer. They would prepare a set of requirements based on their understanding of the business needs and what the customers and the organizations need. Once they communicate these needs to the developers, the latter would design the applications, the alignment of the components and, so on. So it was the developer who designed an app’s looks for different devices, with admins being completely dependent on developers.
Lightning empowers admins. It gives them more control. The lightning app builder, which is part of the blocks introduced with lightning technology, gives admins the power to determine how the app should look for different devices. They can drag and drop the components to the UI and determine the look of the app in different devices. Now this implementation reduces the time gap and helps getting business-ready apps developed and delivered faster into the market before its actual need drains out.
With Salesforce 1, for any customization the developers had to design the complete page. But with lightning, the standard components can be leveraged, extended, and used according to the developer’s requirements. Developers can also use custom components and the existing custom components from app exchange or those which were done by other developers and leverage them according to their needs. Now this helps getting components designed faster and also to maintain uniformity among the lightning apps.
The IDC whitepaper survey sponsored by Salesforce reported a 70% decrease in the time required for bringing an application to market when developed using Salesforce 1 lightning.
Visual Force Pages
One major factor that impacted an important Salesforce 1 application before lightning was Visual Force pages. Visual Force pages were earlier used in Salesforce 1 for showing custom mobile applications. Visual Force pages were developed keeping the web in mind; hence, using them in mobiles led to performance issues. This is where lightning helped as it was built especially for mobiles. Now the main reason that affected the Visual Force performance on mobile was view state.
View state is just an encrypted hidden field Visual Force maintains. It is used to store the state of your components of your fields and the controller.
What happens with view state is that for every client in server communication, the view state is communicated to and fro. So, for every communication with the server, the view state would travel from client server back to client, utilizing a fair amount of bandwidth. Mobile devices are not equipped enough to handle this overload on the bandwidth. However, lightning components come with an advantage in this scenario. It introduced an architecture with stateful client and stateless server architecture.
Lightning focuses on making the most of client devices’ potential. If we see into its architecture, it functions with java script on the client side, which is used to manage the UI component data and the application data. Whereas on the sever side it makes use of Apex.
And another major attraction point is that the client and server only communicated to get the date and that too in Jason format. This architecture drastically improves the performance in Salesforce 1 application.
When we talk about Visual Force experience in Salesforce 1, there are many considerations we have to follow. For example, we were suggested to not use the apex form tag and that means we cannot use apex field tabs and it is recommended to not use many tags like apex page tag. So in that scenario what we had to do was to replace Visual Force tag, HTML components, and use some custom CSS. Now this scenario itself speaks that Visual Force was not suitable for mobiles. On the contrary when we look into lightning it comprises of java script which works as a controller and helper for the client. It makes use of HTML for the components on the page it makes use of CSS for the styling and it makes uses of apex at the server side to get the data.
These differences help understand the importance of lightning.
Basic blocks or self-tools in lightning
The basic blocks in lightning include the lightning schema builder, lightning process builder, lightning components, lightning app builder, lightning connect, and lightning extension.
Lightning schema builder
The lightning schema builder provides a very easy interface to design your schema. Unlike the Salesforce schema builder that was time consuming, the lightning schema builder makes everything very convenient to understand visually. You just have to drag and drop and can point to create object, create field; and you can create map relations between them and in just one UI. This makes the whole scenario very convenient.
Lightning process builder
Lightning process builder is a rebrand of Workflow. It comes with existing power workforce and with some added advantages. First of all, we get a visual point and click UI with process builder. It gives us a better understanding of the process which we are building since we can relate it to workflow related to flowchart. When business needs arise on your CRM or any software system, you can build a flowchart and in the backend your actual process is built in Salesforce. In addition, you can make a Post to Chatter, and you can submit a record for approval—additional actions which were introduced by keeping the mobile perspective in mind. Although process builder cannot send outbound messages, it nullifies the effort needed for writing code or a trigger. It empowers even the nontechnical people to implement new business needs and that too with zero percent fx code.
Today more than 25 Salesforce partners are already building new lightning components such as list views, keypads, case layouts, internet web shots, and real time data, and they are making them available on Salesforce app exchange. This shows how important lightning components are and how promising their future is.
The framework behind lightning is aura. The main highlight of Aura is that it is an open source and it is not just restricted to the Force.com domain. It can be used for developing dynamic web applications for mobiles and desktops. Aura comes with a rich set of available components which can be extended and used. Some other advantages of this framework are events driven architecture object oriented programming behavior. It is designed basically for mobiles.
Lightning app builder
App builder provides you with a very powerful UI where admins can just drag and drop the required components and create a fully functional app, that too within no time. The major attraction of app builder is how it empowers the non-technical people to create business- ready apps to deliver faster than ever. They can select the components from different mediums and designer apps that look exactly like they want or precisely meet their business needs.
App builder provides a bundle of components which you can select and get your application ready. It also opens up a completely new way to how developers and admins will work in future. Admins can create applications as they need by just pointing and clicking, whereas developers can focus on creating components that will be required for various business needs and focus on its performance scalability, look and feel and such important aspects.
Lightning connect is again a rebrand of external objects. Through lightning connect, external objects will now be available in your mobile devices. What you get is a read only section within your Salesforce; and this read only section shows the data that is present in some external system. We can connect to any external system which has an OData connector which is an open data protocol; and these data access protocols for example are used by companies like Microsoft, SAP. So it is a reliable data access protocol.
Now the data present in the external system can be shown within Salesforce using lightning connect in sections like taskforce, calls, or user interfaces without even the need for storing them in Salesforce.
You can save a lot of money for the data storage in Salesforce using lightning connect. External objects introduce a completely new class of objects and the API names do not end with "_ _c." Rather they end with "_ _x". So if we see the other custom objects that Salesforce provides the data is saved in Salesforce. Whereas with external objects the data is not saved in Salesforce, it's just accessed real time. Now the attraction of this feature is that you get seamless integration with external system which provides you a real time data displayed within your Salesforce and that too without the need of external (or extra data) storage or even writing a single line of code to integrate with the system. But with these attractions one thing you have to remember is that it is only a one way connection and if we require to push data to external system from Salesforce we'll still need an integration port.
Lightning extension will give you the power to replace and extend the default Salesforce 1 mobile UI. With lightning extension you will be able to either override or extend the sections of standard UI available within Salesforce 1. An example would be if your organization needs to include a new cap slide to the record view provided by Salesforce 1 or you want to change the look of the records view in native UI you can use an extension. In short, we can say that lightning extension helps us replace Salesforce standard UI with custom components. We are not sure about the level of control this will give to its users but we can really hope that this will give us the control needed to completely rebrand the Salesforce 1 application as per our organization’s design.
At present lightning extension is in pilot. But if you really want to try your hands on it you can contact the support and register for the pilot program.
Getting the lightning app ready
Suppose your organization has a Salesforce app already published in map exchange. Seeing the growth of mobile, your organization finds the need to have a mobile application of your application. Now in a situation prior to Salesforce 1 lightning you would update Visual Force pages to make it responsive, make some CSS styling changes and make it available in Salesforce 1 and the users could start using the application in mobile.
But the introduction of lightning changes this process. We know the advantages of lightning in terms of performance and it is hard to resist. However, lighting components are still in beta. Though we can make use of this beta feature and create components to develop a console and get it available in Salesforce 1, we won’t be able to use the complete package that lightning provides because even lightning app builder is in pilot now.
Lightning schema builder is just a rebrand of an existing schema builder. There are no new features introduced to the latest release.
Lighting app builder is in pilot right now; but you can still get it in your organization. You just have to log a case with CS4 support, and they will ask you to sign an NDA. Once you get the procedures completed they will activate lightning app builder in your organization.
Existing workflows do not have to be prewritten in lightning. Workflows will continue to exist. Process builder just produces a new approach of getting the workforce. So if there is a requirement, you have to combine multiple workflows or can make use of additional actions or make use of lightning process builder.
Aura is an open source it is available in getapp. It is a framework which you can use. You don't need a license to make use of aura. You can download it and start using it.
Yes. Lightning is more client side. So even if you see the lightning component that is available in beta right now in Salesforce, you can definitely view it through a browser. But the recommended approach for lightning is it is specifically designed for mobile devices. So it is recommended to use for mobile devices. But yes it available for browsers but will not provide an appropriate experience.
Niranja Nair is working as a Salesforce Developer at Suyati Technologies. She is a Salesforce1 platform application development specialist and a 401 certified Salesforce developer, with over 2.5 years of app development experience. Niranja has a passion for exploring and sharing new features in Salesforce. Not surprisingly, she is a serial Salesforce trainer. Apart from an excellent grasp on Salesforce and Apex, Niranja is also experienced in interpreting business needs and high level design into functional and streamlined code.