get_x() and set_x doesn't necessarily have to be db retrieval, etc. What if I am getting a listing of files on disk?

Leave that up to the implementation of the class you are building.

I think I should keep get_directory_list() doing a normal return of array ref to list of files for a directory- for development, for coding use. And I would still need get_directory_list_prepped()

I would consider using one method, get_directory_list(), and pass a parameter in that specifies what kind of data structure to return. I might even consider using a Factory Pattern.

Yes, your suggestion is golden in regards to db retrieval! Althought- it *could* cripple preformance for large datasets- right?

Thanks, that's just advice i have picked up from hanging out here at the Monastery. As for large datasets ... anything that returns large datasets should be identified and handled accordingly. Sometimes you can even apply outside solutions to the problem, so don't think you have to always sacrifice development/maintenance effeciency for runtime efficiency. And as for data ... well, data is as data does. :) I have used AJAX in conjuction with Perl to handle "real time" lookups and it wasn't so bad after all.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

In reply to Re^3: Consistent naming for methods that return HTML::Template prepped data? by jeffa
in thread Consistent naming for methods that return HTML::Template prepped data? by leocharre

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.