Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: (OT) Work flow in Web based applications

by domm (Chaplain)
on Nov 07, 2002 at 08:25 UTC ( [id://211018]=note: print w/replies, xml ) Need Help??


in reply to (OT) Work flow in Web based applications

In addition to the generic solutions/replies, here is an a little bit more detailed explanation of how I solved a similar problem:

The project involved Case Studies of some sort, each Study consisting of some data (description, location etc) and an unspecifed number of contact adresses, URLs and file attachments.

If you insert a new Case Studie, the application has to go the following different steps:

  1. Generate a form to insert the generic date (title, description, ..)
  2. Save this date, thereby generating a new object in the DB
  3. Insert Contact Adresses
  4. Insert Links
  5. Upload Files
  6. done
The URIs to handle these steps looked like this:
  1. /casestudy/insert/1
    generate form, action of the form-tag is '2'
  2. /casestudy/insert/2
    generate new object in DB - now we knoe the ID of the object and redirect to
  3. /casestudy/case0001.html/insert/3
    Two different things happen here:
    • List all linked contacts (including buttons to unlink them etc)
    • Add new contatcs:
      Call /contact/insert/1?link_with=case0001 and thus start inserting a new contact (or selecting an existing one), link it with the Case Studie and the redirect to /casestudy/case0001.html/insert/3 to repeat the process
    Additionally, there is a button called "finished with contatcs" that takes you to:
  4. /casestudy/case0001.html/insert/4
    same as above, only with links
  5. /casestudy/case0001.html/insert/5
    now fileupload
  6. done.
The main point here was that I defined insert sequences for each data type that would work on there own. On the one hand this was a requirement (i.e. you should be able to just add links without a Case Study), on the other hand, this saved me from going crazy because I could implement and test each data type on its own and then just link everything together.

All this is done with some mod_perl handlers, but you could just do it with CGI and "regular" parameter passing (i.e.: /cgi-bin/insert.pl?type=casestudy&step=3&id=case0001 )

You can take a look at a (German) implementation here (with News, not Case Studies, but it is basically the same..), but please don't enter too much junk, because somebody will have to weed it out afterwards...

-- #!/usr/bin/perl for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://211018]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-03-28 15:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found