Extending Add Page (with presenter) with async capability

Topics: Web Client Software Factory
Oct 24, 2008 at 9:19 AM
Edited Oct 24, 2008 at 9:21 AM

Hi,

Some operations have a long duration, and in that case it can be a good idea to use an asynchronous page.

My suggestion is to make it possible to make a page asynchronous when adding pages with the Add View (with presenter) recipe. It could be done by adding a checkbox under the Show documentation after recipe completes, where you could check if the page should be asynchronous.

To make the page asynchronous add page directive Async="true" in view.aspx.

In View.aspx.cs add

AddOnPreRenderCompleteAsync (

                new BeginEventHandler (BeginAsyncOperation),

                new EndEventHandler (EndAsyncOperation));

in the Page_Load method and these two methods:

IAsyncResult BeginAsyncOperation (object sender, EventArgs e, AsyncCallback cb, object state)

 {

    // TODO: Begin async operation and return IAsyncResult

    return null;

}

 

void EndAsyncOperation (IAsyncResult ar)

 {

    // TODO: Get results of async operation

 }

Sincerly
Morten Ulrik Pedersen
Oct 27, 2008 at 6:43 PM

Hi Morten,

 

You might want to add your suggestion to the WCSF Issue Tracker. In this way, you can share this feature with the community, so they can vote to add it in future releases of WCSF.

 

Ezequiel Sculli

http://blogs.southworks.net/esculli/

Oct 28, 2008 at 9:26 AM
Hi Ezequiel,

I'll do that :-)

The Issue can be found here: http://www.codeplex.com/websf/WorkItem/View.aspx?WorkItemId=19204

Sincerly
Morten Ulrik Pedersen