I've written a web application that my company is using internally for transferring files. It's sort of like an ftp site, but with user accounts, projects and automatic removal of stale files. It's called File Exchange Server, or FES (fez).

I designed it from scratch to be able to be bilingual; it can operate either as a web application and output HTML/CSS, or work as a REST application and provide 'just the facts'. Because of time pressures, I got the web side working fine and rushed it into Production where it's working very well. Now it's time for me to go back and get the REST side working again.

I have a suite of tests that exercises both the web side and the REST side. The REST application test is failing almost immediately because of a page FES jumps to right after log-in that warns the user that some of their files are stale and need attention. There's no equivalent page on the REST side, but this raises an important issue (after three paragraphs, I hope so).

Should the RESTful interface behave exactly like the web interface to an application?

I think the answer is no -- REST is there just to get the facts. The web interface can do anything, because there's a human on the other end. But we're going to be using FES in an automated system, and the automated system wants to get in and get out with a minimum of fuss. It doesn't care about anything that's not relevant to the job at hand, which is a) log in, b) get that file that I came for, and c) log out.

Thoughts?

Alex / talexb / Toronto

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

Update: Correct minor typo.


In reply to 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.