Monday, March 26, 2012

Programming model question for Atlas apps

Hi,

I am designing a new web application and hope to leverage Atlas to make a better user experience than a regular ASP.NET web app. One of my things I hoping to archive to is to eliminate the need to have multiple ASPX pages.

Here is a scenario:

The web page may contain a left navigation panel that contains three links:

  1. Step 1
  2. Step 2
  3. Step 3

If I am to design a regular ASP.NET web app, I would make each of the links point to a separate ASPX page. Each of ASPX will share a common chrome such as header, top navigation panel and left navigation panel, but the main content area will be different. I would use a shared master page for them. The drawbacks of the traditional approach are:

  1. Opening each link will cause screen flickers
  2. There will be network delay from one step to another step that I can not reduce by preloading asynchronously.
  3. Each step will add to the browser history that my designer does not like.

I am hoping that Atlas will allow me to collapse all these ASPX pages into a single ASPX page, but I could not find a good approach. Specifically, I didn't find UpdatePanel useful for my design.

I am very interested to hear suggestions on how to archive my design objective. Thanks in advance.

Wei Zhu

hello.

well, you can use atlas to do this, though i really think that eliminating the history may not be a good thing. for instance, when i go to a web site, i really enjoy using the next and back buttons...and regarding to the delay, i really don't think that a normal asp.net page that has been modified to use atlas will be quicker that a traditional page.


Hi Luis,

Can you tell me how to use Atlas to achive my objective?

Regarding whether it is wise to eliminating IE history, I guess some people like it and some people don'tSmile [:)]. I personally don't have a strong opinion on either. As for the network delay, my thought is that using Atlas, maybe I can preload the UI for the step 2 asyncroulsy while user is still on step 1. However, reducing delay is more of an extra bonus credit, not a requirement.


Wei Zhu,

A simple approach to accomplish what I have interpreted your requirements is this:

Your left navigation could be setup as LinkButton controls.

You could put all 3 "pages" of content into a MultiView control.

On the postback of each LinkButton control, you could dynamically show and initialize all controls on the corresponding "View" of the MultiView control.

Surround all of these controls with an UpdatePanel and the result should be a page that appears to work completely clientside using the Atlas framework.

Hope this helps.

Ryan


Thanks Ryan.

I have considered using MultiView inside an UpdatePanel, but I think it will run into the following problems.

1. If I use Validators in each view, then switch view will cause a postback and the validators on those views that haven't been viewed will raise errors and prevent the postbacks from even happening.

2. This approach does not appear to be scale well as the number of views increase.


OK, I may have found a solution. The solution basically is to create a ASCX user control for each view, then load each user control dynamically using Page.LoadControl() inside a UpdatePanel. I did a quick test and it seems to work, although I still need to try it more.

This solution still does not address how to preload next view. It feel like possible to me, but I don't know exactly how to do it yet.


Have you considered using a Wizard control inside an update panel?

No comments:

Post a Comment