With latest announcement of Lightning Web Components, Salesforce development ecosystem(Lightning Platform) moves one step closer to using web standards of UI development.It is definitely quite welcome move,as it helps in learning and utilizing skills which are not confined to Salesforce ecosystem.
In this blog, we will be going to cover following aspects –
What is Web Components:
Web Component was a set of different technologies allowing you to create durable custom elements — with their functionality encapsulated away from the rest of your code — and apply them in to your web apps – Mozilla.
In short, prior to web components, one had to utilize an external library/ framework (like Angular, React etc.) and build your application on top of it. So essentially, your application runs on top of the external library/ framework and which in turn runs on the browser.
With latest innovations within web development world and addition of custom elements, shadow DOM (don’t confuse with virtual DOM), and content template element, browsers are now equipped to execute custom web components themselves, without needing any external library.
It can be related to running a video using HTML video component vs using Adobe Flash for running videos (not quite literally).
LWC is a New Programming Model:
Lightning Web Component is a brand new lightweight framework built on web standards. You must be wondering about web standards team and why is it being so important for Lightning Web Components then I must tell you that “Web standards are rules and guidelines established by the World Wide Web Consortium (W3C) developed to promote consistency in the design code which makes up a web page. Without getting technical, simply it’s the guideline for the mark-up language which determines how a web page. displays in a visitor’s browser window.” Since, Salesforce is committed to developing open web standards and is a member of the World Wide Web Consortium (W3C), it has become important encouraging development around web standards on Lightning Platform.
Why should I switch to LWC programming model:
This is a question which I would love to answer. This question has become relevant to every developer / Salesforce partner after release of this one more new programming model for Salesforce development. Salesforce customers who were planning to roll-out Lightning Experience in their Salesforce org had plans to convert Visualforce pages and components into Aura Components but now they are wondering why is this new LWC launched when they already had Aura Frameworks. Do they need to revisit their plans to switch to Lightning Web Components? Here is the answer of your question –
Benefits of using LWC:
There are still some unanswered questions here: