DEV Community

Milecia
Milecia

Posted on • Updated 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

Oldest comments (23)

Collapse
 
tux0r profile image
tux0r

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.

Agreed.

Collapse
 
maxwell_dev profile image
Max Antonucci

I agree about having more fundamental JS knowledge coming in handy. I see JS frameworks having a multiplier effect - the more JS you know beforehand, the more the benefits of a JS framework will be multiplied.

One recent example is my work with the Ember framework at work. The framework gives good patterns for managing component state and related data to this state in their "controllers." But foundational JS knowledge helped me better see the limits in these controllers. A coworker used a combination of import/export, JS classes, and object-oriented programming to better abstract and manage some data complexity in a way that split the code more and made it reusable. It was standard JS used to make even better use of that framework.

Collapse
 
adityasridhar profile image
Aditya Sridhar • Edited

Agree. Knowing the fundamentals of html, css and javascript is very important :)

But that said, the frameworks help in building apps quickly.

My approach is generally to understand the fundamentals first and then to start learning a framework to build apps quickly :)

Collapse
 
smuschel profile image
smuschel

You should always know the base technologies - I totally agree with that. For as long as I remember there have been frameworks and they can greatly simplify your life (and sometimes make it really miserable). But as long as you know your way around in the technology your using, you should be fine.
I'm not really coming from the Javascript world, so I'm constantly amazed by the vast number of frameworks (probably annoyed would be the correct word here). It's really hard for me to choose the right one. The customers I work with are used to technology that's been around for more than 30 years, so they tend to be terrified by frameworks, that might be dead in three years time - but that's a different story.

Collapse
 
xortype profile image
xorType

Yup. Im all about reuse but please learn the language. Bad, bloated, and unnecessary JavaScript is killing the overall web experience. Nodejs is beast mode in an good way but you also need to know the architecture patterns applied.

Collapse
 
spirodonfl profile image
Spiro Floropoulos

Well written. I think you're striking a good tone here. I believe there's a glut of libraries out there and it's all too easy to pick any one up off the shelf and run with it.

On the one hand, someone saved you some time.

On the other, you haven't really learned anything.

If you can find a balance between just grabbing what's there versus actually learning how to wrangle with a language at its core, you're probably on a good path.

Collapse
 
cagta profile image
Çağatay

You made a point in a good direction. I strongly agree with you. While we are talking about JS. I would like to mention that there is an excellent book in GitHub about JS. Check it out! (github.com/getify/You-Dont-Know-JS)

Collapse
 
picocreator profile image
Eugene Cheah • Edited

We been at this problem before, multiple time... even at stackoverflow... where there was a recurring joke of jQuery being able to answer anything in JS.

The downside since then, we have an entire generation worth of JS programmers who is stuck on jQuery and can never seem to move beyond them, as they never learnt the foundations of it. And will be stuck in its paradigm of thinking.

Sure, I may love vue or react now.... But who's to say 5 years down the road, with HTML10, all of it wouldn't be obsolete?

Sadly it seems us humans, are doomed to repeat past failures >_<

Collapse
 
jonrandy profile image
Jon Randy 🎖️

Agree 1000% with this. I've seen so many developers dive straight into using a framework when the project involved really does not require it. I suspect this is often because their knowledge of 'the basics' of front end development (and possibly development in general) are limited and they're not confident outside of a framework.

This is probably one reason why a huge amount of sites these days are massively over-engineered and bloated with a ton of unnecessary code that is dragging the efficiency of everything down

Collapse
 
gypsydave5 profile image
David Wickes
Collapse
 
differentsmoke profile image
Pablo Barría Urenda

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.

I find the overall idea of learning the foundations vitally important for a healthy developer experience. However, I think one of the fundamentally misunderstood aspects of programming is that it is a craft more than a science.

You learn by doing, and frameworks help you do more with less, making it a more rewarding experience. They can also allow you to do useful stuff earlier on, which is key for motivation. Many concepts in programming can seem baffling until you experience them "in the wild". Higher level tools, of which frameworks are an example, can precipitate that.

To me, one of the key pedagogical benefits of computers is that they allow us to interact with complex models without having to understand them first. This is not at odds with foundational knowledge, but rather a key complement that will eventually ease its acquisition, since we can get "a feel" for things before we know them rigorously.

So I'm not saying you should start with frameworks, but delaying their incorporation until "you can write an app from scratch" seems like too late (of course, that depends on your definition of app).

Collapse
 
lauriy profile image
Lauri Elias

Angular - maybe for Google. Not for anyone else. First month will go to reading their horrible documentation.

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.

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
 
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