Lightning Web Components vs Aura Components

Have you watched Batman Begins?

After seeing it, while coming out of the theatre did you tell yourself the movie is at it’s best and it cannot get better than this?

Then comes The Dark Knight, did you experience the same emotions that you went though when you watched Batman Begins?

And that's not it — The Dark Knight Rises comes into picture and the same thing happens again.

Looks like Salesforce is also focusing on giving the same experience to its developers.

When Visualforce was introduced and when it got matured as a product, we thought, this is what I have been looking for and we would have told ourself it cannot get any better than this.

If you are someone from Java background and if you have had implemented Struts for frontend, Hibernate for ORM and Spring for business logic, you might understand what am trying to say.

And then, Lightning Experience was introduced!

Though the learning curve was a bit steep, once we got a hang of how things work we started loving Lightning Components (which is Aura Components now) we were convinced that this is the next big thing that happened in Salesforce ecosystem and it cannot get better than this.

Recently, Salesforce tried recreating the same magic again and it launched Lightning Web Components.

Lightning Web Component is not based on MVC framework rather it’s a Component based framework.

In component based approach, we will try to be break the functionality into individual reusable chunks and we will be focusing upon building dynamic UI using the framework.

Lightning Web Components vs Aura Components

You might be thinking why Salesforce had to create a framework from scratch when they already have a Component based framework i.e Aura Components.

That's because, when Aura Components were launched JavaScript was not as matured as it is today. With the release of ES6 I can confidently say the way web works started changing.

With Aura Components we tend to write Lightning specific code and the framework converts that to native JavaScript. Where as with Lightning Web Components we will be writing native JavaScript and that way will be having complete power in our hands.

Do I have to learn Aura Components to understand Lightning Web Components?

Well, it’s not a prerequisite!

For every concept that you have in Aura Components you have an equivalent in LWC. So if you have a good understanding of Aura Components then ramping up your skills in LWC becomes lot more easier.

Having said that, there is a good possibility that you might end up working on a project where you have both Aura components and also LWC and in that case having better understanding of both the frameworks will be extremely helpful.

So my take here would be, learn Aura Components and then jump on to LWC.

Suggestions before I learn LWC?

If you are someone from non JavaScript background you might feel the learning curve a bit steep and my advice here would be just stick to it, because once you understand it am sure you are gonna love it.

In case you need any help ramping up your skill set with in Aura Components or in LWC you can subscribe to my courses.