AddThis Social Bookmark Button

Code Generation: Another Justification

   Print.Print
Email.Email weblog link
Blog this.Blog this
Shawn Wildermuth

Shawn Wildermuth
Nov. 01, 2002 08:37 PM
Permalink

Atom feed for this author. RSS 1.0 feed for this author. RSS 2.0 feed for this author.

URL: http://sellsbrothers.com/news/showTopic.aspx?ixTopic=306&ixReplies=1...

I recently read about the reemergence of Code Generation on Chris Sells' News page. It seems that John Lam has been converted, but not by Chris. As some may know, I worked with Chris Sells while he lead the team that built DevelopMentor's Gen<X> so that I have been thinking about this code generation question quite a long time now.

Recently, topic open up on the Windows Technical: Off Topic mailing list. It seems that Shawn Van Ness (also a Gen<X> alum) has been beating the Code Generation drum lately. In fact he has a pretty cool . NET port of the X-Code engine (the heart of Gen<X>).

The question always seems to come about what is the compelling reason to use Code Generation in development. I've been in Chris Sells' camp that allowing to reuse domain knowledge by creating exemplars. For the last ten months I have been working on a metadata driven system for OneSource Information Services. This is where I had my epiphany. The trouble we have been having is getting the performance of a completely metadata driven system high enough to be acceptable. That's when it happened...I realized that if we allowed our system to be metadata driven at compile time, we could achieve the performance.

While at DevelopMentor, we did this very thing. We had a file format that was based on an XSD. Using an XML DOM could have allowed us to do everything we wanted, but why? Chris Tavares generated a wrapper class based on the XSD at every compile. This worked great.

So this is my stake in the ground. Using Code Generators to create code that is based on metadata to help make a performant, but flexible system. Anyone else use code generation in this way? If so, please let me know. I want to confirm my suspicion.

That's just my opinion, I could be wrong....

Shawn Wildermuth is the founder of ADOGuy.com and is the author of "Pragmatic ADO.NET" for Addison-Wesley.

Return to weblogs.oreilly.com.



Weblog authors are solely responsible for the content and accuracy of their weblogs, including opinions they express, and O'Reilly Media, Inc., disclaims any and all liabililty for that content, its accuracy, and opinions it may contain.

Creative Commons License This work is licensed under a Creative Commons License.