Last week I had the pleasure of giving a talk in the Woman In Technology user group in Paris. As the members of the group are mainly admins, and I am a developer, I wanted to talk about something that I was familiar with but that they could understood and use in their daily work. Having seen all the new Lightning features that come with Winter 17 release, I thought that a good option could be doing a summary of the many ways we can use Lightning Components in Lightning Experience and Salesforce1. This is, not talk about developing Lightning Components, but about configuring Salesforce to use them.
First of all, is important to understand that with the roll out of Lightning Components Salesforce is trying to change the UI building model that we had with Visualforce, which was page centric, to a new model which they have named app centric. This means, among other things, that thanks to Lightning Components a developer is going to be able to provide components that can be easily assembled together by admins in Lightning App Builder/Community Builder to build applications. This gives us much more flexibility than we had before.
So, today, an admin can go to the AppExchange for Components, look for a Component and download it to his org. Once this has been done, what can we do with it?
1. We can use Lightning App Builder to assembly the Component with other Components and build Lightning Pages. We can create for now three types of Lightning Pages:
- Home Page (only available in Lightning Experience): this is, we are able of customising the Lightning Experience home page assembling standard ( Quarterly Performance, Today’s tasks, Top Deals …) or custom components (e.g. downloaded from the AppExchange) in App Builder. Indeed, we are able of creating and assigning different home pages for different profiles.
- Record Home Page (only available in Lightning Experience): we can customise in the same way the home page for any record (e.g account detail page, contact detail page …). From Winter 17 on, we will be able additionally of configuring different record home pages by application. Some of the standard components that are available to be used in a record home Lightning Page are Activities, Feed, Highlights etc. If you want to know more, check this post.
- App Page (available in Lightning Experience and Salesforce1): additionally in App Builder we can assemble Lightning Components to build App Lightning Pages. These Lightning Pages can be embedded in a Lightning App Tabs, that can be added to a Lightning Experience or Salesforce1 navigation menus.
- Tip for devs: in order to use a Component in a Lightning Page, you must implement the interface flexipage:availableForAllPageTypes. If you only want it available for a record home Lighning Page, implement flexipage:availableForRecordHome instead.
2. If we don’t want to assemble the Component, and simply show it in a Lightning Experience or Salesforce1 navigation menus, we can directly embed it in a Lightning Component Tab, without having to use App Builder. Extra point: a Lightning Component Tab can be embedded into a Custom App and make it available in Lightning Experience App Launcher!
*Tip for devs: if you want your component to be available to be embedded in a Lightning Component Tab, don’t forget to implement the force:appHostable interface.
3. In the same way we can use App Builder for customising home, record and app pages, we can use Community Builder to do the same in a Community. The principles are exactly the same, and the builder is pretty similar.
*Tip for devs: this time your component should implement the interface forceCommunity:availableForAllPageTypes.
4. We can include Lightning Components in Visualforce, but in this case we will need some development. We will need to create a Lightning standalone app that contains the component (.app resource), reference the app in your visualforce page and create the component dynamically.
5. Anywhere with Lightning Out (beta). The same principle that is used for embedding Components in Visualforce pages can be extended to allow us instantiating Components anywhere! This is, in any external system, for example your own web page in a external server. In we want to use this, we will need a way to manage authentication with Salesforce servers. Check this session if you want to know more!
6. We can create Actions (new in Winter 17) that will show our Component in a pop-up when clicked. We must create an Action and associate with the Component. The action will appear will appear on the Layout editor (under Salesforce1 and Lightning Actions category). Check this post if you want to know more.
*Tip for developers: Component must specifically support Actions implementing the interface force:lightningQuickAction
7. We can show our Component in the new Lightning Experience Utility Bar that has been rolled out in Winter 17. Utility bar is a persistent footer that will appear in Lightning Apps, in which you can include now a quick access to a Component!. Unfortunately for now, we are not able of configuring this bar declaratively. We will need some development. Read more here.
*Tip for developers: as the Utility bar is a Lightning Page behind the scenes, if you want your Component to be available there you will have to implement the interface flexipage:availableForAllPageTypes.
From a development perspective, we have seen that each component has to be configured in a certain way in order to be used in one place or another. This implies that we will need some indicators in the AppExchange to know if a Component is ready to be used in the place/s I want to use it. For now we have the next indicators:
- We know if a Component is available for being used in App Builder.
- We know if a Component is available for being used in Community Builder.
- Additionally, we know if a component is upgradeable. If Components are uploaded as an unmanaged package, they will not be upgradeable by the developer, which means that if a bug exists in the Component, it will never be fixed!
- We know as well if the code of the Component is editable. Bear in mind this means the Component is unmanaged, hence not upgradeable.
Hope that in the mid time Salesforce gives us more indicators in the AppExchange that help us deciding which Component do we want to download!
Finally, I want to highlight how wonderful was the experience of talking at Paris Woman In Technology group, how awesome were the people I met there, and how encouraging are this kinds of events in which you are able to talk about technology with people with very different profiles, interchanging knowledge and having fun at the same time. Here are the slides I used in the talk. À bientôt!
Leave a Reply