Book Review: Professional ASP.NET 2.0 Design

I have finally finished reading Jacob J. Sanford's book Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages. This is one of several books I've bought on ASP.NET 2.0 to deepen my expertise. Now we've moved on to ASP.NET 3.5 before I've mastered ASP.NET 2.0. I expected this book to be full of design ideas for web controls, themes, and skins but instead it leaves much of the creativity up to you and only covers the aspects of ASP.NET 2.0 that apply to design. However I did learn a lot by reading this book.

The first few chapters cover the CSS vs tables for layout debate, basic Photoshop techniques, and accessibility concerns which is familiar material for me. I still picked up a few tidbits of info like the Check Accessibility tool in Visual Studio 2005. There was also an extensive overview of the CSS for expandable columns which is a layout problem that I had not come across before.

The book has a chapter on the CSS Friendly Control Adapters. I found this useful because I wanted to use a control adapter in my current project and needed some guidance on how to import them. I actually only needed to use one of the control adapters and I don't remember if the book tells you how to import just one. Anyway, you should delete tags from the CSSFriendlyAdapters.browser file if there are just some particular web control styles you need more control over. In my case it was the label tag in the Login control that I could not reference through an id or a class name to apply the text color.

The chapter on navigation was helpful because there is one aspect of the navigation controls that other books I've read did not cover, the security trimming. I am currently converting an ASP web application to ASP.NET 2.0 and I do need to show different navigation links to administrators and users based on roles. Chapter 6 tells you how to apply security to your navigation controls based on the Membership API.

Even the chapter on themes for mobile browsers was interesting because I've recently bought a Pocket PC as a mobile video device and didn't even think about using it to check out my site layouts on that platform. I kept notes while reading the book and some other noteworthy material included conditional comments in Internet Explorer (I finally did some research on that), and setting the ASPX page content type to "text/css" (an interesting hack to dynamically generate CSS).

However, there are many purely aesthetic aspects of design that this book did not get into. For example, rounded corners is a popular design element. There are many ways to create rounded corners but I've never tried to apply them to web controls like a DataGrid or the GridView. I did find a good way to apply rounded corners to a DIV element using nothing but CSS and PNG files. Adding drop shadows to borders is another popular style. I've found some JavaScript that can dynamically add a drop shadow to the page border without requiring you to create any images. I have not tried that with any web control borders.

Then there are stripped backgrounds which are used to crosshatch the background. I think these backgrounds are popular because they give the background a different texture than the page content. I used to steal background images but then I found a web site that can generate different patterns for you. However, you should examine the pixel patterns for popular stripe patterns and learn how to change their colors by adjusting the hue. You may find you'll have to extend the images to avoid tiling.

There are various gradient effects that I've noticed but I have not researched gradients yet. The Yahoo! home page is a fine example of a very tasteful use of gradients. But you can really do some ugly things with gradients if you don't know all the tricks.

7 Comments

Comments have been disabled for this content.