Object-oriented analysis and design - Concepts

Thursday, May 29, 2008

The last lecture is on following topics.

Why Software is inherently complex

The five attributes of a complex system

Object-oriented analysis and design

Why Software Is Inherently Complex?

Software systems are built for different complex problem domains. Software engineers have to handle this complexity and make sure that the systems reach end users with a simpler, easy to use interface. It is up to the designers and software engineers to apply theories and concepts of software engineering to make the software systems more usable and user friendly to the end users. Software engineers have to deal with different domains. To implement a fully working software system, the engineer must have a clear understanding of the problem domain. But although an engineer might have the required knowledge for a particular domain, this knowledge may rapidly get outdated. Therefore developing software systems to work in complex, unknown domains is always a challenging task for software engineers.

For example consider the heart pace controller software or auto pilot software. In both situations, to develop such software, the developer needs to have perfect domain knowledge. In case of a small mistake done during coding due to incomplete understanding of the problem domain can result in severe damages and threats to human life as well. Therefore when it comes to critical software systems the correct and complete understanding of the problem domain is a must.

The problem of complexity gets further complicated due to the fact that software is intangible. Compared to other engineering fields, in software engineering the product is intangible. Consider a civil engineering scenario; it is possible to clearly see the progress of the project while it is done. But with software it’s very difficult to see how the project is progressing. The developers are optimistic too. They think that they can develop the system in last minute. Therefore software systems are inherently complex.

Most software systems are built by group of developers. So managing the team work is a difficult task. Understanding, knowledge, values, believes differ from one person to the other. Conflicts might occur between members of a team. Therefore sometimes it is difficult to manage development process. It is possible that the same requirement gets understood in two different ways by two different members within the same group. Therefore when the system is developed as number of modules, they may not be compatible with each other, simply because the requirements are interpreted in different ways. Most of the times until you reach the point of integration, these misinterpretations will not be discovered. Therefore one module might produce negative integer numbers and input it to a module where the latter module doesn’t accept negative integers. Therefore after integration it is possible for the system to crash. Therefore with the difficulty of managing the development process, software systems are further complicated.

Due to the flexibility possible through software, clients often demand to change the requirements. With construction or any other area, flexibility is not possible. If the client wants to change the design of the house, he/she will have to demolish the house and rebuilt. But it is often possible to change the design of a software. Therefore software engineers always have to undergo difficulties with changing client requirements. When you introduce the changes to a software, you have to manage those changes properly. If not lot of bugs will be introduced to the code.

Sometimes contradicting requirements may exist. Also there is Impedance mismatch between users and developers. Therefore it is difficult to come up with the exact solution that the clients expect.

Although software systems and the problem domain that are being modeled are complex in its internal structure, it is up to the developers to simplify the user’s interaction with the system by providing simple user interfaces and handling the complexity within the software.

The Five Attributes of a Complex System

  • Normally complicated systems make up a hierarchy. For example Human is one such complex system which is composed of set of interrelated subsystems. When we identify the sub systems it becomes easy to understand any complex system. A hierarchy can be one of two types; Is A hierarchy or Part Of hierarchy. i.e. Monitor is a Part Of computer where as computer Is A machine.
  • The identification of primitive components in a system depends on the person who is observing.
  • The communication between the components that make a complex system is known as inter-component linkages where as the communication within the components is known as intra-component linkages. Intra-component linkages are generally stronger than inter-component linkages.
  • Complex systems have common patterns. Therefore patterns are reused and small components are reused in those patterns
  • Every complex system is built on some system that worked. It is not possible to craft these primitive objects from scratch.

Object-oriented analysis and design

In Object-oriented analysis and design, everything is treated as an object. Real world entities are modeled as objects in this concept. In Object-oriented analysis conceptual classes are identified from the requirements document where as in Object-oriented design maps these conceptual classes in to implementation classes.

Major elements of object model

Abstraction

Abstraction is the process of simplifying the description of an object by emphasizing on the essential characteristics of it. The concept of abstraction is same as generalization in which only the important details are captured while hiding non essential details. The whole idea is to capture some kind of commonality between different instances according to the purpose. Level of abstraction depends on our requirement.

There are 4 types of abstraction

  1. Entity abstraction
  2. Action abstraction
  3. Virtual machine abstraction
  4. Coincidental abstraction

Encapsulation

Encapsulation is the process of enclosing attributes and behavior in to one object by means of information hiding. Therefore to use an object, programmer or other objects need to know only its behavior not about its internal structure. Encapsulation hides the details of the implementation and gives access to its internal data through methods. Therefore Encapsulation gives the objects the black box behavior.

Modularity

Due to the benefits decomposition, software systems are designed as separate modules. (Things related to one module have to be handled by that module and different modules are there to handle different things) These modules can be maintained independently. Modularity is the property of a system that is decomposed into a set of modules. Since humans can understand 5 to 7 things at once, it is difficult understand complex systems at once. But with modularization we can achieve higher level of understanding about a complex system. One module can be considered as a package of abstraction. Modules have boundaries which are known as interfaces. A module interface expresses the elements that are provided and required by the module. For modularization to work properly, we need to minimize inter-module dependencies.

Overall goal of the decomposition in to modules

The best way to handle complexity is the divide and conquer method. With this method we can decompose any complex system in to manageable chunks which are known as modules. Since the modules can be designed and revised independently, we can achieve less cost with decomposition in to modules. With modules it is also easy to understand how any complex system functions. All modules should function properly for the functioning of the system. But it should be possible to change the implementation of one module without knowing the implementation of other modules and without affecting the behavior of other modules

Hierarchy

In most complex systems it is possible to find more than one abstraction at a time. A ranking or ordering of abstractions is known as a hierarchy. With the proper understanding of these hierarchies, it is possible to simplify any complex problem. A hierarchy can be one of two types; Is A hierarchy or Part Of hierarchy. i.e. Monitor is a Part Of computer where as computer Is A machine.

Surangi N. Alexander (044052)

0 comments: