Thoughts from the office by Ed Ball
Tuesday, February 17, 2004

Applied .NET Attributes, by Jason Bock and Tom Barnaby, is all about attributes in .NET. The book is a bit short at 200 pages, at least relative to most programming books these days. It covers the basic concept of .NET attributes, many of the standard attributes provided by the .NET Framework, and how to write and use custom attributes. I was already fairly comfortable with the concept, and the standard .NET attributes are really best documented in books that describe the features that they implement, so the most interesting sections were on custom attributes, and, more specifically, the use of custom attributes in implementing “aspect-oriented programming,” the programming technique that's all the rage these days, at least in terms of blog conversations.

I enjoyed reading the chapter on AOP, though I was ultimately disappointed by the fact that it is very unlikely that I'll be implementing AOP in my own code. For now, the overhead for making .NET classes AOP-compatible is too high, at least with the techniques described in this book, and I don't see the immediate value in supporting AOP for some classes and not for others.

Also, I wish that the example used in the chapter on custom attributes would have been a little more practical. I don't often find myself creating a custom compiler. My favorite example of custom attributes is how it can be used to parse command-line arguments; that application gives you a good idea as to the cool stuff that can be done.

Unless you're looking for a concrete example of how you could do AOP with .NET attributes, I can't say that I recommend this book; it just doesn't give enough bang for the buck.

2/17/2004 11:41:05 AM (Pacific Standard Time, UTC-08:00) | Comments [0] | Books#
Search
Archive
Links
Categories
Administration
Blogroll