You never know which web parts end up in a SharePoint page. That is the power of web parts: combine them the way you see fit. But what if one web part accesses a web service that takes 3 seconds to complete, and another web part renders content from a database that takes 4 seconds…. If the web parts are not programmed with asynchronity in mind, you will end up with a rendering time of 7 seconds for your page, instead of just over 4 seconds as could be achieved when you follow “the rules”…
The SharePoint web part framework has great support for asynchronous actions in SharePoint, including support for timeouts on asynchronous actions.
For more information on this topic see:
- The SharePoint SDK documentation (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/html/smpxAsynchDataFetch_SV01031354.asp)
- An interesting article “Web Parts living together in Asynchronous City” on this topic at barracuda: http://barracuda.net/members/AsyncWebParts.doc. It is a pity that you have to logon to access the article at Barracuda, but you can create an account very easily. It is worth it, they have a lot of other interesting information.
- A supplemental chapter by Thomas Rizzo on web part development: http://www.sharepointcustomization.com/resources/whitepapers/Web%20Parts2003.pdf