Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best practices for web application workflow?

Tags:

asp.net

Note: By workflow i'm not referring to workflow technology, such as Workflow foundation.

All too often I find myself being required to design pages that flow through a series of steps.

1) Select from a set of options. Submit. 2) Populate a page with results. Make changes. Submit. 3) Do something based on the previous results. Submit. 4) Confirm previous actions. Submit. 5) Goto 1.

An ecommerce site with shopping cart would be a textbook example of this.

Now, there are any number of ways to deal with this. My question is, what is the recommended way to do it in asp.net? In PHP or ISAPI I would just use standard html controls, get the post data and do stuff with it, each on a different page.

ASP.NET seems to be more oriented towards single page solutions. Do your work, postback to yourself, then display your results in the same page.. moving along until the end, using something like a MultiView or UpdatePanels to do the job. But the key being, you don't postback to another page.

Now I understand that Microsoft has added cross-page postbacks to .NET in recent versions, but this seemss less baked and kind of cumbersome. It's difficult to work with data that was posted back unless you expose it via properties or something from your previous page.

How do you handle the scenario I layed out above? Do you use a multi-view or updatepanel and do it all in one page? Or do you do it in several pages? What is your best practices in this regard? Do you have any specific designs you tend to use? How do you go about structuring the sites workflow?

like image 247
Erik Funkenbusch Avatar asked Jul 18 '10 21:07

Erik Funkenbusch


People also ask

What is workflow in web application?

A web design workflow is a collection of processes that cover every step involved in creating a website. It doesn't simply take into account the actual design process, it encapsulates everything from the preparation stages right through to post-launch.

What is the workflow?

A workflow is a system for managing repetitive processes and tasks which occur in a particular order. They are the mechanism by which people and enterprises accomplish their work, whether manufacturing a product, providing a service, processing information or any other value-generating activity.


2 Answers

there are a number of ways of doing it (besides multi-view):

1, asp.net dose support action post, goggle Page.Request.Form[item] http://msdn.microsoft.com/en-us/magazine/cc164151.aspx#S3

2, you can save your temp data into database temp table, then when users go through each page all they need to do is reference the temp data ID in database. (Query String)

3, you will also be able to save your temp data as a object in your session, so all your pages in the "work flow" can reference the session, then making manipulation based on it.

after all, they all have pros and cons, it mainly depends on how complex your project requirements are.

like image 108
D.J Avatar answered Sep 18 '22 04:09

D.J


For these kinds of situations, I have used multiple panel controls to hold the various steps of the process. Set the visible property to display the UI for the portion you want the user to see.

You might also want to look at the Wizard Web Server Control which handles the plumbing for navigating between the steps of the process. To get some ideas on how the control works, take a look at The ASP.NET 2.0 Wizard Control.

like image 36
DaveB Avatar answered Sep 17 '22 04:09

DaveB