Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I don't think you're missing anything. It seems to me a nice MVC design that allows you to separate concerns cleanly is the way things are going right now. There are several excellent Perl modules that have come out in the last year or two that are all hitting this key area. Some have been mentioned above. We use CGI::Prototyped.

Yes, the HTML part is tedious, but I think it's still necessary for a few reasons:

  • Different people working on different parts. As already mentioned, in many places different people work on the HTML and the business code. Better to let the HTML people work in something close to a standard language.
  • Prototyping is much easier when the designers can mock things up in HTML and easily convert that to a working app using most of the prototype. If you have a meta language in there, less of the prototype can be used as-is.
  • Custom requests still happen all the time, at least in my shop. You may come up with a CRUD design that you can just crank out, but we still end up with special requests for changes to the look and behavior. This is easier to accommodate and maintain in a separate HTML-based view.
  • Maintenance is easier with a standardized system. You can pass things off to others and they can figure it out because the view is based on some standard module like Template. The business code is in straight Perl. The DBI code might be in Class::DBI. Tricky automation systems can be very cool, but they can also be fragile.

Given the limitations of the web as a medium for allowing people to do work, I know I have felt that using these MVC Perl modules is light years ahead of where we were. With the INCLUDES, WRAPPERS, and MACROS in Template::Toolkit and the OO inheritance provided by CGI::Prototype, we can re-use just about as much common stuff as possible. Yet we can still be responsive to custom requests at the HTML/CSS layer.


In reply to Re: Form generation by cbrandtbuffalo
in thread Form generation by matthewb

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, 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, 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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others browsing the Monastery: (6)
    As of 2021-03-03 00:16 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      My favorite kind of desktop background is:











      Results (67 votes). Check out past polls.

      Notices?