Saturday, March 18, 2006

Motivation for GUI Library development

One of the jobs of a GUI library is to enhance programmer productivity. Any such library having pretensions of being useful for real-world applications necessarily has to provide abstractions over system-level APIs. The system provides building blocks that the library organizes.

With that in mind, I think a GUI library for the MS Windows environment (Win32) has to tackle issues including but not limited to:
  • graphics:

    • bitmap transparency

    • manipulation of non-native image formats

    • scrolling

  • facilitation of multi-threaded applications

    • providing mechanisms for worker threads to safely communicate with event threads

  • construction and inspection of complex structures (e.g., child window hierarchies, menus, and table and tree controls)

    • structure definition

    • efficient modification (especially minimizing redrawing/flashing)

    • tab traversal in non-dialog windows

    • layout management

  • internationalization

    • resource externalization (e.g., strings and data formatting)

    • layout management comes into play here as well

  • smoothing over inconsistencies, bugs, or misfeatures

    • in particular, exposing functionality in a way that makes for the target programming language
Obviously, all of the above can be accomplished by writing directly to the Win32 APIs (since that is how such a library is implemented). But the above features are not directly enabled by Win32, so the application programmer without any GUI library has to implement them or go without.

I would claim that if you’re serious about GUI development, then the above is a subset of the functionality with which you need to be concerned.

No comments: