First, I model the data, and the relationships between the data. Sometimes I'll use an editor like Umbrello, or simply sketch some UML on some paper. Other times I'll just hack Class::Tangram classes directly (as Class::Tangram has quite direct correspondance to most UML data model forms).

Once I've got this model (represented as Class::Tangram classes), I'll write test cases for each class that tests any "special" actions that the object needs to do, for instance, password encryption and authentication on a User object.

The next stages really depend on what the application is doing. Sometimes the next stage will be to plug the classes into a Tangram::Schema, so that I can save them to a database. Sometimes the database plays a more direct part in the planning stage, if there is an existing data form I need to represent and map to.

I find that once the data model is good, writing the actual program is just a matter of joining the dots... which of course can often take a lot longer than you think ;-).

$h=$ENV{HOME};my@q=split/\n\n/,`cat $h/.quotes`;$s="$h/." ."signature";$t=`cat $s`;print$t,"\n",$q[rand($#q)],"\n";

In reply to Model the data first by mugwumpjism
in thread How do you program (again)? by wazoox

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.