DEV Community

Discussion on: When Should You Use A Web Framework?

Collapse
 
dkamer profile image
David Joseph Kamer

Here's the thing, you said you're new to web development.

Are you going to setup Babel to transpile everything for cross browser compatibility? Probably not, unless you use a framework. So use a framework.

Also, maybe it isn't always needed, however many who speak out against frameworks are merely uncomfortable using them, and they have trouble understanding some project, rage quit, and post terrible things about frameworks.

Lastly, if it's a standard use case that doesn't need an extra organization beyond VanillaJS, then why aren't you using WordPress (or even Wix)? There are very few situations between these extremes, and most of them are projects that will grow or single code snippets that should be componetized.

Collapse
 
snowfrogdev profile image
Philippe Vaillancourt

Here's the thing, you said you're new to web development.

Not quite, I said I was relatively inexperienced. I'm familiar with the JS ecosystem and have used Webpack, Babel, Parcel, Rollup, Typescript, NodeJS, Angular, Vue, ExpressJS, NestJS etc... but I'm no expert in any of them and have only been coding, by myself, for three years. I lack professional experience, especially in a team setting. I know the tooling enough to not have to use a framework for the sole purpose of bundling my code for cross browser compatibility.

If it's a standard use case that doesn't need an extra organization beyond VanillaJS, then why aren't you using WordPress (or even Wix)? There are very few situations between these extremes, and most of them are projects that will grow or single code snippets that should be componetized.

So, if I understand correctly, if you have a static website to build, don't even bother firing up your code editor and mess with HTML and CSS, just use something like Wix.

On the other hand the minute you start to deal with complexity and would benefit from component reuse, you reach for a framework.

What about Web Components, or light weight libraries that allow for componentization without all the added complexity and bloat of a full-fledged framework? Do you never see any situations where a project's scope and complexity is likely to hover in a way that could make that an interesting middle ground?

Collapse
 
dkamer profile image
David Joseph Kamer

I don't really see any use for HTML/CSS by themselves unless it's just to play around (i.e. not in a professional environment). You need something to transform your code to a production ready state, or you're wasting your time. What I mean is, there are tools out there like WordPress that will give you sites that you might be tempted to code with no framework, and they will do it in a way that will handle all of your cross-browser compatibility issues.

I mean if you want to go add --moz prefixes to whichever CSS values need it (looking it up or memorizing it is a task unto itself), then by all means you can spend valuable time doing that, however it won't be as perfect of a product, and it won't work as well as something done with a tool.

I'm no fan of WordPress, and I might not even be making an argument for frameworks per se (even though I'd argue that the "bloat" is often doing something very much worth it). I am definitely making an argument for build tools that will make your code production ready.

Thread Thread
 
snowfrogdev profile image
Philippe Vaillancourt

I think I can get behind that. Even if I were to consider going framework-less on my next project, I would for sure, at a minimum, use Typescript and Parcel. Probably SCSS too.