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

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
IMHO Objects are the way to go if you have the time.

I came to my current employer and suggested objects. There is already Perl code that will do everything I want, here. The fallacy as I see it in the current work situation is that people keep re-inventing the wheel. They take that one liner and change it to what they need it for. There's nothing wrong with that until you see two people doing the same task different ways.

This is what is happening at work. I was tasked with combining all of the different methods people use and create one method for the task. I initially thought that I could write a Q&D (Quick & Dirty) script to solve the problem. I decided against that when I realized that through object orientation I could take almost all the tasks around here and standardize them.

Here is how I approached it. Our business is based on information contained in a database. We do two things: we either put information into the database, or we take information out. That is it on the simplest level. Taking the information out is always the same. It's putting the information in that causes a lot of headaches because of the different formats of information.

My solution is to create an object that contains the information, an object that connects to the database, an object that loads the information to the database, an object that extracts the object from the database, an information destination object and an information origin object.

Thus the loading and extracting tasks could be standardized with flexibility to change any portion of the process.


In reply to Re: Hacking with objects by fmogavero
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 studying the Monastery: (7)
As of 2024-04-18 11:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found