Book Image

Learning Salesforce Lightning Application Development

By : Mohit Shrivatsava
Book Image

Learning Salesforce Lightning Application Development

By: Mohit Shrivatsava

Overview of this book

Built on the Salesforce App Cloud, the new Salesforce Lightning Experience combines three major components: Lightning Design System, Lightning App Builder, and Lightning Components, to provide an enhanced user experience. This book will enable you to quickly create modern, enterprise apps with Lightning Component Framework. You will start by building simple Lightning Components and understanding the Lightning Components architecture. The chapters cover the basics of Lightning Component Framework semantics and syntax, the security features provided by Locker Service, and use of third-party libraries inside Lightning Components. The later chapters focus on debugging, performance tuning, testing using Lightning Testing Services, and how to publish Lightning Components on Salesforce AppExchange.
Table of Contents (22 chapters)
Title Page
PacktPub.com
Foreword
Contributors
Preface
Index

Chapter 5. Events in the Lightning Component Framework

The Lightning Component framework is based on the event-driven model. For two components to talk to each other, the framework recommends using Lightning events. In an event-driven modal, one component acts as a publisher (publisher components register and fire events), and one or more components can subscribe to published events and take action. In the Lightning Component framework, there are two primary types of events: application events and component events. Events are created in a separate file, with an extension of .evt. Events in Lightning can also consist of attributes, which allow events to carry data from one component to another.

In this chapter, we will cover the following topics:

 

  • Native browser events, and how they differ from Lightning events
  • Application events in Lightning Components
  • Component events in Lightning Components
  • An example component that illustrates how to use application events