Home > Software Quality > Software Architecture and Design
- « Previous
- Next »
- S/W Architecture Design Home
- Software Architecture Types
- UML Diagrams
- UML Types
- Architectural Design
- User Interface
- MVC Architecture
- Data Centered Architecture
- Data Flow Architecture
- Hierarchical Architecture
- Object Oriented Architecture
Tutorial
Introduction
Object Oriented Architecture is an important concept for developing the software. It is a design paradigm based on the division of responsibilities for an application or system into individual reusable and self-sufficient objects. The popular approach of object-oriented design is to view a software system as a collection of entities known as objects. Object oriented is based on modeling real-world objects.
Advantages of Object-Oriented Architecture
- Object-Oriented architecture maps the application to real world objects for making it more understandable.
- It is easy to maintain and improves the quality of the system due to program reuse.
- This architecture provides reusability through polymorphism and abstraction.
- It has ability to manage the errors during execution. (Robustness)
- It has ability to extend new functionality and does not affected on the system.
- It improves testability through encapsulation.
- Object-Oriented architecture reduces the development time and cost.
Disadvantages of Object-Oriented Architecture
- Object-Oriented architecture has difficulty to determine all the necessary classes and objects required for a system.
- It is difficult to complete a solution within estimated time and budget because object-oriented architecture offers new kind of project management.
- This methodology do not lead to successful reuse on a large scale without an explicit reuse procedure.
Object Oriented Concepts
Object-Oriented architecture views a system as a series of cooperating objects, instead of a set of routines or procedural instructions. It is a significant methodology for the development of any software.
Above diagram shows the basic concepts of object-oriented architecture. Component-based architecture, Data repository, pipe and filter architecture can be implemented using object-oriented architecture.
Object
- Object is an instance of a class.
- Object is an entity that keeps together state and behaviors.
- All the instance of a class have similar properties like class definition.
- In object-oriented architecture, objects are the basic building blocks and a real-world element which has a physical or a conceptual existence.
- Object model is a thing or an entity in the application domain.
For example, a student, a book, etc. - Object has a set of attribute values which define a state of the object.
For example, the status attribute of library book values: 'available', 'checkout', 'on reserve', 'missing' and 'removed'. These values are used to determine the state of a book object.
Class
- Class is a blueprint of an object.
- A class represents description of objects that share same attributes and actions.
- It defines the characteristics of the object, such as attributes, actions or behaviors.
Encapsulation
- Encapsulation means hiding the data of a class from the object.
- It is the process of binding the elements of an abstraction.
- It binds the data in a single unit.
- It hides the internal details of the class and implementation details of the procedures.
- It allows the elements of the class to be accessed from outside only through the interface provided by the class.
Polymorphism
- Polymorphism means having multiple forms.
- It allows object with different internal structure to share some external interface and particular effective while implementing inheritance.
- For example, class draw is implemented for various graphic objects like circle, rectangle, triangle etc. Here, draw operation is used to draw of more than one type of graphic object.
Inheritance
- Inheritance is a technique of deriving a new class from existing one.
- It increases code reusability.
- The existing class is called as base or parent or super class and the new class are called the derived or child or subclasses.
- Subclass inherits or derives the attributes and methods of the super class.
- Subclass can add its own attributes and methods and can modify any of the super class methods.
- For example, shape is a base class. Class Rectangle and Triangle are the derived class. It is derived from the base class that is Shape class. All the attributes and methods of the base class are accessible in a derived class.
Message Passing
- Sending and receiving information among objects through function parameters is known as Message Passing.
- Object communicates through invoking methods and sending data to them.
- Objects in a system communicates with each other by using message passing.
Association
- Association is a group of links having a common structure and behavior.
- Association illustrates the relationship between objects of one or more classes.
- A link is defined as an instance of an association.
- The degree of association indicates the number of classes involved in a connection.
- Association is used to show that the instances of classifiers could be either linked to each other or combined logically or physically into some aggregation.
Composition and Aggregation
- Aggregation is a specialized form of association among two or more objects.
- Composition is a specialized form of aggregation in which if the parent object is destroyed, the child object would cease to exist. Composition is also referred to as a death relationship.
- Composition and aggregation is a relationship between classes by which a class is made up of any combination of objects of other classes.
- It enables object to be placed directly within the body of other classes.
- An aggregate object is composed of one or more objects.
Object Oriented Analysis
- In OO Analysis phase, determined the system requirements, recognized the classes and relationship between classes.
- The purpose of object oriented analysis is to recognize the application domain and specific requirements of the system.
- The outcome of OO analysis is requirement identification, primary analysis of the logical structure and use of a system.
Following are the three techniques of object oriented analysis:
1) Object Modeling
2) Dynamic Modeling
3) Functional Modeling
1. Object Modeling
- Object modeling develops the static structure of the system regarding to objects.
- It recognizes the objects, relationship between the objects and the classes in which the objects are grouped.
Following are the steps which shows the process of object modeling:
2. Dynamic Modeling
- Dynamic modeling is a way of explaining how single object responds to events (The activity occur at a point in time).
- The aim of dynamic binding is to examine the behaviour of the object regarding time and external changes.
Following diagram shows the process of dynamic modeling:
3. Functional Modeling
- Functional modeling is the last component of the object oriented analysis.
- The functional model shows the processes executed in an object and how the data change when it moves between the methods.
Following diagram shows the process of functional modeling:
Object-Oriented Design
- OO design is a next step after the OO analysis. In this, conceptual model is developed further into an OO model using OO design.
- The main motive of object-oriented design is to establish the structural architecture of the system.
There are two stages of object-oriented design are:
I. Conceptual design
II. Detailed design
I. Conceptual design
- Conceptual model recognizes all the classes required to build the system.
- In conceptual design, individual responsibilities are allocated to each class.
- In high-level design, class diagram is used to analyze the relationships between classes and interaction diagram is used for showing the flow of events.
ii. Detailed design
- In detailed design, the attributes and operations are allocated to each class based on their interaction diagram.
- The state machine diagram is developed to explain the next details of design is called as low level design.
- « Previous
- Next »