in reply to Re: Web: interactive, REST: batch?
in thread Web: interactive, REST: batch?

I must not have explained myself very well -- the web part and the REST part run from the same Perl code, they just output using different TT2 directories. It's impossible for them to be out of sync, unless you count the 'race condition' where two files arrive via REST and a user gets a web page generated after just one of the files has arrived and worries that the other file is missing.

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Replies are listed 'Best First'.
Re^3: Web: interactive, REST: batch?
by dsheroh (Monsignor) on Dec 21, 2007 at 18:40 UTC
    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.