[ fromfile: frameworks.xml id: frameworks ]
Abstract
Organization of classes goes beyond simple inheritance. Carefully designed frameworks allow one to find and reuse components much more easily. All large software projects are built on top of frameworks, and we discuss some of the more popular ones in use today.
Code reuse is the holy grail of programming. In the past, computer time was expensive and programmer time was relatively cheap, but now things are exactly reversed. Today all software is built out of building blocks, which are themselves pieces of software. We never start from scratch. It is a waste of programmers' time to reinvent and reimplement things that have already been designed, implemented, refined, and tested by recognized experts.
A framework is a (typically large) collection of general-purpose (or domain-specific) classes and conventions designed to improve the consistency of design. Frameworks are often used to create graphical applications, database applications, or other complex pieces of software.
A framework has a well-documented public Application Programmers' Interface, or API. An API is a description of the public functions, classes, and interfaces in a library. To implement frameworks, design patterns are used. Development with design patterns involves looking for pertinent objects and possible hierarchies. The classes and patterns used are given good descriptive names so that we can define them once and reuse them elsewhere. We will discuss design patterns shortly in Chapter 8
Qt 4 is one of many open-source object-oriented frameworks that provide a set of reusable components for building cross-platform applications. Some others worth knowing about are:
boost: an open-source cross-platform library of C++ utility classes
mono: an open-source implementation of Microsoft's .NET, the API for C#, which is built on top of libgtk
libgtk, libgtk++: Libraries which define the widgets used by the Gnome desktop, Mozilla, Dia, GAIM, GIMP, Evolution, OpenOffice, and many other open-source programs
wxWidgets: another C++ cross platform widget toolkit
Wt: a Qt-like framework for building Web applications using boost and AJAX. [26]
With a multi-platform framework like Qt 4, you can gain enormous benefits from the creative efforts of others. Software built on top of (strictly using) Qt 4 will be based on components that have already been tested on Windows, Linux, and Mac OS/X by hundreds of programmers.
Toolkits like Qt 4 (and also Gtk++, the cross-platform Gnu ToolKit) have parts that are implemented differently on each platform. This is why Qt-based applications look like KDE apps in Linux and like Windows apps in Windows.
[26] a system of JavaScript and XML-rpc that gives list/tree/table views with GUI behavior inside a web page.
| Generated: $Date: 2009-09-08 12:15:32 -0400 (Tue, 08 Sep 2009) $ | © 2009 Alan Ezust and Paul Ezust. |