DEV Community

Discussion on: Nothing is wrong about a framework - except what you might think it is

Collapse
 
kspeakman profile image
Kasey Speakman • Edited

I used to think this way too. But maintainable software ends up depending on replaceable and refactorable pieces. If the framework doesn't fit some use case, you can't just refactor it. Even if you can (or if the framework provider does and releases a new version with breaking changes), you then have to refactor every bit of code that coupled itself to the framework. With libraries you can add the functionality as a separate / optional part. (Whether a library author does or not is perhaps another matter.) The most reusable pieces of software are structured as libraries with optional functionality rather than required abstractions.

I'm not sure how you got vendor lock-in from libraries? I wasn't discussing any vendors, and the library may even be internally created ones. E.g. Amazon maintains it's own infrastructure services libraries to make it easy for teams to access the Amazon infrastructures they need.

All that said, I do use some external frameworks in absence of other reasonable choices. And sometimes frameworks are a good answer to certain problems. Internally, I try to avoid developing frameworks for my apps. Because I tried it in the past and paid for it later. :)