It seems to me that if you write your system with good object-oriented technique, you shouldn't have a problem allowing the extension of functionality, regardless of the planning.

Keep in mind I know nothing about the specifics, but let's say, for example, you have a Forum::Format module. This module has the methods:

$f->formatPost() $f->outputPost()
You can also define the abstract or stub methods:
$f->preFormatPost() $f->postFormatPost() $f->preOutputPost() $f->postOutputPost()
If some other class is calling the  $f->formatPost() method, make sure it calls $f->preFormatPost() before and $f->postFormatPost() after. Even if the abstract versions of these classes do nothing, future module writers can have their classes inherit from Forum::Format and override these methods or even rewrite your Forum::Format module without changing a thing except for these two methods. I realize your system may be a bit more complex than this and having future writers rewrite one of your base classes is a bad idea, but the idea of leaving "hooks" for pre/post formatting (or other actions) is still sound.

Additionally, anything you do inside the Format method could call other methods that can be overridden. So if, within Format, you call $f->modifyHTML($text) or something similar, that method can be overridden to modify HTML differently in a child of the Forum::Format class.


In reply to Re: Best way to 'add modules' to web app? by DBX
in thread Best way to 'add modules' to web app? by BUU

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.