Too Much

It's abundantly clear to me that I've been doing too much off hours programming when, while listening to Robin scold Kilgore for turning everything he sees into a toy, the first thing that pops into my head is, "Oh, that's no problem, he'll just subclass Pen and implement the IToy interface. That's an Adapter pattern."

So I spent the long weekend working on a re-port of our intranet site to .NET. I had originally done a port about 6 months ago and it wasn't that well organized. This time I picked up a couple of new books, to go along with the classic Design Patterns I already had, to help me better plan out the OO architecture.

The second book, Martin Fowler's Patterns of Enterprise Application Architecture was particularly helpful. I made heavy use of the Data Mapper, Table Data Gateway, and Lazy Load (particularly the Ghost variant of Lazy Load) patterns for the Business and Data layers. I'm pretty happy with the work so far, although I was reminded of how much I dislike the PostBack functionality in ASP.NET. It's nice for events on things like the built in Calendar control (which was a huge timesaver on the rewrite of the TimeSheet page), but for submitting forms it's just annoying. I'm still trying to work out a good way to prevent a TimeSheet entry from being added to the database twice if a user hits reload after the submit postback.

I also put alot of effort into bringing the markup up to date. It's semantically meaningful and entirely CSS driven. I tried to minimize the use of tables as much as possible, however for some things like a list of TimeSheet entries a table is still clearly the most valid way of displaying the data. For positioning different page elements though...that's what floating divs are for.

All in all, I think it's was a pretty successful effort. I'm quite fond of the middle tier architecture I've created. The presentation layer still needs work (inasmuch as I didn't implement an overarching architecture there) I'm sure as I port more pages from the first .NET version I'll be able to refactor some of the reappearing features out to a base class.

Posted by joshua at September 7, 2004 08:47 AM
Comments

Dork.

» so sayeth Matt on September 7, 2004 at 10:02 AM

You're just jealous. You're implementing the JoshuaOwnzMe pattern.

I'll stop now.

I promise.

» so sayeth joshua on September 7, 2004 at 11:36 AM

Kilgore needs a "Poor Impulse Control" tattoo. And everything in the house needs a "Not A Toy" sticker.

» so sayeth Robn on September 7, 2004 at 11:47 AM

No Impulse Control would be more appropriate in his case.

» so sayeth joshua on September 7, 2004 at 11:54 AM