views:

53

answers:

4

I'm using C++, but I think that my question goes beyond a single programming language.
What is better - use framework's classes or separate libraries. For example, if I'm using Qt in some project is it better to use QHttp or use cURL (QtXml or TinyXML etc.)?
From my point of view using framework's classes has following features:

  • Better compatibility with other framework's classes (for example, GUI)
  • Less dependences

But from other hand separate library could provide better functionality.

What do you think about it?

A: 

At my company, it depends on the needs of the project. Generally we prefer to use the framework classes. But if it seems that we will have write a lot of extensions or helper classes, then we look for separate libraries.

+2  A: 

I get nervous about too much 'framework,' as at some point it can become impossible to extract your code from the 'framework'.

Using different libraries from one 'framework' is fine, but I'd hide them behind my own abstractions rather than routing 'their' types through my core code.

kyoryu
A: 

I tend to go for "what provides the best functionality?". I'll use a framework's methods mostly by default unless it doesn't provide something I need. Then I'll be tempted to use a third party library. If I'm using a lot of third party libraries, I might question the need to use the framework. If I'm using third party libraries I can't live without and they conflict with the framework, the framework goes, unless I can't live without it. It really depends on the situation. Is it the framework I need to accomplish my task, or the third party librar(y|ies) implementing the functionality? Inclusion is then prioritised as appropriate.

Ninefingers
A: 

It's the job of the framework author to lock you in. It's the job of the application writer not to get locked in.

Tom Hawtin - tackline