I have been spending a significant amount of time recently learning the ASP.NET 2.0 Web Part Framework. I have been very impressed with what is offered. I could not have gotten to this point without some good resources. I have already wrote up previous posts on different web Web Part sources here and here. Tonight I am going to list some of the books I have used to learn from.
- Professional Web Parts and Custom Controls with ASP.NET 2.0 (Peter Vogel) - This is a very good introduction book to Web Parts. It starts from the beginning and builds from there. It covers a range wide areas of subjects such as custom controls, viewstate, developer tools, adding business functionality, and advanced functionality. It covers advanced techniques such as programmatic web part connections, moving web parts, and personalization but misses some techniques such as creating custom editorparts and catalogparts. (4 / 5)
- Professional ASP.NET 2.0 Server Control and Component Development (Shahram Khosravi) - This is an excellent book all around. The main thrust of this book is building custom controls, which will help you build Web Parts. There are a few chapters on Web Parts (4 chapters and ~170 pages). It covers introduction, developing custom web parts, editorparts, catalogparts, and webpartzones. Also covered is webpartmanager, web part communications, and data-bound web part controls. This book is definitely expert. As someone who is fairly new to .NET, I find myself bouncing between some of my other books to get a background on a subject and then return to this book for the more advanced functionality. (4.5 / 5)
- ASP.NET 2.0 Web Parts in Action: Building Dynamic Web Portals (Darren Neimke) - Darren has written a very good book on Web Parts. This book covers different areas of the Web Part framework and the author does a very good job of explaining the subject in a clear manner. Darren starts at the beginning and moves to more advanced areas. Darren also covers areas such as SharePoint, AJAX (Shahram covers building AJAX controls), and discussing other portals such as Live.com (including how to build a gadget). I did run into a few issues with the book's source code but after posting the issues on the book's forum, Darren had a fix for me within 12 hours. This book also covers some areas which I have not seen before such as splitting out the catalog into a separate web page. There are numerous functional areas discussed where I said out loud: "I didn't know it could do that!". (4.5 / 5)
My two cents: In most tech books, the source code is split out into a single project by chapter. Sometimes it is not easy following source code when the project contains multiple functionaly areas. It would be easier if a separate functional area was split out into a separate project. This opinion is not just for these three books but across most tech books I have read. Also, having database projects is sometimes frustrating. For some reason I cannot seem to get most database examples working against SQL Server Express. I get errors galore. In some cases I have been able to change the web.config to make it work but sometimes even that doesn't work. If it is a database project, I typically just try to pull out the code I am interested in. I need to find a SQL Server expert to have them get me going.
I hope to write up a few posts on different functional areas. The one functional area I have been really spending time on is communication between Web Parts. There are three types: static, declarative, and programmatic. Very nice.
Another area is building custom editorparts. I even have an example of a custom editor part communicating to another web part using the custom editorpart's Web Part as a proxy. This is used to load up controls in the custom editorpart.
Look for these posts in the coming days/weeks.