by ThePhysicist · 5y ago · 0 comments
A negative effect of all these frameworks is that I work with more and more frontend devs that just don't know their way around (S)CSS, so if you throw them into a project that uses a framework they don't know or (gasp) hand-crafted CSS they are completely lost. Same thing with Javascript tooling btw, in a recent project a frontend dev wanted to rewrite the whole codebase because he was not familiar with Webpack and only knew vite (which is the new cool thing it seems), so he wasn't able to work with the existing code.
Side note, for nostalgia, here is the HN posting on it from 10 years ago: https://news.ycombinator.com/item?id=2904355
Except you'll build a framework. You'll add a bunch of classes for frequently used elements (nav, modals, buttons, etc), SASS variables, etc
They can't Google how to do something in your framework. They can't find component libraries that extend your framework. They probably can't find sandboxes that demonstrate every single one of your framework's use cases. The documentation of your framework is also likely to be worse than that of frameworks that have had tens of thousands man hours be put in their development and tens if not hundreds of thousands more battle testing them in production across a variety of projects.
The difference is instead of having your style in a single language (css) in a cohesive system, you have styles in both css and bootstrap and they often clash.
I try to do this for my own projects but there's gravitational pull toward frameworks in companies.
Its all well and good saying that, as long as you do not value your time.
Personally, I would rather use a reasonably up-to-date framework such as Bootstrap 5 because Bootstrap has already taken care of the majority of those CSS hacks that are often required to make things look right on various browsers.
And frankly, why re-invent the wheel ? Most "utilize modern css and js directly instead of relying on frameworks" likely ends up looking like "a lot of boilerplate with a few customisations". So why not use Bootstrap for all the boilerplate and spend your time more productively by focusing on the customisations ?
P.S. JS is not a strict requirement for Bootstrap, it can be used CSS-only. But one added benefit of Bootstrap 5 in particular is they've removed the jQuery dependency.
Making any large front end application WITHOUT a framework or a view library is just a bad idea, even today. There is nothing in the DOM or spec-wise that is equivalent to the power of React or Vue, period.
When it comes to CSS, the situation is better. Flexbox, CSS grids, ... have made creating CSS layouts extremely easy. So CSS kind of successfully brought in a lot of things that were directly exploitable by front-end developers.
To this day, HTML and the DOM are JUST NOT RAD for complex UI, period. Web components have a few nice ideas but a lot of flaws (especially support on IOS). Whether you build your own framework or use someone else library, you will absolutely need something that sits on top of the DOM for large front-end applications.
So it's not by choice that most front-end devs have to rely on a framework. It's because the standards are not good enough.
> I try to do this for my own projects but there's gravitational pull toward frameworks in companies.
A simple example. you need a mechanism to manage the life cycle of event handlers on your page, if your app uses the history API. If you do so then you've already started writing your own framework.
Web components failed to address a lot of stuff developers use view libraries for. That's why it is not that popular.