Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Generally, I try to design applications in such a way that there is one object/class structure which is specifically concerned with “the web application,” and these objects in turn employ another set of objects/classes which are designed to be agnostic.   You wind up looking at the task in front of you from two different levels of concern.   The first level is one that does not care how the request is being made; that is strictly concerned with the job and how to do it.   “An application,” any application web-or-not, is obliged to use them in some certain, correct, way.   The second level is strictly concerned with the flow of “web application” screens and with the steps needed to populate them.   It uses the first set of objects to do so.   (So the web-app doesn’t look as you might expect ... no database queries in the (web-app) “model” layer, for instance.   Likewise, the worker objects don’t reflect MVC.)

The reason why I do it this way is that, no matter how hard a web-application framework strives to be “general,” it is very constrained by the strictures of the HTTP protocol.   It has a lot of baggage that has to be there, and the class-structure of any framework is unavoidably designed with the presence of that baggage in mind.   I look upon the web-app as simply a user interface.

In reply to Re: Accessing catalyst app outside request/response cycle by sundialsvc4
in thread Accessing catalyst app outside request/response cycle by mzedeler

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?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others contemplating the Monastery: (4)
    As of 2017-12-17 15:35 GMT
    Find Nodes?
      Voting Booth?
      What programming language do you hate the most?

      Results (464 votes). Check out past polls.