Wiring the client-side to the server using Apex controllers

So far, we have learned how to write client-side JavaScript controllers and helpers. In this section, we will learn how to wire client-side calls to the server-side Apex. Apex is an object-oriented programming language similar to Java. Apex allows you to write database logic and queries such as stored procedures. This section assumes that the reader is familiar with Salesforce Apex programming.

In your Salesforce org, whitelist Google APIs via Remote Site Settings for the following application so that your org can reach out to the YouTube API. The navigation path is Setup| Security | Remote Site Settings

The following screenshot shows the Remote Site Settings:

The code to search ...

Get Learning Salesforce Lightning Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.