Why do we opt for the object-oriented approach?
The principal reasons are:
- Realistic modeling
Since we live in a world full of objects, it logically follows that the object oriented approach models the real world more accurately than the conventional procedural approach.
- Reusability
In the software industry, as in other industries, a large portion of time and energy is being spent in re-inventing the proverbial wheel. In the object-oriented approach, you build classes, which can then be re-used by several applications, thereby cutting down the development time.
The benefits of reusability translate to savings in time and effort, which in turn result in cost benefits.
- Resilience to change
Through the object-oriented approach, systems can be allowed to evolve. When a change is suggested, the old system need not be completely abandoned and re-built from scratch. Extensibility is therefore one of the major advantages of this approach.
Consider the example of Joytoys, a company that manufactures toys for children in the age group of 1 to 12 years. The payroll system of this company has been developed using object-oriented techniques. The company has several employees, some of whom work in the design department. These designers develop new toys every season. For the last couple of years, the company has had no cause for complaint about the payroll system.
However, new developments in the company have rendered the old payroll system inadequate. In order to keep up with the competition, the company realized the need to employ some more designers. Design work is done only in certain months of the year. Therefore, the company has now employed freelance product designers who work in the capacity of temporary employees.
The original payroll system was designed for employees of two kinds-confirmed employees and trainees. Though there are many attributes that are common to confirmed employees and trainees, like name and address, there are some attributes that are different. For example, a confirmed employee receives basic pay while a trainee receives a stipend.
The company now wants the system to be modified to accommodate freelancers as well. In the object-oriented system, this change does not mean that the entire payroll system needs to be revamped. A new subclass called freelancer will need to be introduced to take care of all the activities related to the freelancers. The rest of the system remains unchanged.
Wednesday, January 21, 2009
Advantages of Object Orientation
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment