Lets pretend you just got done with a meeting with a potential new client. After getting a feel for what he was after you compiled the following list of requirements.
- The module must be efficient. The overall user experience is very important.
- The module needs to show a hierarchy of divisions
- Upon selecting a division a grid of stats for the players in that division should display
- The grid should allow for sortable columns
- Selecting a row in the grid should update another pane with that players detailed information, including graphs of important stats
Furthermore, you were able to sketch out a rough idea on how the module would look.
I'm sure a lot of readers out there are saying that they would code it in the normal ASP.NET manner. Meaning, utilize a treeview for the division hierarchy. On click of a division do a postback to refresh the gridview control with that division's statistics. On click of the gridview's column header, do another postback to re-sort the data. On click of a player's row, do a postback to show the Player Profile using Inter-Module Communication or something. Since priority one is the module's efficiency we could try wrapping the whole thing in an UpdatePanel to minimize the screen flicker.
The problem with this approach is it is not as efficient as it could be since all we have done with the UpdatePanel is hide the actual work going on from the user. What I mean by this is with each UpdatePanel postback, the entire form is getting sent to the server, and almost the entire server-side event lifecycle is processed. The only real savings is that the response from the server is smaller than it would have been under a normal postback.
If you ignored the fact that the solution was to run in a web environment, would your design be any different?
If this topic interests you, join me in the DMD302: Building Advanced Modules Using DotNetNuke WebControls at the Open Force Las Vegas to see the approach I am offering.