Lightning Strikes the Web: Unraveling the Open-Source Majesty of Lightning Web Components

In the boundless universe of web development, the pursuit of robust, scalable, and dynamic solutions is relentless. The emergence of Lightning Web Components (LWC) shines a beacon of innovation, offering a groundbreaking open-source framework that is revamping the way developers perceive and interact with web components. This elucidation will navigate through the multiverse of LWC, spotlighting its open-source essence, architectural elegance, and transformative impact on the web development odyssey.

Section 1: LWC — A Symphony of Open-Source Brilliance

1.1 Essence of LWC

LWC is not merely a framework; it's an open-source revelation that enables the crafting of fast, lightweight, and reusable web components. It is a harmonious composition of modern web standards, enhancing the synergy between components and leveraging the prowess of ECMAScript 6+ and Web Components standards.

Light DOM and Lightning Web Components in Salesforce

Lightning Web Components (LWC) from Salesforce are based on standard Web Components built using HTML and JavaScript. They are lightweight, easy to build, and perform well in modern browsers. When building LWCs, you’ll become familiar with the concept of composition: piecing together simple building-block components within the body of a more complex component.

Regarding composition, LWC leverages the Shadow Document Object Model (DOM) web standard, which encapsulates the internal structure of a Web Component and makes it inaccessible to code and components outside of the component. The alternative to this approach is Light DOM, which Salesforce makes available in beta.

Decorators and Mixins in Lightning Web Components

It's safe to say that every modern web application these days relies to some degree on three foundational web standards: HTML, CSS, and JavaScript. While HTML has largely stabilized since the HTML5 standard, both CSS and JavaScript continue to evolve to meet developers' and users' needs.

The evolving nature of these three technologies has lead to the introduction of web components, a cross-browser solution for building complex web apps. On top of this open source standard, Salesforce developed Lightning Web Components (LWC) as a fast, enterprise-grade wrapper around vanilla web components. The result is a thin, performant, and feature-packed framework built entirely on the open web.

AURA vs Lightning Web Components

Introduction

The new platform is a breakthrough in terms of leveraging web standards. But if you’re a developer who’s new to the salesforce world, or if your org is contemplating a shift from Aura to Lightning Web Components, this article aims to get you a little closer to the answers you need for UI development.

The Basics

For those who are not familiar, the Lightning component framework was launched in 2014 by Salesforce to enable large scale client-side application development on the web. It came with its component model and its modular programming model. From an application perspective, the Lightning Component framework is a UI framework that you can use to develop SPAs (Single Page Applications) for mobile and desktop devices. A Salesforce Developer builds lightning components and a Salesforce administrator assembles the lightning components and creates a lightning page.