Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs
"Build user interfaces for object-oriented systems": Read the whole series!
This month's column expands on the ideas presented in July's column, "Building user interfaces for object-oriented systems, Part 1," by actually implementing a simple system for doing forms-based I/O. The main principle that I'm demonstrating here is organizational: I'll show you how to organize your code in such a way that arbitrary forms can be constructed automatically, minimizing the coupling relationships between the GUI subsystem and the underlying logical model (the "business" objects, if you will).
One approach to this problem is to have all objects render themselves on the screen (with a
draw_yourself(Graphics here) message). Though this sort of simplistic approach can work for trivial objects, it's not a realistic solution for several
reasons. First, actually embedding graphical code into the methods of a model-level class is usually a bad idea for maintenance
reasons. The graphical code is usually scattered throughout the methods of the object, and it becomes too difficult to make
minor changes in implementation as a consequence. It's also very difficult for an object to display itself in more than one
way. This month, I'll look at an approach that doesn't have the problems of Model/View/Controller (MVC) architecture, but
that accomplishes the main goal of the Microsoft Foundation Classes (MFC): the decoupling of the abstraction (model) and presentation
The main way to get around the problems caused by simply asking an object to display itself is to make a distinction between the entire object and its individual attributes. In the world of object-oriented design, an attribute falls under one of the following definitions:
The operations of a class are attributes as well: what an object can do certainly distinguishes one class of objects from another.
Design PatternsElements of Reusable Object-Oriented Software, Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides (Addison-Wesley, 1995), is a cookbook documenting many patterns of object/class interaction that recur regularly in good object-oriented designs. All experienced object-oriented designers will recognize these patterns immediately from their own work, and folks who are learning object-oriented design can save themselves a lot of hard work by using the patterns described here from the beginning. Though any cookbook approach to design is ultimately limiting (to use a cookbook, you have to know how to cook), this book is invaluable to people learning the design process or wanting a common vocabulary to describe parts of their designs to other designers. It can save you an enormous amount of time
"Flight 501 Failure Report," from the Inquiry Board of the European Space Agency, is an account of the launch and subsequent self destruction of the Ariane5 satellite booster. It's a great real-world example of why a "pluggable component" architecture is problematic in the real world
Usability Engineering, Jakob Nielsen (Morgan Kaufmann Publishers, 1993), is a good introduction to writing programs with usability in mind">http://www.esrin.esa.it/htdocs/tidc/Press/Press96/ariane5rep.html
Usability Engineering, Jakob Nielsen (Morgan Kaufmann Publishers, 1993), is a good introduction to writing programs with usability in mind