Get Updates to Your Inbox!

Reusability and maintainability

One of the main advantages of Object-oriented Programming over Procedural Programming is its reusability and maintainability. Object-oriented Programming is built in a way that it can be updated and adjusted with relative ease making it a clear choice for those who are looking for a method of programming that will save them time and money in the long run.

I will discuss some of the differences here in depth between Object-oriented Programming and Procedural Programming and their reusability and maintainability.

Object-oriented Programming reusability and maintainability

As mentioned earlier a key advantage of Object-oriented Programming is its reusability and maintainability. When thinking of code as reusable it is often thought of as being put in a library to be extracted later. Although this is true for most methods of programming and is true for Object-oriented Programming, this is not the type of reusability I will talk about.

When referring to reusability in Object-oriented Programming the code itself can be reused throughout the application. An example would be the creation of a super class that can have its attributes inherited into other classes. A super class might be a dog and sub-classes that inherit attributes from the dog class could be collie or pit bull. Both of these other classes have dog attributes but are also unique from each other.

In this way code can be reused throughout the program mitigating the need for developers to rewrite the dog class over and over throughout the code every time there is a new dog introduced.

With the code being reused in this manner it can be maintained in a similar way. As in our previous example if the program required that every dog be classified with a certain hair color, the developer could change the super class dog to have a hair color of say blonde. This would then change all the dog classes that inherit hair color from the super class throughout the program.

As maintenance arises and updates are needed, Object-oriented Programming cuts out many hours of updating code by relating the code together in a way that relates to real world scenarios. This also makes it much easier for the developer to maintain the application.

Procedural Programming reusability and maintainability

Unlike Object-oriented Programming, Procedural Programming reusability and maintainability are looked at in a very different fashion. Procedural Programming methods and code is often stored in a library which can be accesses at a later date by other developers. This library usually is made up of different actions that are used over and over again in a program.

An example of one of these actions would be a contact form on a web page. The contact form might be displayed in html, styled with CSS and executed with JavaScript. All of these files would be stored together in a library which could then be reused over and over again when someone would need a contact form on their website.

Although this method is simple and easy in theory it presents many problems to new developers. For instance not all libraries are written in a way that is understandable to an average coder. This makes using code from a library difficult and sometimes dangerous to the wrong people.

In addition, using code from libraries can make maintenance difficult if not impossible. Some libraries have their own external files such as JQuery. As code is updated throughout time, applications that rely on the code library may have bugs or cease to function making it a necessity for the developer to recode or find a new library with the action they are looking for.

Beyond libraries, Procedural Programming code can be reused over and over again throughout an application as problems are continually broken down over and over again. Some functions such as search and replace have made updating this type of code easier, but unlike Object-oriented Programming, Procedural Programming requires that all out of date code is updated for the program to work. This has proven over time to be a very large difficulty for many Procedural Programming developers.

Well known applications

Many well known applications use Object-oriented Programming. While researching programs that use the Procedural Programming approach it was very difficult for me to find any up to date programs or applications that do. As an example the top ten visited websites on the internet all use Object-oriented Programming as their programming method of choice (Wikipedia, 2013). I will focus mainly on some varied applications that use Object-oriented Programming as their method.

Well known Object-oriented Programming applications

Android

The android market recently surpassed the iPhone market in users and apps. Android applications are built in the language of JAVA and can be developed using Eclipse. Many have argued that android applications are in much higher demand now more than ever creating a higher demand for Object-oriented Programming developers familiar with eclipse (Android, N/A).

Youtube.com

One of the most popular video sharing sites, youtube has averaged about 800,000,000 unique visitors since it went live (Wikipedia, 2013). The primary languages that are used in this website are C, Python and JAVA, all of which are Object-oriented Programming languages.

Oanda Currency Exchange

Another JAVA application is the Oanda Currency Exchange. Traders and bankers use the java application on the site to view real time exchange rates and to trade currencies with other banks and institutions throughout the world (Oanda Currency Exchange, N/A).

Summary

I have discussed the important design concepts of both Procedural Programming and Object-oriented Programming methods. I have also talked about the design and development process as well as the reusability and maintainability of each method. I finished up by talking about the advantages and disadvantages of each program with major applications that use Object-oriented Programming as their primary method of programming.

As I researched and prepared for this, I not only learned some distinct advantages of using Object-oriented Programming, I also was able to better understand the benefits associated with it. I was able to realize the major benefits to me personally it will be to use more Object-oriented Programming in my daily work.

Published:
Updated:
Headline: Difference Between OOP and Procedural Programming Language (Part 3)
Publisher: NeONBRAND
98 120

Leave a Reply

Your email address will not be published. Required fields are marked *