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

Top comments (23)

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

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.