CodeGen on Steroids

21 May, 2009 (13:39) | .NET Code Related, Software Architecture, Uncategorized | By: twagner

steroids1Wow, I really have been leading a pretty sheltered life as a consultant. There is a toolset I have used for a number of years that has predictably delivered results. When it comes to projects where you deliver or you dont eat its pretty important that your tools work. Along the way I was fortunate enough – with the help of one important friend ( Dan ) – to produce some pretty good tools. We had a version of MVC in 2006 – 3 years before MS had theirs.

Fast forward to 2009. ASP.NET MVC hits the market. Only its not just routing and actions its a whole big kit and kaboodle. Reminds me a little of RoR. Along the way all of a sudden a lot of folks are complaining that Viewstate is the big evil and if only they could code without it. Meh. Sounds a little like people flocking to the latest shiniest thing. And there is nothing wrong with that. Its just ironic that many of the personality types that flock to this technology are the same type of folks who argued that datasets would save the world. Geez.

MVC is good stuff and my buddy Phil has poured his heart into this project. So I certainly hope it will thrive and progress. What has me confused at the moment are a plethora of adjacent projects that are growing up around it. I have a hard time discerning which to take serious. What do I make of an open source “architecture” that spits out a bunch of scaffolding pages and uses itself two other OSS projects. By the way, am I the only one who sees a trend of OSS projects where someone produces an entire new something that is 50% built on top of someone elses new something. Hope that makes sense. Did the RoR community go through a similar evolution?

As a consultant I need rock solid tools that are not necessarily going to be impacted by a deprecation of some obscure aspect because the manufacturer used some OSS project that is no longer popular. I really should research how the RoR community deals with this.

And while I am on the subject of “architectures”…. seems that there are some ASP.NET MVC “architectures” floating around that are primarily fantastic code generators. I would actually call them Form Wizards on Steroids. Hence the pic.

In 1992 I worked on a pretty large MS Access app. Yes we did those and they were good. Dont laugh. MS Access was the MVC of its day. Anyways, the IDE had a Form Wizard. Point it at a query or table and it would generate all the code you need. I learned an important lesson back then about code gen. Especially UI code gen. Dont use it. Wizard generated code is great … al the way until you need to change it. And Wizard generated apps tend to contain a lot of unnecessary stuff that you wouldn’t produce by hand.

Now mind you I am not talking about the utilization of some other view engine. Spark for example looks pretty cool. I am talking about the notion that a utility spitting out a bunch of views and controllers and tests is a measure of productivity. It is not.

Speaking of productivity. Rob Connery had a very cool demo of MSpec on his site. Finally a spec / test system that makes sense. (Besides Fitnesse that is).