I published this post on my blog, but figured the beautiful people of dev.to will have something to say about the subject.
Even though we created layouts using
Then years went by, stuff happened and now we have all these tools that allow us to build things with such speed it’s incredible! We even have version control, who would’ve guessed. Now you can have half of your website or application done even before you’ve done with planning the whole thing. All you need to do is install Node… Then npm and Webpack or Gulp. After that you just pull in your dependencies like Express, Lodash, Underscore, Coffee-script, Post-css, Bootstrap, Materials or jQuery — if you’ve been living under a rock for the past 10 years — and you’re ready… to begin writing some actual HTML and CSS.
If you haven’t skip to the comment section to swear me off, I’m not saying all of these tools are necessarily bad. Hell, I’m working with most of them on a daily basis, c’est la vie. Well, some of them are bad — :cough: Bootstrap :cough:
What I want to say is that we begun using all these tools even when we don’t need them. We’re using them just because they’re cool, new, shiny or whatever and that’s bad. We cram everything without mercy to node_modules, no wonder it’s the heaviest thing in the known universe.
When you start your next project from scratch, actually start it from scratch, zero, nada. Think about requirements for a second. Do you really need that fancy package, or you can make it with vanilla JS? Then add dependencies when and if you need them for the first time and not right away.
Now, I’m not saying dump everything and go vanilla. I understand the value some of those libraries, frameworks and plugins bring. I also know we’ve got a lot of legacy code, tech debt and other reasons for using those packages. I just ask you to think twice before jumping and adding something new to package.json.
Think about progressive enhancement. Can you build the core functionality with basic tools, then enhance it with everything else? Do you really need whole Bootstrap when you’re building simple magazine website that has two different views and you can build it just by using flexbox or css-grid? At the end, think about what you’re building. The easiest or fastest solution isn’t always the best one.
This is something I think about from time to time, I just had to get it out somewhere. Sorry for boring you and thanks for reading.