Monday 14 September 2015

Lightning Experience Trailblazing!!!

In a special global broadcast, Salesforce recently launched the 'The new Salesforce'. This new Salesforce came in the form of the 'Lightning Experience', a new, responsive, crisp UI, that takes your existing Salesforce data and presents it in a much more modern graphical manner. It's responsive, and aims at providing a unified experience and appearance across all your devices, from watch to phone to tablet to desktop. Check out the introduction and demo video from the Salesforce website.

This announcement was great, it left users looking forward to getting started with the new interface. However, as a developer during this initial presentation I had a lot of questions; What does this mean for all the Visualforce I've written? How do I make my pages look like they belong in Lightning? Do I need to build two versions of everything (Lightning Exp. and Classic) in order for stuff to work for everyone? Are there any kind of code techniques and tweaks I use at the moment that won't work anymore?

Fortunately though, answers weren't far behind, as Salesforce Developers released several new Trailhead learning tracks that address these questions, respond to common concerns and let you get hands on with building some Lightning Components for the new UI. For those have never used Trailhead before, it's an amazing learning tool that provides Salesforce users from all walks of life (CRM User, Admin, Developer) with exercises, both written and practical, for learning more about how to make the most out of Salesforce. There are four new trails (with shiny badges) to get your teeth stuck into:


The two admin trails guide you through the process and best practice of moving your existing Salesforce Classic organisation over to Lightning Experience, and explore how to use the basic features of the new UI once you have made the switch. The Sales Rep trail takes you through the experience from an end user perspective, showing how to use the new features to make better sales. The developer trail includes elements of the admin trails, but also explores how to manage your existing custom coded functionality and build new apps effectively in the new UI.

Although all four are definitely worth doing no matter what your role is, as a developer the one trail your should definitely tackle, unsurprisingly, is the Lightning developer track. Taking a closer look, the track consists of 5 different modules, each of which provide a different view of the Lightning Experience and answer different questions you may have.

Name Content Questions it answers


Lightning Experience Basics
An Overview of the new UI, and what it means to both new and existing Salesforce organisations. Includes tips on how to conduct a gap analysis when considering making the switch to the Lightning Experience, before turning it on.
  • What is Lightning Experience?
  • How do I know if my organisation is ready to make the switch?
  • How do I turn it on?


Lightning Experience Development
Looks at how your existing use of Visualforce will be affected when using the Lightning Experience. Explains what elements will continue to work, those that do not (for now) and what elements will need reviewing.
  • Will my existing Visualforce pages still work in Lightning Experience?
  • Are there any existing paradigms and features no longer supported if I make the switch?
  • How does this affect my products as an ISV?


Visualforce & Lightning Experience
This unit goes into further detail about the relationship between Visualforce content and the Lightning Experience container it will be presented in. It also contains recommendations for styling and methods of identifying if a user is accessing the Page through each of the different UIs.
  • How will Visualforce content be presented in Lightning from a technical perspective?
  • How can I prepare a Visualforce Page for use in both Salesforce Classic and Lightning Experience simultaneously?
  • Will my Page actions and Visualforce navigational methods still work?


Lightning Components
An introduction to the development of reusable Lightning Components. This is not a new unit, but with the introduction of the Experience, has been given extra importance and greater context.
  • How do I build and style a basic Lightning Component?
  • How do I pass attributes between different Components?
  • How do I get Lightning Components to run Apex Code?


Lightning Design System
Introduced alongside the Lightning Experience, the Lightning Design System is a tool that aids in the design of Pages to make them look and feel right at home inside the new UI. This unit explores how to use the tool and how to take your app design to the next level.
  • What is the Lightning Design System and why should I use it?
  • How do get my existing apps and pages to look and behave like the rest of the Lightning Experience?
  • How can I include some cool Lightning design elements such as icons and avatars easily into my Pages?

As you can see, the trail covers a lot of ground; it includes 30 individual units, and takes around 10 hours in total to complete, so prepare to lose a few evenings or a weekend, but trust me, it's totally worth it!

From a personal point of view, what I really like about the Lightning Experience developer trail is the practical and honest way it presents the new Lightning Experience, and really gets down to the point in terms of what developers need to know. It's not a sales pitch, shouting "Lightning Experience is here, there is no effort in transition from Salesforc Classic and it makes all your existing stuff magically more amazing!". It is a frank explanation of what will definitely work, what won't, changes you will have to potentially make to existing Visualforce Pages and how to effectively develop a transition strategy between Classic and Lightning.

I also think the inclusion of the unit based around the new Design System is a great idea. In the past, I have always found it challenging to get started with designing content for mobile and Salesforce1, simply because the appearance of anything I developed didn't seem to fit 100% correctly into the look and feel of the app as a whole. The Design system gives you that boost to start developing crisp looking custom content for both mobile and content with the new UI without the hassle and instability of large quantities of highly customised CSS.

From the trail content, it makes it really obvious that Salesforce have spent a lot of time working out the best way to introduce the Lightning Experience to existing developers. It addresses a lot of the concerns developers have, and covers both the management and adaptation of what you already have, whilst also illustrating the best way to build new apps as part of the new exciting UI.

One of the only slight frustrations of the trail is that is it largely tested through questions and answers rather than practical assignments. Those are always the trails that I enjoy the most. But this is only a short term gripe, as I have no doubt more practical exercises will emerge after the feature is GA.

In summary it's a great way to introduce yourself to the new look Salesforce before it storms into orgs as part of Winter '16. So, if you haven't already, get to Trailhead and get Trailblazing! Don't forget to show off those badges!