P
Peter Olcott
It's generally accepted that, except in rare instance, trying to duplicate
the problem being solved, and some of their relevant behavior. Once
you have the relationships and behavior your system architecture is
completed.
one must still deal with the hardware. At the hardware layer it might
be a really good idea to encapsulate the hardware specific features in
its own class(s). This insulates the other layers from change when the
hardware is changed, or the system is ported. By having this hardware
specific layer, one is essentailly modelling the real world hardware.
Not duplicate, merely model the relevant abstractions, big difference."real world" objects in software is an almost sure recipe for disaster. It's
Except the original relationships between objects that are relevant toconcepts that are modeled, and sometimes, the distillation of a real world
entity into its meaningful concepts leaves little of the original image. For
the problem being solved, and some of their relevant behavior. Once
you have the relationships and behavior your system architecture is
completed.
This is an example of good layered design, yet underneath this layerexample, in systems programming, you don't model keyboard matrices and disks,
you model streams and file systems.
one must still deal with the hardware. At the hardware layer it might
be a really good idea to encapsulate the hardware specific features in
its own class(s). This insulates the other layers from change when the
hardware is changed, or the system is ported. By having this hardware
specific layer, one is essentailly modelling the real world hardware.
Yet even an excellent layered design must deal with the at some point.To quote John Lakos, "modeling real world
objects leads to unwanted coupling and circular dependencies that turn testing
and maintenance into a nightmare, so we never do it" ('we' refering to software
engineers).