DEV Community

Dan Silk
Dan Silk

Posted on • Updated on

Why You Should Use a Web Framework

Whenever I see a comment like this one: "frameworks are making you all into bad developers," I figure the author just interviewed someone who couldn't answer basic questions or came out of a meeting where a junior dev suggested React for a splash page.

What is a Framework?

I think the definition that applies to us web developers is this:

framework: a basic structure underlying a system or concept.

A framework serves as the foundation of the website. It provides all the basic functionality that most websites need.

Is it easier for beginners to use a framework?

Frameworks are usually very opinionated about things like code organization, programming concepts, language, structure, tooling, etc. This isn't a bad thing because you choose a framework for this reason. You want a framework that conforms to your idea of how web development should be done.

And if you are a beginner, you have no opinions yet so the framework was probably chosen for you. As you get into it, you will find yourself saying, "oh, that's why they do that!" or "why didn't they do it this way instead?" This is good because that means you're learning!

Is it really hard without a framework?

Building websites is not rocket science so it's not really that hard to do it from scratch, but frameworks exist because, aside from time and money, it's very easy to get things wrong. If you DIY it, then I guarantee you will forget something that will eventually come back to bite you in the ass.

I would agree if someone said don't use a new framework. Test-drive new frameworks for prototypes and such, but use stable, reliable, and tested frameworks for your real-world projects.

Shouldn't I Learn the basics, not someone's abstraction?

The short answer is yes, please learn the basics. But...

...good frameworks enforce and, in some cases, introduce best practices.

...good frameworks have lots of community support. You can almost consider all the people involved in building the framework as part of your dev team.

...good frameworks are modular so you don't have to load a lot of unnecessary code just to get the bare minimum required to work your site. A lot of people mention Bootstrap when talking about why you shouldn't use a framework, but Bootstrap is fairly modular so you really don't have to load everything to make your site look great and work well. You just need to learn how to use it.

Everyone Has an Opinion

As for the article I linked above, the one thing the author said that I agree with 1000% is this:

Don't learn how to build React with Redux with Bootstrap with JQuery, learn HTML, CSS and JavaScript. ~ David Wickes

I've interviewed a lot of front-end developers and I cringe every time one of them uses jQuery interchangeably with JavaScript. Don't do that! Especially in an interview.

When someone says "don't do this" or "do that," take that with a grain of salt. Unless it's your boss and you don't have a good counter-argument.


Form your own opinions.

But, most of all, do your job in the time allotted, in the best way you know how, and always ask for help when you need it.

The opinions expressed here are not meant to offend or otherwise hurt anyone. It's just my 2 cents.

Top comments (6)

patricklafferty profile image
Patrick Lafferty • Edited

Both of you raise some good points. One thing that you both alluded to but didn't directly address is context. Actually on second reading, the linked post almost gets there but its still worth expanding on. I think it's important to learn not just the basics but have a very solid grasp of the 'vanilla' language and it's standard libraries, so that when you do use frameworks you can put them into context.

What I mean is that there are a lot of people who, like you mentioned, only know jQuery and don't know that the language they're writing in is JavaScript, or only know $FRAMEWORK and have no idea what comes standard with the language. When the time comes to switch frameworks, they get lost because they don't know where $OLD_FRAMEWORK ends and $LANGUAGE begins. So instead of thinking in terms of "I used $FEATURE in order to make X possible/easier in $LANGUAGE, now how can I do X in $NEW_FRAMEWORK", it becomes $OLD_FRAMEWORK-context-based like "I needed to do $FOO in $OLD_FRAMEWORK, how do I do that in $NEW_FRAMEWORK", without knowing that $FOO was required by the framework instead of the actual problem. Essentially the X-Y problem, wanting to know how to translate the solution instead of understanding why it was needed in the first place, because they have no concept of anything below the framework.

silkster profile image
Dan Silk

As one of my coworkers said: “Using the right technology for what you're solving, revolutionary.”

lluismf profile image
Lluís Josep Martínez

How can you not know Javascript if you use jQuery? In any case, you won't know the DOM API but that's all.

silkster profile image
Dan Silk

It's baffling, right? I guess it's easy for someone with no dev experience to learn how to query the DOM with jQuery. They technically are using JavaScript, but they think it's just jQuery. You'd be surprised how many people think this way.

reegodev profile image
Matteo Rigon

Was looking forward to a post like this since the other post raised so much attention.

Don't learn how to build React with Redux with Bootstrap with JQuery, learn HTML, CSS and JavaScript.

This is the holy grail. If you dont learn the underlying language its like buying a sports car without a driving license.

When i use a framework and something doesnt work as i expected i usually CMD+click the incriminated function and follow through the source code till i understand what it does exactly and why in my case it didnt work.

Properly knowing which framework APIs to use gives a good boost to productivity but knowing what they really do internally is a game changer when also taking into account performances, which in my opinion is the biggest difference between average and good devs.

silkster profile image
Dan Silk

Absolutely! I often read through API code just to see how it works. This is one of the best ways to learn something new and I highly recommend it. Seeing how other people write code really helps me improve my own understanding and skills.