How toInstall – Salesforce Developer Experience (DX) – Salesforce Certified Platform Developer I Study Guide

10.3 How toInstall

Here’s a step-by-step guide to installing Visual Studio Code, Salesforce CLI, and the Visual Studio Code plugin for Salesforce development.

\ 1.\ Install Visual Studio Code

Visit the official Visual Studio Code website at ­https://code.visualstudio.com/.

Download the installer for your operating system (Windows, macOS, or Linux).

Run the installer and follow the on-screen instructions to complete the installation.

\ 2.\ Install Salesforce CLI

Open a terminal or command prompt.

Visit the Salesforce CLI website at ­https://developer.salesforce.com/tools/sfdxcli.

Follow the instructions to download and install Salesforce CLI for your operating system.

\ 3.\ Configure Salesforce CLI

Open a terminal or command prompt.

Run the command “sfdx force:auth:web:login” to authenticate with your Salesforce org.

Follow the instructions in the browser to log in and authorize the CLI.

\ 4.\ Install Visual Studio Code Plugin Step 1: Open Visual Studio Code.

Click on the Extensions icon on the left sidebar (or press Ctrl+Shift+X).

Search for “Salesforce Extension Pack” in the Extensions marketplace.

Step 2: Click “Install” on the Salesforce CLI and Salesforce Extension Pack.

Wait for the installation to complete.

Step 3: Connect Visual Studio Code to Salesforce Org:

Open a terminal or command prompt.

Run the command “sfdx force:auth:web:login –alias myAlias” to authenticate with your Salesforce org and set an alias for the org.

A browser window will open, prompting you to log in to your Salesforce org.

Log in with your Salesforce credentials.

The Salesforce CLI will exchange the code for an access token and a refresh token. Once the process is complete, the Salesforce alias will be stored in your local environment and can be used to connect to your org in Visual Studio Code.

CHAPTER 11 Salesforce Lightning Platform

11.1  Lightning Component Framework

Lightning Component framework is a previous development framework provided by Salesforce for building dynamic and responsive web applications and user interfaces on the Salesforce platform. The Aura framework is the underlying technology that powers the Lightning Component framework. It’s a client-side framework that allows you to create reusable components, and it’s a fundamental part of Salesforce’s Lightning Experience, which provides a modern and streamlined user interface. The Lightning Component framework provides a lot of out-of-the-box components that can be reused, and it is an event-driven architecture. Components basic structure can contain HTML, CSS, JavaScript, SVG files, and Documentation.

Key features of the Lightning Component framework include

–– Component-Based Development: The framework is based on a component-based development model, where developers can create reusable components that encapsulate functionality and can be easily combined to build complex applications.

–– Event-Driven Architecture: Components in the Lightning Component framework communicate with each other using events, allowing for loose coupling and easier integration between components.

–– Easy Integration with Salesforce: The Lightning Component frame-work integrates seamlessly with the Salesforce platform, allowing developers to leverage the full power of Salesforce’s features and capabilities.

–– Responsive Design: The framework provides responsive design capabilities, enabling applications to adapt and provide an optimal user experience across different screen sizes and devices.

–– Low-Code and Pro-code Tools: Developers can use both low-code tools, such as Lightning App Builder, and pro-code tools, such as Apex, to increase productivity and customize applications according to specific business requirements.

–– Supported by Salesforce: The Lightning Component framework is still actively supported by Salesforce, ensuring regular updates, bug fixes, and compatibility with the latest Salesforce releases.

However Lightning Web Components offer as a new standard several advantages over Lightning Components, including improved performance and better integration with modern web standards.

Visualforce is an older framework that was introduced by Salesforce before Lightning Components has been in use for many years. It’s still used primarily with Salesforce Classic. It is based on the Model-View-Controller (MVC) architecture and uses a server-side rendering approach. But this topic is beyond the scope of this book.