Search

Saturday, November 19, 2011

Is Object Oriented Programming the best Programming Paradigm for Number Crunching Applications? (1-4)

Undoubtedly there is an almost worldwide belief as well as acceptance of the huge benefits of the Object Oriented Programming Paradigm. For example in my field -Finite Element Methods (FEM)- there is a plethora of publications about the object oriented frameworks and planning for an OO FEM software.

The main focus of this series, will be to test the claims as well as real needs for full OO features in a number crunching application. So, I well first explain what I understand as OO paradigm in the context of computational science, with a specific focus on the FEM. Then I would like to examine the motivations usually introduced for the need for OO in FEM. Finally, another extremely important feature is the effect of adapting such an approach on the computational performance.  

First, OOP main objectives are to minimize the maintenance and modification costs of a code. Another aspect is the data hiding (encapsulation) which is really a very important aspect for delivering software components to other users or coworkers. So, as much as we are concerned this mainly benefits a collaboration project between different programmers. Another result is the ability to have unified interfaces between different objects and methods. So, if you want to change or add new behaviour to an object you would need only to add a single part that is responsible for that method, and as long as the interface remain intact no one of the users of the code need to worry about the implementation issues of the procedure.

But that is not all, a very important facet of using OO paradigm, is the reusability of the code. Typically there is already established algorithms and implementations already checked for correctness. Yes, I am aware of the fact that this is not unique to the OO Paradigm. But when combined with the data encapsulations and polymorphism it becomes a very powerful way of thinking about the overall design of the application with less concern about how the different pieces fit together, and how they perform.

No comments:

Post a Comment

Your comments are most welcomed