I can see some problems with using a mode stack in the context of a web application. I've seen this approach used to good effect for desktop applications, but I think it's a little trickier for a CGI script.

The first thing that comes to mind is, what do you do with incompletely entered data? Let's say your "add a product" screen has 10 fields, plus the "assign contacts" area. I fill in all the fields, then realize my contact doesn't exist yet. So I jump to the "add a contact" screen.

In a desktop application, this is fine; the contact entry screen appears "on top" and once I'm done adding the contact, I return to the product entry screen, with the state of everything (including whatever I typed in those 10 fields) fully preserved.

But in a CGI context, what happens? Do you create a new product record in the database, with my (perhaps partially entered) product information? If so, there are obvious potential problems. (What if I realize I don't know all the contact information yet, and it's time to go home, and I'll deal with it tomorrow?) But if not, then when you return me to the product entry screen, I have to re-enter those 10 fields.

I'm just thinking out loud here... haven't really thought it through. But I wonder if you could use popup windows and/or frames, combined with JavaScript/DHTML for updating, to get the same effect you have in a desktop app where a new mode can be pushed onto the stack without touching the state of anything beneath it.

Sorry if this was less than lucid. I'll try to elaborate and/or clarify when I have a chance.

Cheers,
--Kevin


In reply to Re: (OT) Work flow in Web based applications by kshay
in thread (OT) Work flow in Web based applications by Ovid

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.