What are Lightning Web Components?
Prior to delving into the specifics of Lightning Web Components, what are they? First, let's comprehend about Web Components.
A collection of web platform APIs known as web components give
you the ability to design new, reusable, encapsulated HTML tags for usage in
web pages and online applications. Custom widgets and components can be used
with any JavaScript framework or library that supports HTML and can be built
upon the Web Component standards. They are compatible with most current
browsers.
In 2011, Alex Russell, a Google developer, debuted the idea.
The Web Components standard's initial V0 version was created
in 2013 by Google and the Chrome team.
Everything changed between 2016 and 2018, when Google released
the Web Components V1 standard.
Why Web Components?
Assuming we choose a framework now and decide later on to
switch to a different one, sharing business logic and functionality across
several projects, this could frequently need us to rewrite tools and
capabilities to accommodate new services or projects.
Here's when Web Components are useful. With the help of a
technology called Web Components, we can develop tools and features that
operate with any framework and any browser and are based on a widely recognized
standard.
Now that we have a fundamental understanding of what web
components are, let's move on to our discussion topic. Lightning Web
Components: What Are They?
Currently,
the "Lightning Component Framework" and the "Aura Component
Model" have been used to build lightning components. Similarly, the
"Lightning Web Component Framework" can be used to build lightning
components.
A new
programming model called Lightning Web Component Model was created with the
help of contemporary JavaScript and HTML Elements. In addition to utilizing the
new language structures available in ECMAScript 7 and beyond, it makes use of
the fundamental web component standards as well as custom elements, templates,
decorators, modules, and shadow DOM.
"Salesforce
Extensions for Visual Studio Code" is needed to build LWC, and
"Salesforce CLI" is needed to deploy LWC to an organization.
Why Salesforce has come up with Lightning Web Component Framework?
Previously,
Salesforce developers used Apex for database operations and Visual Force pages,
an HTML Tag-based markup language, to create web pages. However, Visual Force
4px;"> pages were incompatible with building complex apps and
large-scale enterprise solutions.
Salesforce
introduced the "Aura Component Model" and "Lightning Component
Framework" in 2014. These tools are used to create intricate and
large-scale enterprise solutions.
The full
stack that developers require to create large-scale web applications was not
fully supported by web standards in 2014. These included events, rendering
engines, standard elements, and a core language (ECMAScript 5). Crucial
components such as a component model, templates, modules, and shadow DOM were
absent from the web standards.
Since
then, web components have significantly improved, and salesforce switched from
the "Lightning Component Framework" to the "Lightning Web
Components Framework" in order to maintain the pace and standardization of
web components in response to the overwhelming demand for web components across
the internet.
Any model can be used to build components, which can then be
arranged on the same Lightning page. Security, LDS, and Base lightning
components are utilized by both the Aura and LWC components.
LWC vs AURA:
The benefits of utilizing LWC instead of AURA are listed
below.
Enhanced efficiency
quicker-loading websites
Improved testing, security, and browser compatibility
Utilizable under AURA.
Important points to
note:
1) LWC and the aura component can coexist on the same lightning page.
2) The Aura component may contain LWC.
Comments
Post a Comment