Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
By the sounds of it, the coding that you do is done on tiny tasks, for which OO isn't really meant, IMHO.

In my (day job) situation, we're using OO for a project (that doesn't use Perl, because it features a few stupidly complex GUI widgets in it :) that has over 200 stored procedures behind it, a 30 tablish database, and about 20,000 lines of code (ballpark). OO works quite well for it though.

For example, my current task is to write an abstraction layer for creating database tables from the source code (rather than in the procs). The OO paradigm is nice here, because the interface to creating these tables (via the set of objects I'm creating to encapsulate this process) can stay exactly the same whilst the database vendor should change, or a version upgrade should change the SQL statements necessary to create tables.

OTOH, a "side job" I'm doing is a simple CGI shopping cart site (maybe 500-600 lines of Perl, if that), for which I haven't even considered OO because it would be overkill.

Overall, I really like the OO paradigm because to me it seems like a natural way of thinking about the way pieces interact within a complex system. But for small administrationish type scripts (or simpler CGI scripts), unless you have time to burn (or want to learn something fun), don't OOverdo it. :P


In reply to Re: Hacking with objects by mothra
in thread Hacking with objects by frankus

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: (4)
As of 2024-03-29 09:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found