Creating Lightning Components: Wrapping It Up

Don Robins wraps up the series on creating Creating Lightning Components, discussing some additional kinds of events in the Lightning Component Framework, and suggest some next steps of a learning path.

This series introduces you to the Lightning Component Framework through a free online course by Salesforce University combined with a six part blog series written by Don Robins, a Salesforce MVP, Certified Advanced Developer and Certified Salesforce Instructor. Each post provides deeper insight and additional perspective around topics covered by each course module.

If you read our last post (the fifth in this series) and watched Module 5: Raising and Handling Events: Part 1 and Module 6: Raising and Handling Events: Part 2, you learned the basics of the eventing model and the difference between lower level user interface event handling, and custom Lightning Event handling.

We mentioned in the last post that there were two other special kinds of events that you should get to know that aren’t covered in the course Creating Lightning Components. We’ll wrap up this series with a brief explanation of each, and then point you at some supplemental documentation and content where you can dig deeper to continue to learn more about the Lightning Component Framework.

Handling Salesforce1 Events

If a Lightning Component is instantiated in the context of the Salesforce1 app, and launched from Salesforce1 mobile navigation, it may fire off a variety of events from its JavaScript functions that will automatically be handled in the Salesforce1 app.

If you’ve been building JavaScript SPAs with other frameworks such as jQuery, Sencha or AngularJS, you know that you have to write code or markup to manage the page transitions between your various application views. These built-in Salesforce1 events do most of this for you.

Salesforce1 events activate built in handlers that are part of the Salesforce1 application to initiate transitions between your custom component and standard Salesforce1 pages and views. In addition, they can also activate related data processing actions. This allows developers to build seamless integrations between custom components and standard Salesforce1 functionality.

These events manage the following kinds of activity:

1. View, edit and save existing records

2. Navigate to an object’s Home page and view the record

2. Navigate to an object’s list views and child related lists

3. Navigate to a specified URL, and more.

It’s important to note that if your component is running in an app outside the context of Salesforce1, your custom code will need to listen for and handle these same events.

Handling System Events

Finally, there is also a collection of system level events fired off during the application and component lifecycle that can be handled by JavaScript logic in your Lightning Components. They are designed to allow your components to have awareness of what’s going on in your application. You can register and handle these events in your components as needed.

These events manage the following kinds of activity:

1. Whether the application or component rendering has completed

2. Whether the framework is in a wait state for render or request completion.

3. Whether the URL root location has changed

4. If there were security constraints found on a request, or whether a system error has occurred

5. Whether some value has been initialized, changed or destroyed

You can see that eventing in Lightning has many, many flavors and moving parts. Embrace the capabilities provided that support rich custom functionality to create robust applications.

Where to Next?

The Lightning Component Framework’s loosely coupled architecture will allow you as a developer to raise the quality and sophistication of your applications to the next level. We hope you’ve gained a basic understanding and overview of its capabilities from the online video course and this series of posts.

There is an ever growing library of documentation, articles, blogs, tutorials and instruction rapidly evolving around the Lightning Component Framework as this is being written.

Here are a few to get started with:

1. Lightning Content on the Salesforce1 Developer Portal

2. The Lightning Component Developer Guide

3. The Lightning Components Trailhead Module

3. Follow Lightning content from my fellow MVPs and Advanced Developers such as Jeff Douglas, Peter Knolle, Daniel Peter and others.

4. Read articles and watch webinars by Developer Evangelists such as Pat Patterson, Peter Chittum and the rest of the Developer Relations team.

5. Listen to the Cloudlife Podcast #37 recorded on the last day of Dreamforce-14 where fellow MVP Matt Morris and I discuss the introduction of the Lightning Framework.

6. Join the recurring Lightning Components Office Hours webinars (current as of June ’15) to ask questions directly to the LC product management and development team (or just lurk.)

7. Watch for more Salesforce University Instructor Led Training on Lightning (coming Fall 15)

I heartily recommend that you dig into all of the available content, and encourage you to keep an eye out for more on the way.


Related Content

Creating Lightning Components online course

Blog Series:

Creating Lightning Components: Single Page Applications (1 of 6)
Creating Lightning Components: The Bundle as Scaffolding (2 of 6)
Creating Lightning Components: Action Processing and Binding Data (3 of 6)
Creating Lightning Components: Component Based Architecture (4 of 6)
Creating Lightning Components: Events and Messaging (5 of 6)
Creating Lightning Components: Wrapping It Up (6 of 6)


About the Author

Don Robins is a Force.com MVP, Certified Advanced Developer and award winning Salesforce University Certified Instructor. Since 2010, he’s been delivering the core development curriculum to hundreds of customers in both public and private workshops for Salesforce University in the US and abroad. As an independent Training Delivery Partner through his company Forcementor.com, he leads and mentors a team of certified Salesforce instructors, curriculum developers and technical authors. He found his way onto the platform as a consultant and developer in 2009, after two decades of building custom business applications with a metadata, framework-based approach. Ever since, his primary focus has been to educate developers and the business community on Salesforce1 and to evangelize the platform.

Published
May 27, 2015
Topics:

Leave your comments...

Creating Lightning Components: Wrapping It Up