Most of us Salesforce Developers have started our development in Salesforce Classic. Now that the Lightning Experience is out there, we're starting to migrate our skillset from Visualforce to Lightning.
If you're in the process of starting your journey from Visualforce to Lightning, please keep reading, as I've got 5 tips for you! I hope you find them useful.
#1 - JavaScript Understanding
When I was more involved in Java projects I used to build apps with the DOJO framework. This is a JavaScript toolkit that provides multiple elements and UI components to help with Web App development.
When I moved to Lightning, I found this skillset very useful. I kept finding similarities between the Lightning and the DOJO framework.
So my #1 recommendation when it comes to starting with #Lightning is to have some JavaScript understanding. Any of the other popular frameworks (jQuery, ...) can do to help you understand the underlying JavaScript architecture.
#2 - Embedded #Lightning Components
The Lightning Experience provides a beautiful environment, and it's a very user-friendly one. But those who have been working on Salesforce Classic for a while (as is my case) may find it difficult to adjust to the new approach; and changing the look and feel of the platform, as well as the underlying technology, all at once, may be a bit disconcerting.
That's why I'd recommend starting by embedding your first #Lightning Components inside a Visualforce page that you can hook anywhere in Salesforce Classic.
The image above is an example of a Visualforce page that embeds the NewContactDataInput Lightning component. Note the use of the < apex:includeLightning /> tag. Also be aware that not all the Lightning events are supported in Classic, but it's a good start to create something in #Lightning within your comfort zone of Salesforce Classic and Visualforce pages.
#3 - Read the #Lightning Documentation
A good start point to understand the new Lightning Framework is the Official Documentation, where you can find the principles of the new technology, based on the open source Aura Framework.
I also find very useful the style documentation available in the SLDS (Salesforce Lightning Design System), where you find examples of the CSS classes used in the #Lightning Experience, and you can learn how to use them for your own custom components.
#4 - Explore your Developer Tools
One of my favourite tools is the MavensMate IDE. I use it together with Sublime Text 3 and it's really easy to use. The Lightning Component Bundles are made of a number of files; I find it quite difficult to navigate through the different elements from the Salesforce Developer Console.
Luckily, the IDE groups the files in the Bundle in the same folder, making it very easy to switch from the component to the controller, as shown in the image on top of these lines.
#5 - Test is a must!
When you work with Lightning Components, you find yourself in the wonderful world of a great UI experience; this is great because you "see your work" making progress!
However, sometimes this can distruct you from your Unit Tests, which will become a nightmare at deployment phase...
Trust me, I've found myself spending a whole day adding little bits and pieces to make my component look stunning, because the SLDS is so beautiful and easy to customise that your creativity gets boosted, but you can't forget about your component's controller; your controller is still an Apex class, and it needs to be Unit Tested to make it to Production!
And that's all for now. I hope you find this post useful.
Happy coding!
A blog about Cloud Implementations on the Salesforce platform, Data Integration and general development.
Showing posts with label Lightning Components. Show all posts
Showing posts with label Lightning Components. Show all posts
Tuesday, 20 December 2016
Friday, 4 September 2015
Salesforce Trailhead: Learning Lightning Development
We are just 2 weeks away from Dreamforce 2015, I'm going again this year, so I have to get up to speed with the latest features. After last week's announcement to Meet the New Salesforce you can't help but get your hands on learning the new Lightning Experience, and what better way to do it than with Trailhead? None. So that's why I encourage everyone wanting to start building Lightning components to check it out. It's also a really nice way of starting your preparation for what's to come with the new Salesforce release in Winter '16.
The Lightning Experience Developer Trail takes you through 5 modules to show you an overview of the different points of view of the new Salesforce development approach:
I consider it quite important to highlight that the Lightning Experience is not fully terminated and rolled out to the whole platform at the time of writing this post (September 2015), and even if it brings new capabilities that weren't available before, it is still "Work In Progress" and it doesn't support all the features that Salesforce Classic does at the moment.
In Salesforce's own words: "Lightning components are still in their infancy and not all the features you’re used to in Visualforce are fully supported yet."
Just be patient and let the Salesforce team do their job. We'll definitely be getting updates from them with the progress through the usual channels...
This is what you can expect from each of the Modules. As usual, you will earn some new badges and you can win up to 5800 points!
Lightning Experience Basics
Find out about what the Lightning Experience is and how it's different to Salesforce Classic. View examples of the look and feel of the new interface.
Get advice on how to decide whether the new experience is right for you.
Instructions on how to enable it in your ORG.
Lightning Experience Development

An overview of the impact of the new User Experience on the typical Developer tools, like Apex, the API, Visualforce, and others.
Recommendations on what technology you should use depending on the requirements of your application. One of the features from the Lightning Experience I'm more excited about is the fact that you don't have to worry about compatibility accross devices and browsers, it's all taken care of for you!
Guidance on what to do with Packaged applications or the Apps in the AppExchange to accommodate the new Lightning Experience.
Visualforce & Lightning Experience
You will find out the ways in which you can keep using Visualforce within the Lightning Experience.
Set up your work environment for a better development experience: code editor, page viewers and review in multiple environments.
Discover how Visualforce pages behave when running in Lightning Experience and how to share them between both experiences, as well as the styling considerations to bare in mind.
Lightning Components
This module describes what Lightning Components are and how the new Lightning Components framework differs from the Visualforce one. Prepare for a good 4 hours of exciting training with this module, because this is where you will write some actual code and connect your Trailhead to your Developer ORG to create some Lightning Components.
An overview of the different techniques available for Lightning Components is given in this module: server-side and client-side controllers, Apex and JavaScript...
Lightning Design System
This final module goes into the Design principals used in the Lightning Experience. You get introduced to the Block-Element-Modifier syntax (BEM) for styling your components.
Some explanations about the Grid System, that is a good way to understand the layout that your Lightning Components will use.
You will find out next the recommended ways of accessing your Data in Salesforce from your Lightning Components; and also how to include Avatars and Icons within your components.
The final activity of this module helps you build Record Home Page making use of several components!
And now you're all set to understand MOST of what people will be talking about at Dreamforce '15!
It was helpful for me, so I hope this is also of help for you.
The Lightning Experience Developer Trail takes you through 5 modules to show you an overview of the different points of view of the new Salesforce development approach:
- Lightning Experience Basics
- Lightning Experience Development
- Visualforce & Lightning Experience
- Lightning Components
- Lightning Design System
I consider it quite important to highlight that the Lightning Experience is not fully terminated and rolled out to the whole platform at the time of writing this post (September 2015), and even if it brings new capabilities that weren't available before, it is still "Work In Progress" and it doesn't support all the features that Salesforce Classic does at the moment.
In Salesforce's own words: "Lightning components are still in their infancy and not all the features you’re used to in Visualforce are fully supported yet."
Just be patient and let the Salesforce team do their job. We'll definitely be getting updates from them with the progress through the usual channels...
This is what you can expect from each of the Modules. As usual, you will earn some new badges and you can win up to 5800 points!
Lightning Experience BasicsFind out about what the Lightning Experience is and how it's different to Salesforce Classic. View examples of the look and feel of the new interface.
Get advice on how to decide whether the new experience is right for you.
Instructions on how to enable it in your ORG.
Lightning Experience Development

An overview of the impact of the new User Experience on the typical Developer tools, like Apex, the API, Visualforce, and others.
Recommendations on what technology you should use depending on the requirements of your application. One of the features from the Lightning Experience I'm more excited about is the fact that you don't have to worry about compatibility accross devices and browsers, it's all taken care of for you!
Guidance on what to do with Packaged applications or the Apps in the AppExchange to accommodate the new Lightning Experience.
Visualforce & Lightning Experience
You will find out the ways in which you can keep using Visualforce within the Lightning Experience.
Set up your work environment for a better development experience: code editor, page viewers and review in multiple environments.
Discover how Visualforce pages behave when running in Lightning Experience and how to share them between both experiences, as well as the styling considerations to bare in mind.
Lightning Components
This module describes what Lightning Components are and how the new Lightning Components framework differs from the Visualforce one. Prepare for a good 4 hours of exciting training with this module, because this is where you will write some actual code and connect your Trailhead to your Developer ORG to create some Lightning Components.
An overview of the different techniques available for Lightning Components is given in this module: server-side and client-side controllers, Apex and JavaScript...
Lightning Design System
This final module goes into the Design principals used in the Lightning Experience. You get introduced to the Block-Element-Modifier syntax (BEM) for styling your components.
Some explanations about the Grid System, that is a good way to understand the layout that your Lightning Components will use.
You will find out next the recommended ways of accessing your Data in Salesforce from your Lightning Components; and also how to include Avatars and Icons within your components.
The final activity of this module helps you build Record Home Page making use of several components!
And now you're all set to understand MOST of what people will be talking about at Dreamforce '15!
It was helpful for me, so I hope this is also of help for you.
Subscribe to:
Posts (Atom)
