Bringing Order to Chaos
The Role of Decomposition
The technique of mastering complexity has been known since ancient times: divide and rule. When designing a complex software systems, it is essential to decompose it into smaller parts each of which we may then refine independently. In this manner, we satisfy the very real constraint that exists upon the channel capacity of human cognition. To understand any given level of systems ,we need only comprehend a few parts at once.
Algorithmic decomposition:-Most of us have been formally trained in the dogma of top-down structured design, and so we approach decomposition as a simple matter of algorithmic decomposition, where in each module in the system denotes a major step in some overall process.
Object Oriented Decomposition:- We have to decompose a system according to the key abstractions in the domain .rather than decomposing the problem into steps as in algorithmic decomposition here we have to identify the objects which occur directly in the vocabulary of the problem domain. We view the world as a set of autonomous agents that collaborate to perform some higher level behavior. Each object embodies its own unique behavior ,and object is simply tangible entity which exhibit some well –defined behavior Objects do this and we ask them to perform the what they do by sending them messages. Because our decomposition is based upon objects and not algorithms, call this an object-oriented decomposition.
Algorithmic verses object-oriented decomposition:- Which is the right way to decompose a complex system,–by algorithms or by objects? Actually the answer for this, both the ways are important. The algorithmic view highlights the ordering of events, and object oriented view emphasizes the agents that either cause action or are the subjects upon the operations act. However, the fact remains that we cannot construct a complex system in both ways simultaneously, for they are completely orthogonal views. We must start then use the resulting structure as the frame work for expressing the other perspective.
It is better the object oriented view first because this approach is better at helped us to describe the organized complexity of complex systems as diverse as computers ,plants,galaxies,and large social institutios.Object oriented decomposition has a number of highly significant advantages over algorithmic decomposition. Object oriented decomposition yield smaller systems through reuse of common mechanisms thus providing an important economy of expression. Object oriented systems are also more resilient to change and better able to evolve over time, because their design is based upon stable intermediate forms .Object Oriented decomposition greatly reduces the risk of building complex software systems ,because they are designed to evolve incrementally from smaller systems in which we already have confidence .Furthermore object oriented decomposition directly addresses the inherent complexity of software by helping us make intelligent decisions regarding the splitting of large software systems into smaller units.
The role of Abstraction
According with Miller’s Experiments, he concluded that an individual can comprehend only about seven, plus or minus two, chunks of information at one time. This number appears to be independent of information content. As Miller himself observes “the span of absolute judgment and the span of immediate memory impose several limitations on the amount of information that we are able to recive,process and remember .By organizing the stimulus input simultaneously into several dimensions and successively into a sequence of chunks ,we manage to break…this information al bottleneck. In contemporary terms ,we call this process chunking ,or abstraction.
The humans have developed an exceptionally powerful technique for dealing with complexity. We abstract from it. Unable to master the entirety with complexity. We chose to ignore its inessential details, dealing instead with the generalized, idealized, model of the object.
For example, when studying how photosynthesis works in a plant, we can focus upon the chemical reactions in certain cells in a leaf; ignore all other parts, such as the roots and the stems. We are still constrained but the number of things that we can comprehend at one time, but through abstraction, we use chunks of information with increasingly greater semantic content. This is especially true if we take an object oriented view of the world, because objects, as abstractions of entities in the real world, represent a particularly dense and cohesive clustering of information.
The Role Of Hierarchy
Another way to increase the semantic content of individual chunks of information is by explicitly recognizing the class and object hierarchies within complex software systems. The object structure is important because it illustrates how different objects collaborate with one another through patterns of interactions that we call mechanisms .The class structure is equally important ,because it highlights common structure and behavior within a system .Thus rather than study each individual photosynthesizing cell within a specific plant leaf, it is enough to study one such cell, because we expect all other will exhibit similar behavior .Although we treat each instance of a particular kind of object behavior .Although we treat each instance of a particular kind of object as distinct, we may assume that it shares the same kind of object. By classifying objects into groups of related abstractions, we come to explicitly distinguish the common and distinct properties of different objects, which further helps us to master their inherent complexity.
Identifying the hierarchies within a complex software system is often not easy, because it requires the discovery of patterns among many objects, each of which may embody some tremendously complicated behavior. Once we have exposed these hierarchies, however the structures of a complex system and in turn our understanding of it, becomes vastly simplified.
