Code By Code – LWC – Chapter 1 – Why Lightning Web Components?

Code By Code – LWC – Chapter 1 – Why Lightning Web Components?

Lightning web components, a new way to develop Lightning Components has gone live in Spring19 (Feb -2019) release of Salesforce. What was the need for it? When we just got comfortable with Lightning/Aura framework development, do we really need LWC? Let’s find out.

Chapter 1 - Why Lightning Web Components?

The simple answer is, Yes, we need LWC and the reason is to leverage more web standards rather than framework layers to build these components, which results in faster components.

When Lightning Components (from now on Aura Components) and framework were introduced back in 2014, the web standards were not evolved much, making it almost impossible to create reusable components. Let’s have a look at the web standards back in 2014:

Web Standards In 2014 (EcmaScript 5)

Custom framework came in the picture to fill this gap. Component-based frameworks allowed us to develop reusable components which can be used at multiple places.

Each framework came with its own way of writing these components with different syntax and methodologies. Aura framework was part of this league and allowed Salesforce developers to create these awesome reusable components.

This had been tough on developers for sure since to create these components, they had to learn the complete framework first, they had to learn the syntax, methodologies and best practices.

Only if there was a standard way of writing these components, phew!!

Well, now this is possible. Web technology has evolved, new EcmaScript modules being released, and with all these, new web standards being introduced. Let’s have a look at present web standards:

Web Standards Now

 

If you have a look, everything you need to develop these components is now part of standard web-stack., which means, we do not need frameworks to build reusable components anymore. It comes with many advantages:

– Leveraging standard web-stack features definitely boost the performance as there is NO heavy framework JavaScript is running.
– Learning LWC would be easier as it based on web standards.
– LWC works pretty well with existing Aura Components, which means LWC components can interact with Aura Components. You can place LWC and Aura Components on the same page.

In the next chapter of this code by code guide, we will learn more about LWC and will start developing our first LWC component.

Manish Choudhari

I am a certified Salesforce Application & System Architect and Developer working on Salesforce Technology since 2014. Currently, I have 14 Salesforce certifications along with OCPJP (Oracle Certified Profession JavaSE6 Programmer) working in Salesforce.com Hyderabad as a Technical Engineer. Writing technical blogs, learning new technologies and frameworks and sharing knowledge is my hobby.

This Post Has One Comment

Leave a Reply

Close Menu