Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
If the target database supports it, I place as much of the sql as possible in a stored proc layer. The stored proc layer can/should contain procs for retrieving, inserting, modifying and deleting business objects - let the stored proc layer handle all the joining and other table maintenance. You as a front-end developer need not worry about it. Once that stored proc layer is in place, you can then automatically create a thin perl wrapper around the stored procs (query the db, find the procs and params - write code to create code). You may need to manually tweak the module but if the proc layer is competently designed and implemented, you shouldn't need to. In the past, I've coded up the thin layer as a 'uses' module that just basically passes everything off to a contained DBI object. You could always subclass DBI, but I always have a more comfortable level by constraining DBI than opening it up for full use.

-derby


In reply to Re: Re: The crime under reusability by derby
in thread The crime under reusability by pg

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 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? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2022-09-25 01:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer my indexes to start at:




    Results (116 votes). Check out past polls.

    Notices?