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

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.