Frans Bouma's blog

Generator.CreateCoolTool();

Syndication

News



    Visit LLBLGen Pro's website

    Follow me on Twitter

    Add to Technorati Favorites

About me

Fun stuff I created

My work

MS Petshop 3.x, your thedailywtf.com material times 1000

For the soon to be released major update for LLBLGen Pro, v1.0.2004.2, I'm porting the Microsoft Petshop project v3.x to show some of the new code implemented in the upgrade. Now, I've seen a lot of crap code in my life but what Microsoft dares to offer as an example for .NET is beyond, well... , crap. Sorry to say this, but after working with the Microsoft Petshop code for a few hours, my eyes bleed. This isn't an example, it's code solely ment to run as fast as possible in the benchmark tests to show how fast .NET can be.

I truly wonder if this goo Microsoft calls Petshop 3.x is doing any good for .NET. Anyone looking at the code can only be shocked. The code is completely unmaintainable, inconsistent and can only set the wrong example, to put it mildly. A lot has already been said about this Microsoft Petshop version (and the previous versions weren't any better) but I'd like to suggest that MS uses a couple of hours to write a proper example using the Petshop code, to show new .NET enthousiasts it's not common to write code chewing-gum goo-style but to write solid, readable, maintainable code and .NET can help you with that.

Now if you will excuse me, I've some bleeding eyes to cure...

Published Thursday, March 31, 2005 4:44 PM by FransBouma

Comments

# Frans ci parla del MS Petshop 3.0 e i commenti sono molto...@ Thursday, March 31, 2005 5:55 AM

TrackBack

# re: MS Petshop 3.x, your thedailywtf.com material times 1000@ Thursday, March 31, 2005 12:22 PM

you and i need to start our own site. pissedoffcoders.com.

brady gaster

# re: MS Petshop 3.x, your thedailywtf.com material times 1000@ Thursday, March 31, 2005 12:27 PM

Sounds good :)

Frans Bouma

# re: MS Petshop 3.x, your thedailywtf.com material times 1000@ Thursday, March 31, 2005 12:31 PM

pissedoffcoders.com is available according to Network Solutions. :-)

Sean Chase

# re: MS Petshop 3.x, your thedailywtf.com material times 1000@ Thursday, March 31, 2005 12:33 PM

If performance was the goal, then they acheived it. Let's face it, good design will *sometimes* come at a cost of performance... albeit minimal, IMVHO, compared to the sanity you will save while maintaining the code going foward.

I'm sure you're well aware of this though since, after all, O/R mapping is pretty much the epitome of examples when it comes to this kind of tradeoff. ;)

Drew Marsh

# re: MS Petshop 3.x, your thedailywtf.com material times 1000@ Thursday, March 31, 2005 12:48 PM

It would be interesting to compare it to the Java version in that regard.

Senkwe

# re: MS Petshop 3.x, your thedailywtf.com material times 1000@ Thursday, March 31, 2005 2:27 PM

Have you ever looked at non-example code that comes out of Microsoft? Like the old packaging and deployment wizard in VB6? Some of that stuff is scary bad too.

You have to realize that the group that's always talking about the proper way to write code is a completely different group than the groups that are WRITING code. hehehe. Great design only gets you so far, then you have to bow to the gods of performance and perceived performance. :)

Scott

# re: MS Petshop 3.x, your thedailywtf.com material times 1000@ Thursday, March 31, 2005 2:39 PM

It's not an example, it's just marketing.

Look at the Java version of the Petshop...

As Marsh pointed out good designs comes often at a tradeoff with performance, and the purpose of the MS Petshop was to outperforms Java, which suffers from prejudices of being "too" slow (doing what?)...

Andrea Sansottera

# re: MS Petshop 3.x, your thedailywtf.com material times 1000@ Thursday, March 31, 2005 5:24 PM

Hi Frans,

Looking forward to seeing your port. It will also come in handy for all llblgen users out there to see how best to use llblgen with an asp.net application.

Will you be adding an example of webservice support?

Thanks,

John

John Mandia

# re: MS Petshop 3.x, your thedailywtf.com material times 1000@ Thursday, March 31, 2005 5:27 PM

I always wondered how an on-line pet store would ship a saint bernard.

Richard P

# re: MS Petshop 3.x, your thedailywtf.com material times 1000@ Thursday, March 31, 2005 8:49 PM

They got so much crap for the first release by Vertigo Consulting that they tried to be more OO but really only showed that they do not have a good handle on what is a decent OO example. I scratched my head about this thing quite a lot when it first came out. That whole business with having the object model all seperate off by itself was odd. Thats just one item. Anyway I think its fantastic that your creating a bigger sample than whats avail for LLBLGen thus far. It definetly will cut down on support calls from me :-) and others. Thanks for doing that.

Thomas Wagner

# RE: MS Petshop 3.x, your thedailywtf.com material times 1000@ Thursday, March 31, 2005 9:57 PM

I think petshops was implemented to prove that whatever Java can do, .NET can do better. I dont think it was meant to be a "blueprint" in the true sense. For that kind of implementation, you are referred (usually) to Patterns and Practices (http://www.microsoft.com/resources/practices/default.mspx).

Girish

# re: MS Petshop 3.x, your thedailywtf.com material times 1000@ Friday, April 01, 2005 1:11 AM

You don't want to get into the discussion of the .net vs Java versions on petshop. If you do there are a few million web pages that can be quickly found.

Boiled down, and this will probably start fights, it comes to this.

The Java version was designed as a training exercise, Sun has a huge document using it for training, for teaching it is good but has some poor choices for application performance. A couple of companies making Java web application servers used it as a benchmark test between themselves. Same code, same hardware, different web application servers.

The .net version was designed totally for speed. It was then used to show the speed between similar purposes; ignoring the reason code was written.

will dieterich

# re: MS Petshop 3.x, your thedailywtf.com material times 1000@ Friday, April 01, 2005 2:30 AM

My thoughts exactly.

Paul Gielens

# re: MS Petshop 3.x, your thedailywtf.com material times 1000@ Saturday, April 02, 2005 4:53 AM

"Looking forward to seeing your port. It will also come in handy for all llblgen users out there to see how best to use llblgen with an asp.net application.

Will you be adding an example of webservice support? "
Yes, as full support for webservices is implemented in 1.0.2004.2, and the petshop code has a webservice so I'll add that too :).

Frans Bouma

# re: MS Petshop 3.x, your thedailywtf.com material times 1000@ Saturday, April 02, 2005 2:52 PM

Can't wait ;-)

John

John Mandia

# re: MS Petshop 3.x, your thedailywtf.com material times 1000@ Tuesday, April 05, 2005 9:40 PM

yay! Petshop.LLGLGen Pro. :)

bonder