Why Object Oriented Programming?

The major advantage of using Object Oriented approach is the more re-usability and ease in maintenance.  It doesn’t matter that you are familiar with the OOP before or not, I am going to explain this in a very much simpler manner that how and why to use it.

 OOP basically focuses on designing and programming individual classes and how objects behave and granting access to the datatypes. 

Note:  OOP is not difficult to learn, but the difficult part is, how you can program well in it, because most of the programmers, new to OOP, come from a procedural background.

   Some major advantages of OOP and how it is more efficient than procedural approach.

Reusability of code:

         In OOP, code is easy to organize, maintain and can be reused with a great ease which leads to much neater code. Separate components or modules could also be programmed in OOP, which can perform a specific task. OOP is perfectly suitable for code reusability and eliminates the chances of code duplication as much as possible. The major purpose of developing this approach was to reduce unnecessary or unused coding which definitely reduces project programming time and hence low budget is required. Objects have eliminated the concept of cut, paste, and adapt existing code. Functional programming is also a good approach in terms of usability. Please have a look at Interface Design and Composition and see how OOP components could be reused.

Suitable for designing distributed systems:

                        The OOP UML paradigm is useful in designing distributed systems or framework with a lot of entity living during the actions of the user (example: web application). The object oriented approach is more modular in nature and thus more suitable for distributed systems. It is also ideal for instances where too many developers are involved in the programming of an application. Some people believe that in distributed systems OOP takes more development time than structured approach but it has a lot of advantages in the long run and this delay is only once in the application programming. 

Automatic use of memory:

            OOP is good because it uses garbage collection during the execution of a program.  While in a structured approach, a problem in memory is manually debugged and corrected. You can see manual memory allocation in languages without automatic memory management, like C language, which uses different built-in functions to do so, when they are called in the code. It depends on programmer that he can reserve memory according to requirement and can also set it free, when he determines that this will not have any bad impact on the running of program or software. Not all OOP languages provide garbage collection.

Best in modification and error handling:

             It is very easy to modify or adding more features to a class than a structured code, because OOP code is in an organized form. Similarly error reporting capability of OOP code is also very good. Suppose you are working on a project and on a specific phase the requirements of the client has changed. Then if you are using OOP, modification would be very easy.

Neat and Clean code:

           The major objective of OOP is to write cohesive, neat and clean code. It is ideal for developing huge libraries and frameworks, as it has made maintaining and customizing existing code is so much easy. Data Encapsulation and inheritance aspects of OOP also make it ideal for huge projects, make the code cleaner and easy to debug.

Please note that there are a huge number of programmers which find OOP, not the best solution for developing a software.

Arguments from the other side. 

  1 - You can write great code in non-OOP languages as compared to writing terrible code in OOP. You can do that in just about any paradigm, not just in this approach. In some situations OOP code has so many tight dependencies between objects that it becomes impossible to pull out a single piece for reuse.
  
  2- You have to write more code in OOP, as compared to normal structured approach. Which definitely means that the software or program would be slower. For a web application, delay in load time also increases the bounce rate. 
  
  3 - if not properly designed, coded and maintained, it is very difficult to troubleshoot as compared to a structured procedural language code.
  
  4-  Modification and clean code have also nothing to do with OOP.
  
             There is a detailed debate regarding the advantages and disadvantages of OOP. Some people find it useful and some do not. There are a lot of circumstances in which OOP is the best solution and there are lot of situations also, where structured approach is best. So, its up to you that how you take a decision, by identifying the problem first.

Plz share this on

Submit to DeliciousSubmit to DiggSubmit to FacebookSubmit to Google PlusSubmit to StumbleuponSubmit to TechnoratiSubmit to TwitterSubmit to LinkedIn

Related Articles

You have no rights to post comments

Enjoy best web development services at an affordable price. Looking forward to build a good relationship and serve you better...

Copyright © 2017. All rights reserved.