Posts
58
Comments
103
Trackbacks
10
The Pervasiveness of xGeneration

I was just thinking about just how much xGeneration (code generation, database generation, artifact generation) has filtered into software development.  I tried to throw a few categories together (based on Input), but I'm sure they aren't complete by a long-shot.  There's some overlap in there as well.

Reflective/Runtime Generators- Generators which work at runtime or just before/just after compile time

  • System.Reflection.Emit
  • Castle.DynamicProxy
  • SubSonic
  • Mock Object Frameworks
  • Runtime Aspect Frameworks
  • ASMX Webservices

Inferred Usage Generators- Generators which check context in order to allow us to create code more easily

  • ReSharper- the ability to generate code from the inferred context in Test-First development
  • Intellisense- the ability to finish our thoughts based on the current snapshot of our application and libraries
  • GhostDoc- the ability to produce a semblance of documentation from a method name and parameters

Artifact-Driven Generators- Generators which can take an artifact and produce something from it

  • CodeSmith- the ability to generate nearly anything from a template and an optional set of variables
  • Webservice Clients- the ability to produce a client proxy from metadata (WSDL, MEX, etc)
  • NHibernate- the ability to generate a database schema from a mapped object model
  • RhinoCommons- the ability to produce a fluent interface for database querying from a mapped object model
  • Model Driven Architecture

Visual Generators- Generators which work through some visual process

  • Visio
  • WinForms
  • WebForms
  • RAD (drag and drop)
  • SQL Enterprise Manager

It's interesting in that you can find a combination of tools to fit nearly any preferred style of development--any random combination of design artifact, application design, and relational design in any given sequence.

Looking a bit deeper, you might wonder what the difference is between interpretation and generation.  I might suggest interpretation is the initial step of generation.  The "compilation" of C# to MSIL and the runtime JIT process are other examples.

[Update: I think we need to build more Inferred Usage Generators.]

posted on Thursday, August 30, 2007 11:04 PM Print