Difference between Function Oriented Design and Object Oriented Design
1. Function Oriented Design :
Function oriented design is the result of focusing attention to the function of the program. This is based on the stepwise refinement. Stepwise refinement is based on the iterative procedural decomposition. Stepwise refinement is a top-down strategy where a program is refined as a hierarchy of increasing levels of details.
We start with a high level description of what the program does. Then, in each step, we take one part of our high level description and refine it. Refinement is actually a process of elaboration. The process should proceed from a highly conceptual model to lower level details. The refinement of each module is done until we reach the statement level of our programming language.
2. Object Oriented Design :
Object oriented design is the result of focusing attention not on the function performed by the program, but instead on the data that are to be manipulated by the program. Thus, it is orthogonal to function -oriented design. Object-oriented design begins with an examination of the real world “things”. These things are characteristics individually in terms of their attributes and behavior.
Objects are independent entities that may readily be changed because all state and representation information is held within the object itself. Object may be distributed and may execute sequentially or in parallel. Object oriented technology contains following three keywords –
- Objects –
Software package are designed and developed to correspond with real world entities that contain all the data and services to function as their associated entities messages.
- Communication –
Communication mechanisms are established that provide the means by which object work together.
- Methods –
Methods are services that objects perform to satisfy the functional requirements of the problem domain. Objects request services of the other objects through messages.
Difference Between Function Oriented Design and Object Oriented Design :
COMPARISON FACTORS FUNCTION ORIENTED DESIGN OBJECT ORIENTED DESIGN Abstraction The basic abstractions, which are given to the user, are real world functions. The basic abstractions are not the real world functions but are the data abstraction where the real world entities are represented. Function Functions are grouped together by which a higher level function is obtained. Function are grouped together on the basis of the data they operate since the classes are associated with their methods. State information In this approach the state information is often represented in a centralized shared memory. In this approach the state information is not represented is not represented in a centralized memory but is implemented or distributed among the objects of the system. Approach It is a top down approach. It is a bottom up approach. Begins basis Begins by considering the use case diagrams and the scenarios. Begins by identifying objects and classes. Decompose In function oriented design we decompose in function/procedure level. We decompose in class level. Use This approach is mainly used for computation sensitive application. This approach is mainly used for evolving system which mimics a business or business case.
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.