Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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 :)

In reply to (Revelation) Re: Where/When is OO useful? by Revelation
in thread Where/When is OO useful? by jarich

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-18 12:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found