Applied .NET Attributes

  Author:    Tom Barnaby, Jason Bock
  ISBN:    1590591364
  Sales Rank:    684327
  Published:    2003-10
  Publisher:    Apress
  # Pages:    240
  Binding:    Paperback
  Avg. Rating:    5.0 based on 5 reviews
  Used Offers:    11 from $6.27
  Amazon Price:    $23.09
  (Data above last updated:  2008-07-26 04:40:40 EST)
  
  
Sort customer reviews by:
  
Show All Reviews on Page      Hide All Reviews on Page
   
  
Applied .NET Attributes
  

This book focuses on a part of .NET called "attributes". Attributed programming is a feature of .NET that is still relatively unexplored and unknown, yet is extremely important and will become more important over time. Attributes are used to modify the runtime behavior of code in the .NET framework. The book covers the fundamentals of attributes, common .NET attributes, use of custom attributes, and advanced techniques.

Applied .NET Attributes focuses specifically on a part of .NET called “attributes”. Attributes are used to modify the runtime behavior of code in the .NET framework. This book explores the application of .NET attributes and how developers can write custom attributes that provide the maximum level of code reuse and flexibility.

Attributed programming is a feature of .NET that is still relatively unexplored and unknown. Because attributes are used to modify the runtime behavior of code in the .NET framework, it is extremely important and will become more important over time. The fundamentals of attributes, common .NET attributes, use of custom attributes, and advanced techniques will be covered.

                  Reader Reviews 1 - 7 of 7                 
  
  
Review
Date
Review
Rating(5 High)
Review
Helpful
to:
Customer Review Reviewer
Info
Permanent
Link
Reader Reviews Below Sorted by Newest First
06-19-06 1 4\6
(Hide Review...)  Simply junk
Reviewer Permalink
This book is nothing more than a compilation of attribute-related topics from MSDN/SDK plus some idiotic examples plus a little bit of babbling on unreliable and incompelete techniques emphatically named "advanced topics". In fact, the whole book is a scam (see below why).

About the content; the book has five big parts:
1. Attribute Fundamentals - a lengthy and very deluted explanation on why attributes exist. The examples are for beginners (and I mean *real* beginners), with no insight whatsoever on the real philosophy behind their existence.
2. Compile-time and Design-time attribute - a more detaled explanation on the nature of attributes.
3. Attributes and Runtime behavior - the title says it all.
4. Building Custom Attributes - an "Attributes for Idiots" tutorial. It contains nothing more than information you can get from .NET SDK for free.
5. Applying Custom Attributes - containing the so called "advanced" techniques.

The "advanced" techniques are simply cheap tricks based on undocumented features of the CLR or Microsoft FxCop. The authors employ here words that sound pleasant in the ears of some readers: Aspect Oriented Programming, message-based Object Orientation and so on.

However, even the authors admit that these featurs have changed or may change in the future. This doesn't prevent them to teach *you* how to propagate these techniques (yes, these tricks based on undocumented details) in *your* organization and advocate then to *your* bosses.

I haven't seen such a sheer lack of shame when writing a book that supposedly helps others learn something useful.

Allow me to explain why this book is a scam. .NET attributes are great. It is the first time when a multi-language, industry-scale platform allows the developer to decorate the executable elements of a program with semantic information.

However, attributes are passive elements by nature. The power of attributes resides not in the attributes themselves, but in their consumers: the runtime, the compilers and/or the applications making use of this enriched semantics (see the popular NUnit test engine for example).

Without appropriate consumers, attributes by themselves are useless.

Now: does "Applied .NET Attributes" teach you how to write such consumers? No, not by far. Such a broad topic can easily cover dozens of well-sized books, not "Applied .NET Attributes" which looks more like a pamphlet written in a bar while enjoying beer with friends than like a serious book.

I do not mean that such illuminating book cannot be written. But "Applied .NET Attributes" is not the one, even though is claims to be so.

A final word: I do not enjoy giving low ratings to books. I realize how hard is to put together something meaningful and useful for the readers, let alone something truly original. I have a deep respect for the people who sacrifice their time and energy for the sake of teaching others (especially that the financial reward is usually not that great).

However, seeing the passions and appraisals that this material stirred up, I could not stand them. Unfortunately, too much rubbish hights the shelves of the IT sector with no good reason and "Applied .NET Attributes" is one more piece of this kind.
(Review Data Last Updated: 2007-03-16 09:54:51 EST)
06-30-05 5 0\6
(Hide Review...)  For the Expert - A must read
Reviewer Permalink
I am so thrilled with this book. The coverage of AOP is excellent. Everything in this book is excellent (I especially love the IL that is listed and the fact you are not scared to 'go there') - most authors shy away from IL). I have added it to my must read books for .NET Mastery and on my Amazon list with over 11,000 reads as a 'must read'. Richter, Lowy, and now "Bock and Barnaby". This inspired me while reading this on a flight recently from Toronto to create an AOP implementation to use attributes for strongly typed collections in .NET 1.1. Works like a charm. So you might have a HashTable. The attribute is:

[StronglyTypedCollection(ColKeyTypeName="System.String", ColValueTypeName="%RunningAssembly%,CustomerBusinessObject")]

Note the use of a substitution parameter: %RunningAssembly% . I substitute this and other parameters at run-time to do the Type Check. The syntax for the type is:

"Assembly (optional), TypeName".

The Type name may need to be qualified by namespace as well.

I am using this as part of the DotNet2UML utility my company maintains (google on DotNet2UML) and the next major release (3.0). I am also making this assembly available to beta testers as it provides many cool AOP Framework type features. Email me if interested. And thank you Jason and Tom. Excellent work.

[...]
(Review Data Last Updated: 2007-09-07 19:05:38 EST)
06-30-05 5 1\7
(Hide Review...)  For the Expert - A must read
Reviewer Permalink
I am so thrilled with this book. The coverage of AOP is excellent. Everything in this book is excellent (I especially love the IL that is listed and the fact you are not scared to 'go there') - most authors shy away from IL). I have added it to my must read books for .NET Mastery and on my Amazon list with over 11,000 reads as a 'must read'. Richter, Lowy, and now "Bock and Barnaby". This inspired me while reading this on a flight recently from Toronto to create an AOP implementation to use attributes for strongly typed collections in .NET 1.1. Works like a charm. So you might have a HashTable. The attribute is:

[StronglyTypedCollection(ColKeyTypeName="System.String", ColValueTypeName="%RunningAssembly%,CustomerBusinessObject")]

Note the use of a substitution parameter: %RunningAssembly% . I substitute this and other parameters at run-time to do the Type Check. The syntax for the type is:

"Assembly (optional), TypeName".

The Type name may need to be qualified by namespace as well.

I am using this as part of the DotNet2UML utility my company maintains (google on DotNet2UML) and the next major release (3.0). I am also making this assembly available to beta testers as it provides many cool AOP Framework type features. Email me if interested. And thank you Jason and Tom. Excellent work.

[...]
(Review Data Last Updated: 2008-07-26 04:44:18 EST)
07-16-04 2 8\14
(Hide Review...)  Adequate But Not Fantastic
Reviewer Permalink
Nowhere near as good as the Wrox Handbook series (which Apress now owns).

I'm sure this book is a good introduction to attributes and if you're not that knowledgable with attributes, you will learn. But you could probably learn a lot from some of the (much shorter) online tutorials from Fawcett or dotnet247.

I found that WAY too much time was wasted on covering topics such as serialization and writing a compiler. Introduce the concepts, sure, but don't waste an entire chapter on either of them. Those are for other books.

Also, the author was very "wordy" on describing things. I'd rather read the odd sentence twice to fully understand it instead of constantly reading one sentence, understanding it, and having to read 10 more that REALLY don't elaborate... or say much of anything.

I also found that the order in which the book taught was backwards. If chapter 1 had introduced a simple custom attribute along with a little bit of reflection, the book would have flowed much better.

Many of the benefits of attributes were never covered... single attributes that replace handres of lines of code... the real power of attributes and inheritance.... not covered.

This book was nowhere close to my hopes and it didn't teach me a great deal, but then I've made extensive use of attributes in the past. It succeeded in answer only one of my unanswered questions.

All in all, it could have been 50% shorter and still given about 25% more useful information. If you already know attributes well, don't bother.

(Review Data Last Updated: 2006-06-29 14:07:43 EST)
02-23-04 5 15\15
(Hide Review...)  Really cool book
Reviewer Permalink
I had been programming in .NET for a while before I really learned to appreciate the power of attributes. But even then I was still playing around with [Obsolete], [Serializable] and the more common ones. Then I ran across the whole subject of declarative security and realized I had a Lot of learning to do. Fortunately for me, this book eased the process.

The only thing I didn't like about it is that I wish there was a lot more of it. Most of the discussion of attributes that I've run across are either the 'canned' ones like what I mention above, or overly theoretical. Too often I just couldn't see where they'd be applicable (more because of my thick head than any writer's deficiencies). That's where this book really shines. It starts out with your basic "what's" and "why's" but gets moving pretty quickly. Another thing about this book is that it's a pretty advanced topic. Back in college, we were heavy into OOP, but I don't remember hearing about AOP (Aspect Oriented Programming) and this is the first time I've really run across it. I really wish there would have been some more on the subject, but they did a very good job explaining the subject.

There are many good examples in here and the text is very well written. APress is pretty great about the quality of their stuff and this is no exception.

(Review Data Last Updated: 2006-06-29 14:07:43 EST)
12-05-03 5 11\12
(Hide Review...)  WELL WORTH IT?
Reviewer Permalink
Excellent way to move the .NET tools you build to their next level of value. I have been developing for over 10 years; I buy an average of 4 books a month. I have never written a review before this. This is the first.

These guys took the first serious shot at moving us (the .NET crowd) toward thinking about Aspect Oriented Programming by doing an excellent job revealing the tools that currently exist in the .NET Framework.

I have been looking into AOP using C# and there are not that many available resources. A few, but not many. The book doesn't go into a bunch of over kill on selling AOP. It actually points out some possible performance issues with using context-interception. It just gives a real practical overview of AOP.

The book hits the ground running and covers a ton of valuable information related to .NET Attribute usage. I won't go into the details of the book there is plenty of information available on the APress web site. Go check out the Detailed TOC, Index, and Sample Chapter: Chapter 1: Attribute Fundamentals.

This book is the shortest one I have bought this year.
It is also the most informative one... WELL WORTH IT...

(Review Data Last Updated: 2006-06-29 14:07:43 EST)
12-04-03 5 8\11
(Hide Review...)  Excellent MUST HAVE if U DO .NET
Reviewer Permalink
Excellent way to move the .NET tools you build to their next level of value. I have been developing for over 10 years; I buy an average of 4 books a month. I have never written a review before this.
These guys took the first serious shot at moving us (the .NET crowd) toward thinking about Aspect Oriented Programming by doing an excellent job revealing the unpublicized tools that currently exist.
To date I was looking into AOP in C# here among other places (there are not that many available):
Theme/UML
http://www.dsg.cs.tcd.ie/index.php?category_id=165
AspectC#
http://www.dsg.cs.tcd.ie/index.php?category_id=171

I won't go into the details of the book, you can find them here:
http://www.apress.com/book/bookDisplay.html?bID=227

If you buy just one book this year, make it this one. It is the shortest one I have bought this year.
It is also the most informative one...

(Review Data Last Updated: 2006-06-29 14:07:43 EST)
  
                  Reader Reviews 1 - 7 of 7                 
  
  
  
  
  
  

Because the data used to generate this site come from outside sources, VeryWellSaid.com cannot guarantee the completeness or accuracy of the data.
Search VeryWellSaid™
Google
Web VeryWellSaid™
New subjects are added every week.
View Subjects Below by:
* Top Selling
 (click category name, left)
* Top-Rated Top Sellers
 (click 'Top Rated', right)
In the news...  
Dubai\UAE Top Rated
Influenza\Bird Flu Top Rated
Iraq Top Rated
Supreme Court Top Rated
All Books Top Rated
Arts Top Rated
Photography Top Rated
Digital Photography Top Rated
Digital Cameras Top Rated
Biography Top Rated
Business Top Rated
Management Top Rated
Marketing Top Rated
Sales Top Rated
Stocks Top Rated
Bonds Top Rated
Real Estate Top Rated
Trading Top Rated
Commodities Trading Top Rated
Time Management Top Rated
Starting A Business Top Rated
Children's Top Rated
Comics Top Rated
Computers Top Rated
PC Top Rated
Mac Top Rated
Programming Top Rated
Design Patterns Top Rated
.Net Top Rated
C# Top Rated
Vb.Net Top Rated
Asp.Net Top Rated
Java Top Rated
Python Top Rated
PHP Top Rated
Perl Top Rated
Javascript Top Rated
Ajax Top Rated
CSS Top Rated
Open Source Top Rated
SQL Top Rated
Databases Top Rated
Oracle Top Rated
MySql Top Rated
Sql Server Top Rated
IIS Top Rated
Apache Top Rated
Linux Top Rated
Windows Server Top Rated
Project Management Top Rated
HTML Top Rated
UML Top Rated
IT Certifications Top Rated
Cisco Certifications Top Rated
MCSE Top Rated
MCSD Top Rated
Cooking Top Rated
Italian Cooking Top Rated
Vegetarian Cooking Top Rated
Wine Top Rated
Engineering Top Rated
Entertainment Top Rated
Health Top Rated
Nutrition Top Rated
Dieting Top Rated
Sex Top Rated
History Top Rated
Military History Top Rated
British History Top Rated
Middle East History Top Rated
Land Battles Top Rated
Naval Warfare Top Rated
Air Warfare Top Rated
9/11 Top Rated
Terrorism Top Rated
Home Top Rated
Mortgage\Home Equity Loan Top Rated
Cars Top Rated
Car Buying Top Rated
Sports Cars Top Rated
Cat Top Rated
Humor Top Rated
Horror Top Rated
Law Top Rated
IP Law Top Rated
Legal History Top Rated
Fiction Top Rated
Oprah's Book Club Top Rated
Medicine Top Rated
Cancer Top Rated
Stroke Top Rated
Heart Disease Top Rated
Fertility Top Rated
Diabetes Top Rated
Pharmacology Top Rated
Back Problems Top Rated
Menopause Top Rated
Thyroid Top Rated
Pain Top Rated
Organic Chemistry Top Rated
Immune System Top Rated
Mystery Top Rated
Nonfiction Top Rated
Outdoors Top Rated
Running Top Rated
Radio Control Models Top Rated
Guns Top Rated
Parenting Top Rated
Divorce Top Rated
Professional Top Rated
Reference Top Rated
Religion Top Rated
Romance Top Rated
Science Top Rated
Physics Top Rated
Chemistry Top Rated
Astronomy Top Rated
Psychology Top Rated
Science Fiction Top Rated
Sports Top Rated
Teens Top Rated
Travel Top Rated
USA Top Rated
Europe Top Rated
France Top Rated
Italy Top Rated
England Top Rated
China Top Rated
All Books Arts Biography Click Here For An A-Z Index Of All 213 Best-Seller Subjects Business Children's Comics
Computers Cooking Engineering Entertainment Health History Home Horror Humor Law Fiction Medicine Mystery
Nonfiction Outdoors Parenting Professional Reference Religion Romance Science Sci-Fi Sports Teens Travel
In Association with Amazon.com

Cache miss
(not cached)