Attention: We are retiring the ASP.NET Community Blogs. Learn more >

Code Generation

Just a side note.

Code generation makes sense when you are applying a common coding pattern in the same places every time. Sometimes you can do the same with a good OO design, sometimes you cannot. Of course, I won't build a code generator for the .NET BCL, but for enterprise applications, I think there is a lot of places where you can use code generators.

Enterprise applications are usually quite similar. Presentation -> Business Logic -> Data Access -> Database. We all agree it's quite easy to generate the data access layer, as we all agree on how to describe a database. If we all agree on how to describe business logic and on how to describe a presentation layer, then we can generate all the layers. You would probably have a workflow engine involved, and there are also ways to generate a workflow description.

Enterprise applications also have 'services' that the generated components will use like transactions, caching, etc. You'll just generate components that use the services of the pre-existing framework. It also makes no sense to think that we'll generate the application's infraestructure.

 

 

No Comments