Skip navigation.

New Look of MSN SearchAll recent postsThe Worst Book on .NET Patterns

Architectural Rebuttal

A while ago folks at Vertigo Software took the original Java Pet Store and ported it to .NET. The whole purpose of this exercise was to show how much leaner and meaner .NET code was compared to Java. The redesign was followed by a series of articles on MSDN and ".NET vs. J2EE" seminars in major cities. I remember attending one of those in Atlanta.

The charts, articles and speakers enthusiastically touted code size saving and incredible performance gains. I was one of those who freely imbibed on the goodness of this "redesign". Now that I'm a lot more versed in matters of architecture, I realize one thing—the comparison wasn't fair. It was the classic apples vs. oranges comparison. Why's that? Because the architecture of PetShop.NET was sacrificed. Actually, there was little of it. I remember how proud they were that they whacked out the whole code port in a matter of days with only a couple of guys doing it.

The other day I found an article entitled PetShop.NET: An Anti-Pattern Architecture which is a sound architectural rebuttal of folks from the Java camp. The article is dated November 2002. Implementations of PetShop.NET and Java Pet Store have somewhat evolved since then, but it's still an interesting read which raises valid points.

If memory doesn't fail me, in the initial "release" of PetShop.NET they were opening SqlDataReaders, passing them (open!) back to the presentation tier and binding them to data controls. If you still do that, repent ye, pray for forgiveness and go sin no more.

I encourage you to download both sample applications and dig through the code. Even though PetShop.NET (version 3.0 as of now) looks a lot more organized these days, I find Java Pet Store (version 1.3.2) better architected still.

What lesson have I learned? Don't trust the marketing machine until you check the facts.

Comments

Comment permalink 1 Feddy |
Good stuff.

Not surprising though since MS sample apps from F&M stocks on had some practices contrary to MS best practices.

Emails and Notifications

Would you like to be notified when somebody responds to this post?  Would you like to have these comments emailed to you?

TrackBacks

Sorry, TrackBacks are not allowed.

Submit your comment

Please enter only text since all HTML tags except hyperlinks will be stripped. Hyperlinks will become live links. Any comments with flaming or offensive language will be deleted. Be courteous to other posters. Thank you.

Your name (required):
Your email (optional):
Your site's URL (optional):
Enter this number
Type in the number above:
Comment (required):