This is basically the approach that I would take as well, so I think you're at least on the right track. For the specific point that you're asking about, it sounds like the "there are stale files" page is essentially just a click-through warning, is it not? (It may also contain links to do something about the cause of the warning, etc., but I'm talking about its core function/nature.)

If that is the case, then it's not essential to the app and it has a sensible default exit behaviour (i.e., "user clicks OK and continues on to the same page they would have gotten if there weren't stale files"). I would, therefore, have application check to see whether the corresponding template exists and, if not, just skip over the page and jump straight to the default exit behaviour. For the REST interface, then, you just delete the template for that page and it will skip over the warning. Later on, this also allows you to easily remove the warning from the interactive interface (delete the template) or add the warning to the REST interface (create a template) as requirements change, all without requiring the application to know (or care) which interface is being used, just which template directory to use.


In reply to Re^3: Web: interactive, REST: batch? by dsheroh
in thread Web: interactive, REST: batch? by talexb

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.