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

JavaScript controller and helper


Lightning Components are not just static markup; they interact with Salesforce data to send data back and forth between a browser and Salesforce servers.

JavaScript is used in web applications to add interactivity to web pages. It allows you to manipulate DOM elements (by applying new styles, removing styles, changing HTML markup), communicate with the server to send data back and forth, or pass data to the server, add animations, add visual effects, add audio effects, and many other things.

A Lightning Component bundle comprises JavaScript controllers and helpers that allow you to write client-side JavaScript to add interactivity and retrieve and push data to Salesforce servers.

When you create a Lightning bundle, let's assume that the name of the component is YouTube Search component, a JavaScript controller file is created with the name youtubeSearchController.js, and a JavaScript helper file is created with the name youtubeSearchHelper.js.

Controller files...