DEV Community

Milecia
Milecia

Posted on • Edited on

You shouldn't focus on learning JavaScript frameworks

JavaScript frameworks are incredibly hot right now. You've probably heard of the most popular two: Angular and React. They can really help speed up the development process and they do a good job of separating responsibilities in the code. So why shouldn't you focus on them if they're so great?

It's not that you shouldn't learn them. You should just spend more time making sure you are proficient in HTML, CSS, and JavaScript/TypeScript. When you know these foundational web development languages, then you can use the true power of the frameworks.

The problem is that many people start learning web development within a framework and when you take them out of the one they know, it's really hard for them to shift gears. That's mainly because what they know about HTML, CSS, and JavaScript/TypeScript comes from the context of the framework. When you can use the main web development languages alone, you can jump into any framework and start figuring out how to work with them.

For example, Angular works with components and each component can have its own HTML, CSS, and TypeScript files. What most people overlook in the beginning is that you still have to know how to write the code for those files even if they come pre-loaded from a template.

Again, that's not to say that you shouldn't learn the JavaScript frameworks. That just shouldn't be your main focus until you feel like you know the base languages well enough to write a web app from scratch. You'll find out in some cases it might be easier to write the whole thing from scratch after you deal with the updates to the different frameworks.

Which brings us to another point. JavaScript frameworks can have updates that make everything you know about them irrelevant. Angular has changed so drastically over the past few years that Angular 1.x has close to nothing in common with Angular 6.

But the two versions do have some things in common and I bet you can guess what they are: HTML, CSS, and JavaScript/TypeScript. So spend some time learning how the frameworks work so that you can use them, but make sure you understand the guts behind them first.

Not only will it help you write more efficient code, you'll be able to jump into any JavaScript framework and start making meaningful changes. The hype behind the different frameworks is definitely deserved because they can be great, but like everything else in web development they come and go and have major releases.

What's been your experience with JavaScript frameworks? I've worked mainly with Angular and I want to throw my computer out the window love it. Anybody using React or any of the others?


Hey! You should follow me on Twitter because reasons: https://twitter.com/FlippedCoding

Latest comments (23)

Collapse
 
thegreytangent profile image
Jason V. Castellano • Edited

Yeah, I agree. In my experience, its very tempted to use the framework in a project once you learn it. The problem is there are many existing legacy system out there. You cannot rewrite the code for the purpose of using the framework. You need to adapt to their system and improve their code without using frameworks. Therefore, fundamentals and techniques in software engineering are the priority rather than frameworks.

Collapse
 
mehdiraash profile image
Mehdi Raash

Totally agreed, however the title of this post is quit irrelevant to the main subject.

Collapse
 
jaypersanchez profile image
JayLan DApps

This article balances the argument between learning the basics before jumping into a framework. Framework can be obsolete and can constrain true understanding of a language. The other challenges that I'm finding out there is one place looking for Angular or React and all, does not accept that you are efficient with vanilla Javascript...you must have this and that. Which I find really too bad.

Collapse
 
dijiflex profile image
FELIX OMUOK

Great article

Collapse
 
zphunk08 profile image
zphunk08

This is the best article I have read in awhile and I agree with you. Everyone wants an angular, react, or vue developer. I stopped asking for specific backgrounds in candidates and get back to the basics during the interview process. I've hired far better developers as a result. Thank you for articulating this so succinctly!

Collapse
 
jrohatiner profile image
Judith

Agree with you completely! If you don't have a good foundation in the top three frontend languages, you will experience a lot of frustration. It looks easy enough to grab a framework and use a starter repo to speed up workflow; but if you are trying to create specific features that are not in there right out of the box, you are likely to get into a big mess. And if you don't have a strong knowledge of programming to begin with, its likely that you will be trying to learn along the way. This usually makes the documentation impossible to follow or get your solutions from. That's called "going down the rabbit hole".

I say this only because I have seen it frequently and always suggested "deep learning" first; followed by "practice, practice practice".

@cagta suggested a great book by Kyle Simpson, "You don't know js" and I also highly recommend it. It has been called the "Frontend Developers Bible" and I tend to agree with that.

The takeaway here is: There are no shortcuts.

Collapse
 
tomhermans profile image
tom hermans

frameworks often let you hit the ground running, are often compiled by people more knowledgeable and contain a lot best practices. By that I mean, you learn a lot of them. And eventually you see limitations and are more knowledgeable to solve these yourself. Not to mention the DRY spirit.

Collapse
 
dancombs profile image
dancombs • Edited

I HATE FRAMEWORKS!!! Back in the day...it was a pain to reference a bunch of libraries. But the deployment was simple and rarely did web apps need continuous library dependency updates besides bug fixes. Back then...it was simple and it WORKED.

Fast forward 15 years - you have to install crap A, then crap B, then upgrading crap B forces to install module crap C. I don't think I need to elaborate since we all have been there.

So your NPM app has over 100 dependencies and guess what? Moving Node version f*cks up a good portion of the libraries and you end up playing the lotto game - "guess what EXACT version of module A needs to make module B compile".

DEATH TO FRAMEWORKS!!!!!

Collapse
 
dirkncl profile image
Dirk Levinus Nicolaas

I agree with you

Collapse
 
dangolant profile image
Daniel Golant

I think even outside of the frontend context, Frameworks can be a bit dangerous. I write RoR at work recently, and if you showed me a method or piece of code, I wouldn’t immediately be able to tell you whether it was a Ruby builtin, or a “Rails thing”. If you don’t already know that distinction, or don’t have sufficient experience to pattern match where the language/Stdlib ends and the Framework Magic begins, finding the answer can be really hard, because it’s not necessarily easily google-able. That’s a bigger problem (for me) with Rails than with any other ecosystem I’ve been in, but as frameworks start to envelope more of the core language/APIs and capture more devs, I think they’ll run into that same issue.

Collapse
 
ecemac profile image
Ece

That is EXACTLY what I'm doing right now. The course I took skipped vanilla JS completely and went straight to jQuery, which was kind of okay when I senselessly used it. But when I stopped and actually tried to understand what I was doing, my brain shut itself down. So I'm back to the start now but I know it will help me big time. After I conquer JS I want to try React rather than Angular though.