Is PageFlow overdesigned?

Topics: User Forum
Jan 3, 2008 at 8:46 AM
I'm a green-hand of the WCSF. In the process of using the PageFlow, I encounter some problems:
1.It needs more and more code to process the page jump the before.
2.It's diffcult to control the state of the pageflow because we can jump to a page in different way( Backward button, navigation and so on).
3.If I use the backward button of the IE, or the item in navigation to transfer the page, I usually get a exception when I return the former page.
So I wonder that
1. whether all the page jump need pageflow?
2.whether every time load the pageflow, we need to set the current page and resume or restart the page flow?
Developer
Jan 4, 2008 at 6:24 PM
Hi


2. It's diffcult to control the state of the pageflow because we can jump to a page in different way (Backward button, navigation and so on).
3. If I use the backward button of the IE, or the item in navigation to transfer the page, I usually get a exception when I return the former page.


From the WCSF Documentation:

In the Page Flow Application Block, the effect of the back button depends on whether the page flow is constrained:
  • If the page flow is constrained (has the Constrained property set to true), the application block prevents users from using the back button to navigate to the previous page. Similarly, the application block prevents the user from navigating by entering a URL for a page that is not within the current page flow definition.
  • If the page flow is unconstrained (has the Constrained property set to false), users can use the back button to navigate to the previous page and they can randomly navigate to other views in the page flow.

Developers of Web client applications must handle the back button in a way that is consistent with users' expectations and the business process. For a presentation process, the back button typically translates into rewinding the associated business activity. For example, a page flow for a funds transfer prevents the user from reprocessing the transfer if the browser's back button is used (or if the user types a URL directly into the browser). Other use cases can allow the user to use the back button to navigate. Developers can use the Page Flow Application Block to define the desired behavior for each page flow definition.



1. Whether all the page jump need pageflow?


You can use Page Flow in modules where you think that will be useful. If you are using Page Flow and you want to terminate it and navigate to another page, you should first call the Abort method and navigate to another page (if you call the Abort method passing true as a parameter that will redirect to the page setted in the AbortUrl property.


2. Whether every time load the pageflow, we need to set the current page and resume or restart the page flow?


I recommend you to review the following:
  • Web Client Software Factory - June 2007 -> Inspecting the Software Factory -> Application Blocks -> Page Flow Application Block -> Development Activities -> Suspending and Resuming a Page Flow topic in WCSF documentation
  • Page Flow with Shopping Cart Quickstar (you will need to install the source code of the factory)
Please let me know if this helps.

Mariano Converti
http://staff.southworks.net/blogs/mconverti/
Jan 7, 2008 at 8:06 AM
Thanks for your reply!
It really helps a lot, althoug there is still much knowledge I need to understand, I know how to investigate it.