Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

(Revelation) Re: Where/When is OO useful?

by Revelation (Deacon)
on Jun 21, 2002 at 06:57 UTC ( [id://176238]=note: print w/replies, xml ) Need Help??


in reply to Where/When is OO useful?

Using OOP:
Personally, I find object oriented programming to be most useful when coding for abstraction, and structure. Object oriented programming is a much more serious commitment, that programming in general, because I find myself more committed to revision, optimization, and incite into my data. Packages that focus on abstraction, and being useful in many situations seem to be easier to write, as well.

Object oriented program seems to go hand in hand with modeling the input data, something that I don't find myself doing most of the time. This goes hand in had with better algorithms, increased efficiency in SQL queries, and consistent data parsed. All this leads to well structured, clean code; usable in the future, and soapy clean.

Data modeling makes us look at the most important factor in our code, the initial data sent to the script. OOP stresses an underlying structure that can deal with this data methodically, and with an inherited structure, forcing a more thorough data analysis, reducing development time, and ensuring more accurate coding. Part of data modeling is 'data hiding,' preventing classes from accessing data meant for their counterparts, allowing for greater security.

OOP allows me to abstract subroutines, optimize quicker, and revise in smaller chunks. Programming for data manipulation, instead of functionality brings structure, and detail into the code earlier in the game. Structure has always been a great virtue in code, and OOP allows me to get to that clean structure that it seems to so elastically bind around.

Adding to the list from my thoughts:
  • Use OO when maintainability counts.
  • Use OO when structure is lacking, or for abstracting structure. (much like your fourth suggestion.)
  • Use OO when logic fails, or has little use, but data manipulation seems to bring us closer to the goal.
  • Use OO when you know how to use OO. Don't just go and bless something, and tell us you're OO programming, use it if you know how to manipulate it and the methodology it gives you in programming.

I do not claim to know what I'm talking about :)
  • Comment on (Revelation) Re: Where/When is OO useful?

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://176238]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (9)
As of 2024-04-23 18:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found