Let’s face it: our frontend code is getting more and more complex with every project we start. I’m not saying this is a bad thing, it’s just that this rapid rate of growth comes with its own set of growing pains.
Just a few years ago all of our CSS was written in a single file, and each style used a long complex selector to find just the right element on the page to modify. If we found that this style was interfering with something else on our site, we just wrote another line of CSS at the bottom of the file with a longer selector.
We were writing the equivalent of a single-file PHP application for every project.
Then, just as new PHP developers are taught to break up their code into small reusable objects and to organize their code into individual files, our frontend projects started to look less like a cascade of instructions and more like a complex system of abstraction, dependencies, and interfaces. But while we were quick to incorporate the object-oriented, multi-file approach of traditional programing languages, we were ...