Hi all,

This is really a design philosophy question more than Perl, but since Perl is what I write in...

I'm a one-man wrecking crew on what began as practice. It's a project that now has 12 modules, and ~70 methods. The goal from the start was to ensure that I could script everything, but put a web GUI on top of it (plugin), so that staff could use it as well.

I feel like the GUI is becoming too large a part of the project. The more code I write, the longer my tests get. I'm putting more core logic into the GUI than I should be. For instance, I've tried to keep everything within an objective programming style, and this is how things would work:

my $client = ISP::User->new( $username ); my $plan = $client->get_plan( $plan_id ); my $transac = ISP::Transac->create_transac( \%data ); $transac->sanitize(); $transac->renew( \%data, $plan, $quantity );

...although an example, it's close to reality. However, I've never done programming at the level or scope that this project is becoming, so with the implementation of the GUI, my tests are requiring more 'logic' code built in.

What I'd like to ask the Monks is thus:

What literature (ie: books, whitepapers or docs) and/or feedback would help a budding rookie get a better feel for design strategies? I'm looking for tips on how to identify when a function should become two functions. Is it when a function can't be displayed on a single screen? Is it when it can't be modified to handle any more 'edge cases'?

How can I get better at forseeing my end layout, when all I have is an idea?

Steve


In reply to Looking for help with design philosophy by stevieb

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.