DEV Community

Nick | OneThingWell.dev
Nick | OneThingWell.dev

Posted on • Originally published at devsimplicity.com

Frameworks and Reinventing the Wheel

"Don't reinvent the wheel, just use framework X" is a popular phrase today in many software development circles.

As the test of time showed us, the wheel is as close as possible to the perfect invention, perfect concept.

How close are modern frameworks to this perfect invention? How many of them could actually stand the test of time? How about 20 years? 10 years?

Ok, how about the concepts they are built upon - OOP towers of abstraction, ActiveRecord (anti)pattern and Rails clones, or more recently, various SPA architectures?

Long term implications

Although they are usually started with good intentions, frameworks very often end up being pools of bad practices. There are many trade-offs they have to do to be as generic as possible and easy to grasp for less experienced developers.

What's really important to understand is that your whole codebase is chained to their often-very-flawed implementation of the often-very-flawed concepts.

What happens when the features or implementations you depend upon are changed or removed? Or when you'll need more control over them?

What happens when the whole framework (or its version) becomes obsolete or abandoned?

What's the alternative?

Good custom architecture (specific to your application) will outlive any ready-made framework, you won't lose the ground beneath your feet and you'll have full control over things. But it requires much more experience and effort.

Although this obsession with frameworks has gone too far, this doesn't mean no one should ever use frameworks, far from that. It just means that you should make sure that you really understand the long-term trade-offs of the decision you're making.

Just keep in mind that these "wheels" are very fragile, and can't be easily replaced.


Note: this is a snapshot of a (WIP) topic from the Understanding Simplicity wiki.
You can read the latest (better formatted) version here: Frameworks and Reinventing the Wheel

All suggestions (and reactions) are welcome.

Top comments (2)

Collapse
 
wesen profile image
Manuel Odendahl

What helped me most over the years is not only building my own frameworks (it was kind of necessary in the 2000s) and always reading the code of the hot things of the moment. It takes away a lot of the magic and helps you understand if the improvements brought by the framework are worth the added complexity.

Collapse
 
onethingwell profile image
Nick | OneThingWell.dev

Agree, the only way to really understand these things is to implement them yourself.