AspAlliance.com LogoASPAlliance: Articles, reviews, and samples for .NET Developers
URL:
http://aspalliance.com/articleViewer.aspx?aId=1006&pId=-1
Review: ASP.NET 2.0 MVP Hacks and Tips
page
by Keyvan Nayyeri
Feedback
Average Rating: 
Views (Total / Last 10 Days): 25092/ 26

Overview

ASP.NET 2.0 MVP Hacks and Tips is the name of a special book from Wrox.  I say "special" because Wrox has not published many books similar to this one.

This advanced book (compared with other Wrox books) is written for professional .NET developers so readers should have a good background in .NET (especially ASP.NET 1.x and 2.0 plus C# language) to get the best result from reading this book.

From the book's name you may take that this book is useful for Microsoft MVPs, but each and every professional .NET developer can read and enjoy it.

MVP Hacks and Tips is written by seven Microsoft MVPs: David Yack, Jose Mayo, Scott Hanselman, Fredrik Normén, Dan Wahlin, J. Ambrose Little and Jonathan D. Goodyear and Wrox's famous name, Jim Minatel, is its Acquisitions Editor.

The book is short enough to not be boring.  The primary purpose of this book is to collect a great collection of hacks and tips that are worth knowing for every developer.  All of us have our own hacks, but rarely make them public; this book wants to share the personal hacks of seven MVPs with others.

The book consists of descriptions about many hacks and tips, ASP.NET and some other .NET related stuff.  Some hacks are inspired from external resources, such as blogs and articles.  The authors tried to give a good history and some ASP.NET 1.x equivalents of their hacks.

Personally, I highly recommend it for everyone who wants to have more information about ASP.NET.  Just do not forget to first have enough skills in .NET 2.0 before reading this book.  To get these skills you can read other great Wrox books, Professional ASP.NET 2.0 and Professional C# 2005.

Chapters

Below I give a short description about all 17 chapters of this book.

Hacks Revisited

The first chapter tries to give some famous common ASP.NET 1.1 hacks that are now a part of ASP.NET 2.0 because Microsoft could get their importance from community.  Some hacks such as ASP.NET Wizard Control, Master Pages and URL Rewriting are briefly described with their history.

Getting Started

The second chapter talks about one of the common topics for every developer from a professional point of view.  The main goal of this chapter is to give good information and tips about building projects, organizing them, database projects, working with source control, setting up a custom base page class, using Master Pages, dealing with ASP.NET 2.0 themes and skins, how to deal with Web Configurations in a team and working with Visual Studio 2005 Templates.

The Power of Providers

This chapter starts with giving some information about provider model, ASP.NET 2.0 built-in providers and how to extend them.  Then it shows you how to write your own Membership and Role providers, as well as building a Role Provider Proxy.  This chapter ends by talking about building a custom provider.

The Smarter Web Client

This chapter discusses AJAX and Atlas.

After starting with Client Callback feature in ASP.NET 2.0 in some detail and how it can enable AJAX functionality for developers by giving an example of its implementation in a custom control, the chapter talks about Atlas, how it works and some common Atlas controls such as AutoComplete, UpdatePanel and TimerControl shortly.  Finally, a list of community projects for AJAX has been presented.

Debugging What You Created

The authors begin this chapter by talking about Visualizers and their role in .NET debugging and how to write your own Visualizer and deploy it.  To do this they provide a real world example of creating an Image Visualizer.

The last pages of this chapter are dedicated to talking about some coding tips for better debugging, such as setting object member visibility, Type Proxy and add debugging logic to business objects.

Control Hacks

This chapter discusses some hacks around controls.  To do this the authors have chosen ASP.NET XML server control to extend it to enable RSS functionality for it and show some tips to readers.

During this process some topics such as caching, custom type converters, custom actions and designers, design time and design type editor have been covered.

GridView Hacks

Chapter 7 is all about GridView control to show you how to enable extra functionality for your GridView controls by using several server and client side tips.

Some hacks that are included in this chapter are dynamically expanded rows on client side, creating a pager template for GridView control, deleting selected rows in GridView, updating all GridView rows using batch query, adding a selected row, using up and down arrows in column headers to sort rows, use client side scripts for this control for better functionality and IPostBackEventHandler to extend GridView functionality.

This chapter contains several useful hacks about GridView control.

Extreme Data Binding

The main goal of this chapter is ASP.NET 2.0 DataSource controls and covers the following topics: inheriting your own DataSource control, working with DataSource configuration wizard to add your custom DataSource, adding a control designer for your DataSource control, extending DataSource controls and working with and extending custom parameters and fields.

As with chapter 7, this chapter has very good hacks for developers.

View State

This chapter starts with giving background about ViewState and its role in the page's life cycle and how to use LosFormatter to serialize data to save in ViewState.  This chapter follows with talking about a technique to split ViewState in ASP.NET 1.1 and compressing ViewState for a smaller size.  The chapter ends by discussing alternative storage options for ViewState and moving ViewState to the bottom of the page for better SEO friendly output.

Cache Hacks

Caching is important enough to have its own chapter in the book.  Chapter 10 talks about static caching, reading and modifying the cache and refreshing the cache.  It follows with writing a sample ASP.NET cache viewer to show how a developer can view the cache via code.  This sample can be considered the best part of this chapter.

Moving to ASP.NET 2.0 from 1.x

To do a migration from ASP.NET 1.x to 2.0 there is a built-in wizard in Visual Studio 2005, but it cannot handle all scenarios.  Professional developers need to do more for their applications.

This chapter starts by creating a demo ASP.NET 1.x web application which contains some user controls, classes and pages. The authors then give a bit of information about the migration process and implement a migration for this demo application. They finish this chapter by discussing some common topics around conversion and the issues that may be raised during it.

Deployment Hacks

Deployment is another important topic in each software system and ASP.NET web applications are no exceptions.  ASP.NET 2.0 comes with several new deployment options and developers should understand them to be able to choose the best one for their needs.

This chapter gives some information about Copy Web Site wizard, Publish Web Site wizard and Windows installer.  Later it discusses Web Deployment Project Add-in and some compilation and assembly tips.  It ends with a short description of MSBuild and what a developer can do with it.

Leveraging Visual Studio

Visual Studio is the most common IDE for writing ASP.NET applications and there are many hacks and tips available for it.

Code Snippets, their description and applications and a way to make snippets are the first topics covered in chapter 13.  At the end of the chapter Visual Studio Templates are introduced and discussed.

Security Hacks

This important topic is the main goal of this chapter.  Some techniques to avoid SQL Injection and Parameterizing IN Expression are the database related security hacks at the start of this chapter.

The chapter follows with some hacks for protecting against Canonicalization Attacks, ASP.NET 2.0 File Upload server control, Dynamic Impersonation and Validating a strong password in Login control.

Building Your Own Hacks

The authors want to help other developers build their own hacks and encourage them to publish them on .NET communities.

After giving a definition of a hack and some constraints to help consider a hack, the authors talk about several techniques to build your own hacks and refer you to some famous .NET communities to publish them.

Master Pages

No!  This chapter does not talk about Master Pages in details.  It just introduces them with some fundamentals about the necessity for their existence, such as the functionality in older platforms and how to deal with them via code.  It then talks about nested Master Pages and some tips to load them in Visual Studio IDE.  Sharing a Master Page across multiple IIS application is another topic of this chapter.  The last topic is about dynamically adding a Master Page to a content page.

Handlers and Modules

Scott Hanselman is the author of this chapter.  He does not show how you can write an HTTPModule or HTTPHandler in ASP.NET.  Instead, he shows you some examples of real world scenarios that can be implemented via them.

An IP Blacklist HTTPModule, Rewriting and Redirecting URLs with an HTTPModule, Boilerplate HTTPHandler, Discouraging Leeching using an Image-Specific HTTPHandler, Compositing Images with an HTTPHandler and Generating Sparklines with an HTTPHandler are the main topics of the last chapter.

This great book ends with introducing ELMAH (Error Logging Modules and Handlers) which is a good example of working with a combination of HTTPModules and HTTPHandlers together.

Pros

Hacks that are provided in this book are not easy to find on other resources.  We rarely see books like this about .NET that share some personal tips and techniques from a group of developers with others.

The same as all the other books that Jim Minatel has directed for Wrox, this book describes all the topics in enough detail and does not waste the time of the reader.  All the hacks and tips are very useful for all professional developers.

Cons

In a few parts we do not see consistency.  Some parts are a description of a concept in ASP.NET and are not a hack or tip.  I think they should be considered as prerequisites for this book.

Also most source codes are provided in C# and this makes it hard for Visual Basic developers to follow sample codes, but any developer who can read this book will be able to understand C# codes even if he is a Visual Basic developer.

About the book

Title:

ASP.NET 2.0 MVP Hacks and Tips

Publisher:

Wrox

Authors:

David Yack, Jose Mayo, Scott Hanselman, Fredrik Normén, Dan Wahlin, J. Ambrose Little and Jonathan D. Goodyear

Pages:

371 (Content)

ISBN:

0-7645-9766-3

Price:

US $39.99

Rating:

 


Product Spotlight
Product Spotlight 

©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-18 2:26:35 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search