.NET Patterns Architecture, Design and Process

Published Fri, Jun 25 2004 19:12 | William

As you all can probably tell, Addison-Wesley has definitely worked thier way into my favorites list as far as book publishers go.  Their Microsoft .NET Development Series is like one hit title after another.  Microsoft Press obviously is a strong player in this market and for a while it looked like Dan & Gary and the guys at APress was going to give them some serious competition.  Then I think AW decided they wanted to play in this game and came out strong.  I have yet to come across anything they've put out (with the possible example of Shaun Wildermuth's ADO.NET stinker) that didn't kick a33 - and I have to admit that even Shaun's book is still a first rate job and my gripes with it are mostly personal.  I still think Apress has a lot of talent and Kathleen Dollard's Code Generation  title is proof of that but AW seems poised to run the show in the .NET Book market.  I just came across another shining example of some of their stuff...  .NET Patterns Architecture, Design and Process .  Now I have to admit that i've had some trouble really getting my arms around Patterns.  Sure, I understand what they are and what they do, but as far as intentionally using them, or 'thinking in patterns', well, it just hasn't happened.  I've read quite a few books on Patterns but they have seemed like this foggy topic that I just never could seem to really 'get'.  This book changed all of this.  I loved it from start to finish.  You don't have to be a Pattern junkie to understand it but it's not a book for rookies either.  I guess what I liked best is that it's focused on .NET and that happens to be what's occupying most of my life right now.  As such, everything seemed familiar and it wasn't hard to envision scenarios that I could employ them in regarding my existing code.  The only really hard part of the book is trying to prononce Christian Thilmany's name.

Paul Yao just put out two CF books, which are the same book written in both C# and VB.NET.  Every book on the CF that I've come across so far has been great.  Dan Fergus and Larry Roof's The Definitive Guide to the CF was one of the best books I've come across on the subject.  Rob Tiffany's Sql Server CE Database Development with the .NET CF is another Gem.  Similarly, Andy's book is a must have for any CF developer.  But AW Press decided they were going to get into this market and started off with a bang.  First they got Jon Box, a Microsoft Regional Directory and Dan Fox (both of Quilogy ) together for a short but very well done book on best practices for the CF. Then they got Paul involved.  His book is like nothing I've come across before.  When I was reading the credits I noticed that Paul worked with Charles Petzold and Peter Norton on a few books which says quite a bit.  When I finally read through his book (which is actually two books - two for C# and two for VB.NET) I was shocked.  Every single detail that you can possibly think of is covered.  He's an amazing writer and his passion for his work is very clear here.  I had the privilege of meeting Paul at the MVP summit and I was lucky enough to get to sit next to him on the last day.  The guy is a machine.  He had his laptop out and was jamming away on OneNote and was the most focused person I think I've ever seen - Computer Science's answer to Lance Armstrong.

Anyway, if you want to learn about the CF, you will want to buy each of the books above, and Paul's is no exception.  The only thing I can criticize about it is that it's huge and if you are scrawny or weak, moving it around will be  a chore.  All I can say is AW picked another Winner and after reading Paul's stuff, there's no doubt he's a winner.

Comments

# William said on June 25, 2004 10:28 PM:

Bill:

I've yet to read any books from AW but by the sounds of it their at the top of the hierachy.

The only thing i wouldn't/couldn't touch would be CF - a platform i absolute hate..after being forced to touch it at my previous workplace it felt like going a step back...just like doing vbscript when C# was available.

But i'll certainly look out for their range of .Net related books.

thanks for the heads up!

# William said on June 26, 2004 8:46 AM:

Hey Brian:

You have me really intrigued about the CF - What don't you like about it? I know it can be a pain but I haven't come across anyone with that strong of an opinion about it. It has a long way to go though, no doubt about it and it's weird b/c in some areas like System.Data, it's almost identical to the full framework, but in other regards, you have to P/Invoke everything or build it yourself.

While we're on the subject of books though, what are some of your favorite .NET titles? Phil posted some of his and I have to agree with his suggestions. Nowadays there are quite a few excellent .NET books, it's hard to keep track of all of the good ones.

# William said on June 26, 2004 10:44 AM:

bill: aw happens to be my publisher of choice as well. however, i think they have published much better books on patterns than the one your talking about. i was real anxious to pick up CT's book when it was first published, and when i received it i was real disappointed. if i remember correctly, there is some intro stuff that could've been taken out, along with some basic web services stuff too. i thought it was more of a tutorial for cetain aspects of .net development than a patterns book (for example...the 1st chapter on exception handling was more like a tutorial on basic exception handling and setting them up properly, the "Notifying Thread Manager" pattern reads more like "how to execute asynchronous operations in winforms clients", and then there is a whole section devoted to persistance which reads like "how to build a O/R mapper." i didn't think it was a bad book, i just didn't think it was a good patterns book.

f your still learning or want to review basic patterns (things like observer, bridge, decorator, facade, composite, etc...) there is always the classic GoF (Design Patterns) book. Just recently Steve Metzger released a C# version of that classic which is called "Design Patterns in C#" i've picked it up and it looks good, but i haven't gone through it yet. also covering the patterns in the GoF book as well is shalloway and trott's "Design Patterns Explained" (also published aw). this book takes a much more conceptual approach to get the reader thinking in terms of a "pattern mindset", it's also a little bit more abstract, but it will definitely get your mind focused on the right issues and concepts when dealing with patterns.

in addition to the books above that cover the "classic" design patterns, there is also the "Pattern Oriented Software Architecture" (otherwise known as POSA) series of books. i think they have 3 volumes out now. these books cover more advanced patterns and go beyond the patterns introduced in the preceding books. the 1st covers more patterns along the lines of the original GoF book, but covers much more ground (like the double dispatch pattern) while the second volume covers patterns that are geared towards concurrent and distributed environment (proxies, messages, etc...). i really ike this series.

of course there are also the martin fowler books. his books tend to be a little more abstract than the usual pattern books. "Analysis Patterns" covers recurring themes that appear in different business domains rather than by software architecture. it's a little dated, put it's still excellent. there is also IMHO the seminal "Patterns of Enterprise Design", which everybody developer should read. the knowledge in this book covers all aspects of software architecture (persistance, transactions, laying, etc....) that everybody should at least have some kind of working knowledge of. i really couldn't recommend this book enough.

these last 2 books are not about patterns per se, but the cover how patterns are integrated in domain models, and how objects collaborate together in the "bigger picture." the 1st would be wirfs-brock's "Object Design." this book looks at how object's are derived from a domain by roles and responsibilites. it also goes into great detail about object discovery, design, and collaboration. it's definitely one of the better books on OO design and analysis. there is also information on how patterns fit into the above activities. the last book would be evan's "Domain Driven Design." like the fowler book above, i think this book is just one of the best. it takes all of the above topics (patterns, objects, domain modelling), and ties them all together better than any other book at there period. it will make anybody a better software designer just for reading it. i don't think there has been a better book written on software architecture yet.

of course i could be wrong, these are just my own opinions!

# William said on June 26, 2004 10:45 AM:

Hey Bill:

My dislike of CF is rooted in my genes i think...starting with the typical "first impression" which was Spectra (probably not a good start though as it more or less flunked)...

anyways..to start with, i think the language in itself "feels" antiquated..i'm not comfortable with the "tag" like structure/syntax (only place seen successfully implemented is (X)HTML/XSL/XML IMHO)...also coupled with an outrageous resource hog of a (so-called) server, it just ticks me off - not to mention a purdey pricetag..

i'm probably just a bigotted ignorant hick in this regard (now mind you, i'm by no means a CF guru for obvious reasons) so my first impression is probably going to last..

unfortunately....

# William said on June 26, 2004 10:49 AM:

arggff...before i forget...i'm also very much prejudiced against Macromedia in general and as Cf is now a Macromedia product i stay away from it..

i'm basically a strict MS fanatic and try not to wander too far from the path of the righteous! If i could afford it i would buy everything under the sun that they release...but alas, the moon isn't made of cheese and i don't have an unlimited supply of cash around.

# William said on June 26, 2004 11:20 AM:

Hi Brian: Well, I have to admit that I also have a sort of a bias toward Macromedia b/c I'm on their Advisory board. Flash and Breeze are the only products I'm very familiar with though and I know cold fusion was originally an Allaire product. As far as DB's go, I was bred an Oracle snob, and probably on the really obnoxious fringe. I had some trainging with SQL Server 2000 and i learned under a MS SQL Server MVP (Wayne Synder at Ikon) and he was just amazing. Being that he could do everything I threw at him regarding Oracle without breaking a sweat, he convinced me that SQL Server is a first rate product and that the SQL Server team did a great job on it. If still think Oracle is probably a bettter choice if you are talking about HUGE rollouts over like 50 locations and that it's a better tool for OLAP, but I'm starting to rethink that position. However, for in house apps and most applications that I'd ever encounter, SQL Server has all the power you need and it's much more fun to work with and administer. If SQL Server was a Porn Start it'd definitely be a Vivid Girl and I'd probaby make her Jenna Jameson or Terra Patrick. Oracle would be someone still really hot but more 'rode hard and put up wet' like Ginger Lynn or Jewel DNyle.

Then again, I've obviously went wayy off on a tagent ;-) Sorry about that.

# William said on June 26, 2004 11:33 AM:

Phil:

Wow, many things I'd like to comment on. I haven't gotten through the whole book I mentioned but I REALLY appreciate your suggestion. I tried reading the original GOF book and I could just never stay focused with it. I think if I saw some more examples as I was reading it it woudl have kicked in but I had a lot of trouble with it. I have the Metsker book coming already but it's good to hear that you liked it. I have the C# Design Patterns by Cooper, but I found a lot of glaring technical mistakes in there, some of which are unforgiveable. When I see something in a book that's wrong, I go with the assumption that I'm missing something at first. You really have to b/c otherwise you'll chalk everythign you don't get up to a typo. But I've found a few things there that I've confirmed with other people - but not like I needed to, some things are just absolutely wrong. That happens though and I liked the book over all.

As far as Fowler goes, I have yet to read a line of his work that I didn't think was brilliant. I got his refactoring book a while ago and it just plain Kicks ass. The guy can really write and he gives you a very good why behind every should. I love the guy's work. As soon as I'm done replying i'm going to go through your list and head over to the book store. I wasn't a CS major and although I went back and took a bunch of CS courses after I got my MS, my concentration was in RDBMS theory so I missed out on a lot of stuff like Patterns. Not that I have any regrets, but I just want to get up to speed on them b/c I'm a LOT stronger on dealing with Data than I am on design. Fortunately I acknowledge that I don't know everything about OOP which makes me a lot better at it than many people I've worked with - nothing worse than someone who's in LOVE with every object they ever designed (although I DB design suffers from the same malady - way too many DB guys fall in love with their table designs no matter what - and that's a terrible trait to have).

Thanks for the recommendations, and while there are a bunch, I dont' ask people for suggestions unless I intend on following up on them. Looks like I have a lot of reading to do but I think I'm finally starting to 'get it' as far as patterns go (with both Refactoring and Patterns I realize that a lot of what I thought were 'good habits' already encompass much of this, it's just now it has a name and obviously now there's a lot more of it).

Thanks again,

Bill

# William said on June 26, 2004 11:45 AM:

bill: a few things...

1. tera patrick forever
2. i would definitely agree...most of refactoring and patterns translates into just good common sense
3. never having the benfit of graduating from college (and for the little time i was in school it was for music) i've really had the benefit of learning all this shit the hard way (which means really good mentors bludgeoning m to death ceaselessly and relentlessly on the job with this shit). i can't tell you how many times in my career i was reduced to a quivering mass of tears for "not getting it."
4. the cooper book is probably the biggest piece of shit ever written (just burn the fucker).
5. tera patrick forever
6. tera patrick forever

# William said on June 26, 2004 9:53 PM:

Tera is the BOMB, no doubt about it. And the cool thing is that the last time I looked, she didn't trash herself all up with Tattoos. Janine has really diminished an otherwise first rate package with tattoos on every part of her body including her neck. Jenna's Heart Breaker on her a33 was still pretty damned hot, but since everyone has tattoos these days, the only way to be a non-comformist is to not have one. Tera has definitely done it right - I might have to go grab some of her stuff for my Personal Media Center.

As far as 3... It's weird b/c most of the time i worked with people that didn't get it either but thought they did. So I was buried in books and magazines and that really helped. The more you read and the more code you look at, the more abstract concepts that you may not have learned start to come together. THere's no training like work related stress ;-)

As far as refactoring - it's really interesting b/c it really does just come down to the culmination of all of the design rules you've learned over time. But it's an ongoing practice - you've got to refactor relentlessly sa the extreme Programming crowd always says.

Phil Hendrie is on right now and has me about to fall out of my chair. Damn he's funny -- http://www.philhendrieshow.com/

# William said on June 26, 2004 11:17 PM:

i sense a lack of knowledge here...been reading up a little bit on refractoring and also following some of the newsgroups i subscribe to and the term pops up frequently.

now, mind you, i'm by any means a techhead in english (should probably just point out that i'm originally danish and have only lived in an english speaking country for about 4+ years) so the term in itself doesn't seem to mean shite to me.

there's currently a large ongoing discussion going on at aus-dotnet newsgroup but i've kept my ignorance hidden so far...

anybody got any links which would enlighten me a bit?

# William said on June 27, 2004 12:29 AM:

Brian:

No worries there, I had heard of it before and unknowingly engaged in it, without knowing what it was. However, I recommend <a href="http://www.awprofessional.com/title/0201485672"> Fowler's Refactoring Book </a>. For a good site, check out <a href="http://www.refactoring.com/"> Refactoring.com</a> or our <a href="http://www.knowdotnet.com"> site</a> . We have a Refactoring Add-in for Visual Studio .NET that supports both C# and VB.NET . It's still work in process but a lot of it is done. Anyway, the short of it is taking existing code and making it better just by restructuring it. one could say it's the culmination of all of the good habits you were supposed to have picked up in school or read in books. But part 1 is fixing your existing code and part 2 is continuing to keep it clean as you go forward. You could refactor for months and write two methods carelessly that could easily need refactored. The end game is making your code clearer, more efficient, tighter and more maintainable. Highly recommend Fowlers stuff. My two articles on knowdotnet broach the subject but I have a long way to go as far as covering the issue there. I think I have a good grip on it, but writing about it and coming up with good examples is a whole different beast. Let me know if you have any questinos.

# William said on June 27, 2004 3:02 AM:

Bill:

hey thanks for the info..took a look at refactoring.com and it's impressive to say the least.

also took a quick look at the add-in you guys have made on knowdotnet.com .

Tried to find minimum requirements for the install but didn't find any..does it work on VS.Net 2000 or only on 2003 ?

# William said on June 27, 2004 11:59 AM:

Hey Brian:

I think that version is for 1.1 but it's originally built on the 1.0 framework, I'll be glad to send you a copy tomorrow.

# William said on September 17, 2004 10:19 AM:

first of all - this absurd bias against ColdFusion. Just because Spectra was crap (really unfinished and badly explained - I'm glad I missed that mess), doesn't diminish the platform. Hey, you can even write rubbish in ASP.NET! For a web dev environment, it actually makes sence to use a tag-based language. Look at ASP.NET's ui controls - they're xml-type tags (actually rip-offs from JSP custom tags that I'm getting CF to emulate for our UI).

but to get back to design patterns: because CF isn't encombered with strict typing and heavy-duty OOP (reflecton, interfaces, et al), it's piss-easy to build complex systems with "lite" objects - CFC's (CF components). Sure it won't do multiple inheritances and CFC "private" scope is really "protected" (damn shame, that...), but it will provide a RAD build of "objects" (more like vbscript classes on steroids).

This means that it gives us 99.99% of our needs (the remainder: Java comes to the rescue) when we're using Abstract Factory for our data layer (logic and persist), server-side and client-side singleton "kernel objects" for control, various facade CFC's for the different requests (eg webservices), a "Chain of Responsibility" invoker, flexability by "decorating" the presenter CFC's while sprinkling in various "Strategy CFC's" to abstract specific processing, etc.

All this with the bonus of not worring whether the hosting is ASP.NET 1.0, 1.1 or 2.0 compatable.

I'm sorry Microsoft. I've ditched ASP.NET. Even with the amazing functionality provided with the available namespaces, ASP.NET is more complicated than it needs to be (especially on custom UI's). ColdFusion components following some well thought out design patterns are helping us create our enterprise apps real fast.

my 2c
barry.b






Search

This Blog

Tags

Community

Archives

News

My other sites

Cool Stuff

Book Stuff

Security

ORM

Data Access

Funny Stuff

Compact Framework Stuff

Web Casts

My KnowledgeBase Articles

My MVP Profile

Design Patterns

Performance

Debugging

Remoting

My Fellow Authors

My Books

LINQ

Misc

Speech

Syndication

Email Notifications