3 ms·
Frameworks are just a set of libraries that play nice. If you use a bunch of separate libraries from different developers, then you have to write a lot glue co
by leohutson 11y ago
Frameworks are just a set of libraries that play nice.
If you use a bunch of separate libraries from different developers, then you have to write a lot glue code to get data between those libraries.
That code is usually slower, as it will involve copying and transforming data, i.e. you'll be copying data in and out of different classes, copying data to memory allocated by the library, copying data to differently aligned memory, transposing data, copying data between different sized scalar types etc.
Frameworks make cross platform development a lot faster, and learning a framework is no more of a waste of time than learning another language or native OS api.
I absolutely agree, that bundling together a bunch of dependencies, and having those dependencies maintained by the same vendor has a risk/cost.
Don't choose a shitty or faddish framework; put as much research into choosing your framework as you would into researching it's individual libraries, use the framework as it was designed, and only use what you need.
- learc83 11y ago>Frameworks are just a set of libraries that play nice. Many times when people talk about the difference between frameworks and libraries, they are talking about which code is driving the program. I think this is the case here. An overly simplified example of the difference is that, with a library, your code calls the library. With a framework, the framework calls your code.
- Animats 11y agoYes. Thus, in one program, you can use multiple libraries, but not multiple frameworks.
- AstralStorm 11y agoSometimes you can and it is not even too hard to make them interoperate. This begs the question why would you want to though.
- leohutson 11y agoNot quite sure I understand the calling distinction? I guess the article is more about web frameworks, which I have no knowledge of. I had desktop applications in mind, in particular GUI centric frameworks like Qt, which aside from moc is mostly just a very extensive set of libraries that build functionality on top of each other.
- deleted 11y ago[deleted]