The trick is to figure out which parts of the system going into which part of the MVC (Model-View-Controller). In my experience, most of the work ends up in the Model part, which doesn't really care why or how you are looking at it. It's general code to do all of the interesting work without thinking about how you actually look at the data or how you tell it what you want to do. Above that is code to take those results to show it to us (the View) and other stuff to let us make it do things (the Controller). The V and C portions really aren't all that tough: they translate our requests into things the model can do, the translate what the model did back to our environment. They are really just adapters between our application and the Model.

Things don't end up in a single file because the idea is that there is no monolithic application. The Model should be able to use any View or Controller. It's not just a web application because it could be a SOAP thing, or a terminal interface, or something else. The Model should exist separately from a particular use of it.

Once those things are decoupled, people can work on the different layers and different parts without colliding with each other.

--
brian d foy <brian@stonehenge.com>

In reply to Re: CGI::Application in a team development environment by brian_d_foy
in thread CGI::Application in a team development environment by jeyroz

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.