This is a review of the Atlas UpdatePanel Control PDF By Bertrand Le Roy and Matt Gibbs published by O'Reilly.
The PDF was written Bertrand Le Roy and Matt Gibbs, members of the Microsoft “Atlas” architecture and development team. I subscribe to Bertrand's blog (you can't go wrong subscribing to a blog whose title is "The universal answer is in building 42") and the content on his blog about Atlas is always great so I expect this PDF to be great as well.
According to the PDF: "You'll learn what you need to know to make UpdatePanel part of your application pages. You’ll also learn how to use the control to improve the performance of an ASP.NET Wizard control; create a better master/details page for the AdventureWorks database; and add a pop-up preview to a search page. Finally, you’ll learn how to display UpdatePanel error messages and deal with its quirks and limitations. In short, this PDF has exactly what you need to begin adding the interactivity of AJAX to your ASP.NET 2.0 applications today."
The PDF starts of with a history of XMLHttp up to the Atlas UpdatePanel. It talks about how Microsoft was using XMLHttp with their Outlook Web Access product. This is often overlooked when people talk about Microsoft and Ajax. One thing I found interesting was that Classic ASP supported remote scripting using Java Applets and ASP.NET did not support remote scripting. The ancestor to the update panel was called the RefreshPanel. The purpose of the UpdatePanel is to hide the interaction between the browser and the server.
The PDF points out that for the majority of user input actions, a webpage does not need to be refreshed. I agree with this statement but I think you really need to think about the design of your page before adding AJAX/Atlas to it. Thinking about what will need to be refreshed on a postback and what doesn't need to be refreshed is crucial to providing the user with a good experience while using your software. Things like images, menus, forms etc do not need to be refreshed and I am happy that the PDF pointed this out.
Atlas uses project templates to setup Atlas websites. One thing I have noticed is that the teams at Microsoft have been using them in a lot of their beta software. The PDF shows you everything that the project template does for you in order to give you a ready to use Atlas website. This is very valuable information as if anything ever goes wrong it can help you troubleshoot. The PDF even points out that you will need to do these steps in order to Atlas enable an existing website.
Here is the minimum requirements you need to add an UpdatePanel to your webpage:
<atlas:UpdatePanel EnableViewState="true|false" Mode="Always|Conditional"
RenderMode="Block|Inline" >
<Triggers>
<atlas:ControlEventTrigger EventName="" />
</Triggers>
<ContentTemplate>
<!-- HTML and ASP.NET content goes here -->
</ContentTemplate>
</atlas:UpdatePanel>
The PDF proceeds to explain the sections of the UpdatePanel. The content template area sends back to the client, only the HTML specified in the ContentTemplate area. The content is accompanied by the updated viewstate data, header and scripts!
The PDF points out that if the UpdatePanel mode is set to Conditional the the UpdatePanel relies on the Triggers collection to update the controls contained in the ContentTemplate. This is very powerful and cool.
The PDF points out that Atlas has a TimerControl control that ticks on the client side and triggers a postback on each tick. This is great for situations where you need to autosave a form but the PDF reminds us to keep in mind that scalability can be a problem.
The PDF now moves on to "3 increasingly complex examples" on using the UpdatePanel, each example begins from an ASP.NET 2.0 page that runs without Atlas. The first example shows you how to build a wizard control without Atlas and then once you have it working you enhance it with the Atlas UpdatePanel to eliminate the postbacks. It was very easy to add the extra Atlas functionality.
The second example is a GridView that shows images of various products in the AdventureWorks database. Once, you have it built the PDF once again shows how easy it is to add an UpdatePanel to an existing page. In this example we get to use the UpdatePanel triggers to trigger the Ajax call. On a side note, I was impressed with the use of a HttpHandler to return images to the master/details pages.
The third example extends upon the second example and adds search capability to the GridView. What was interesting to me in this example is how they show how a strategically placed UpdatePanel can lead to a more fluid user experience. The PDF also points out that placing an UpdatePanel around a search box can render the back button on a user's browser useless and you should distinguish between navigation operations and application operations when thinking about your UI design. It would be awesome if the Atlas team could make navigation operations easier to manage in the final version of Atlas.
Last of all, the PDF shows you how to deal with displaying error messages and various caveats you will run into using the UpdatePanel. I am starting to think every control should have a PDF out available, it would save me a lot of Googling :)
In conclusion, the PDF is a great reference for anyone looking to learn a lot about the Atlas UpdatePanel. I highly recommend giving this PDF a read and spending the $10 to purchase it. I would even go as far as to call it the definitive guide to the Atlas UpdatePanel. Check it out here: http://www.oreilly.com/catalog/atlasupc/index.html