Sounds to me like your need to read about
patterns in OO (I just bought this book and can recommend it). It doesnt deal directly with perl, however the patterns can be applied. (check out
this site for some perl specific reading).
Now, depending on the structure of your site, will depend on the pattern you choose to implement.
There are two ways to go about this i reckon.
- Design your site with no concious thought to a "formal" pattern, then read up on patterns and find one which suites your design.
- Read up on patterns, and choose one that fits your problem.
IMO, either way, if you're looking at reusable objects and OO design in general, you really need to look at (and understand) patterns. Before I read about patterns, my designs came close to what a pattern was defined as, however there was "something lacking". After some reading of various patterns I had the tools in place to design a "more complete" solution.
Now this may not be what you're after, however, understanding at a top level what you want to do before jumping in and coding 1st is a much better way do design IMO.
Best strategy? There are definately ones (patterns) that will not suit, however there are quite a few that probably will. In fact, there may be multiple patterns you can employ in your solution.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.