Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: (OT) Work flow in Web based applications

by Aristotle (Chancellor)
on Nov 06, 2002 at 21:01 UTC ( [id://210907]=note: print w/replies, xml ) Need Help??


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

I don't think you need to pull out the heavy artillery.

"Defining a workflow" is a good way to put the solution. What you do is define what data a single task requires, and keep track of the data in a session object or something of the sort.

In your case, that would be:

  • Product data
  • Contact
    • name
    • data
  • Contacts listed completely

The last item is simply a flag; it is set when the user says he is done adding contacts. Then you define a series of forms that collect various bits of this data; f.ex, if the user enters a known contact name, you can pull out the corresponding data immediately (or just set a flag that it's there). Then your logic simply looks at the blanks in the session data and branches to the form for the first unfulfilled prerequisite.

If you completely decouple that last step - deciding where to send the user based on the blanks in the data - from the code that collects the user's response and fills out whichever blanks it can accordingly, the desired behaviour of leading the user through all the steps will just fall out naturally. What's better, as you add or remove bits from the definition of the session, the framework will automagically send the user to the right forms.

Makeshifts last the longest.

  • Comment on Re: (OT) Work flow in Web based applications

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-19 22:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found