Thread Subject: Object-oriented

Subject: Object-oriented

From: Matt Fetterman

Date: 20 Oct, 2009 02:12:03

Message: 1 of 2

I have been spending time to re-write my code so it is object-oriented. Is it worth it? I can see that for some applications like balls bouncing off each other it could be very useful. But for general scientific algorithm I am not sure it will improve my life that much. Any opinions ?

Subject: Object-oriented

From: Nasser M. Abbasi

Date: 20 Oct, 2009 03:52:32

Message: 2 of 2


"Matt Fetterman" <chuck@mathworks.com> wrote in message
news:hbj69j$dmp$1@fred.mathworks.com...
>I have been spending time to re-write my code so it is object-oriented. Is
>it worth it? I can see that for some applications like balls bouncing off
>each other it could be very useful. But for general scientific algorithm I
>am not sure it will improve my life that much. Any opinions ?

Just an opinion:

In general, I think, the larger the application, and the more complex it is,
OO can make it easier to manage its design and maintenance. But this means
you have to think of the problem itself from the OO point of view to start
with.

You still have to do algorithms part ofcourse, but OO is a sort of a
framework, if you will, which guides one on how to design and layout the
application. The implementation of the methods is where algorithms go to.
The interactions between different parts of the application is where the OO
effect comes to play.

But you must start the design with OO point of view to obtain its real
benefits, i.e. follow standard OO design (find what are the main types
(classes are) which are determined from what are the main objects involves
in the problem you are trying to solve, determine relations between the
types, public interface to each object of such types, properties of each
object, inheritance between types etc....i.e. all the good OO stuff) then
when it comes to the details of the methods that each object implements,
then you put on your algorithm hat on at that time.

I think even just doing object-based programming vs. full object-oriented
programming is useful enough to try to do.

--Nasser

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
object oriented Matt Fetterman 19 Oct, 2009 22:14:03
rssFeed for this Thread

Contact us at files@mathworks.com