Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Say I have an idea for a desktop application with unusual interface requirements. I need:

  • Pixel-level control over the look and feel.

  • Finely specified custom controls.

  • Platform-independence.

My typical solution in this scenario would be to use SDL (or SDL+OpenGL) as a graphics framework upon which to build the interface from scratch.

  • Is it a good idea to work this way, or should I use an existing toolkit?

  • If the latter, which toolkit with bindings for either C or C++ offers the cleanest and most versatile facilities for extension (creating new controls) and customisation (styling existing controls)?

share|improve this question
2  
QT and wxWidgets seem to be the winners in the cross-platform native GUI space. –  Dave Mooney Jun 2 '11 at 20:01

3 Answers 3

up vote 1 down vote accepted

If you actually have the graphics and design skills/resources, and the ambition, by all means do it yourself. Thats the only way you can, as my friends in the corporate would would say, 'realize your vision'. Or better, make your own re-usable GUI framework that you can use in other applications. Dont be dissuaded by mantras about re-use if you really want to do it yourself.

On the other hand, if you dont have those resources, either use a 3rd party toolkit, or re-consider the need for an 'outside of the box' interface. You'd be doing your users a favor. The only thing worse than a bad interface is a bad, ugly, home-grown interface.

I dont know what kind of apps you are making. But if we are talking normal windows/desktop apps, evaluate whether or not your 'outside of the box' interface is something thats actually good for the user. I've seen many apps with atrocious interfaces over the years because their developers didnt want or couldnt care to create an application that more or less followed interface norms. That creates a lot of unnecessary overhead on the user as they try to learn your product. And the thing is, their developers dont realize their interfaces are that bad. So unless you are working on the type of app that calls for something 'slick' (like a media player or game), if you dont have the resources do your users a favor and use a 3rd party or standard (for the particular platform) interface.

share|improve this answer

When should you work from scratch, and when should you use an existing toolkit?

Never work from scratch.

Always use an existing toolkit.

What toolkit offers the simplest, cleanest facility for extension and customisation?

You're already using OpenGL. What's wrong with that? Many, many things are built in it.

And all toolkits contain lower and lower levels of componentry that you can extend or modify. You have the source.

http://www.atai.org/guitool/

share|improve this answer
    
I added some qualifiers to make it saner. Essentially I'm talking about per-pixel control over the whole look and feel. –  Jon Purdy Jun 2 '11 at 19:52
    
Only use a toolkit if one is available, of course, but that is most of the time. –  Anto Jun 2 '11 at 19:52
3  
@Anto: If a toolkit is not available, then you have two choices: (1) write a toolkit or (2) solve the original problem without the toolkit. Writing a toolkit in order to then try to solve the original problem simply creates two problems: the toolkit and the original problem. –  S.Lott Jun 2 '11 at 19:56
4  
Only work from scratch if you are making a toolkit. Then ask yourself, why am I making a toolkit? –  Dave Mooney Jun 2 '11 at 19:57
1  
@Dave Mooney: Excellent summary! –  S.Lott Jun 2 '11 at 19:58
  1. Only work from scratch if no other tool kits exist for what you are working on and if you think that is the case, double check to make sure it really is the case before reinventing the wheel. Also, more often than not, custom tool kits are one of the areas where you are going to be spending a lot of time working on code before writing a single line of code for your application. If you have a sizable code base and you think that it could be turned into a tool kit it might be worth investigating as a side project, but I wouldn't put it in the way of production projects you are working on.

  2. The best tool-kit for extensions tends to depend upon what platform you are working on, know that that jQuery is really flexible is not much help if you aren't working on web applications.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.