Search code examples
.netlanguage-agnosticcode-generation

Code generation in software development


First broader view : I got assignment for school project that states "Design and implement tool for rapid development of IS by code generation of core of business and data layer. (paraphrased). Its specific for .NET and C#, but anything is fine in this case.

I dont have that extensive knowledge of code generation or development of information systems. I was looking around some code generation framewroks and tools. More specificaly T4 and CodeSmith Generator. One thing that hit my eye is .netTiers set of templates, that have some interesting ones, that can be used in software development. But I dont know how much usefull in actual development they can be.

Well my question : Is there a way to develop an information system based mostly on code-generation? Or some way to make bigger use of code generation tools and templates in general? If I have this, I can work on more specific things.

I also tried to look at some questions here, that concert code-generation, but most of them are about if it is good or bad, or general experience with them. What I want is specific experience with specific tools and templates and how much profit in development they have.

Thanks a lot for answers.


Solution

  • Yes it is.

    I think that one of the Biggest things you could look at is Naked Objects.

    Java: Naked Objects.org

    .NET: Naked Objects MVC

    These two basically generate an entire program just from the domain model. Very interesting. Scott Hanselman did a Hanselminutes on it here: Hanselminutes w/ Richard Pawson. Also has some links to some very interesting things on it.

    If you watch Hanselmans talk from PDC PDC he does a lot of stuff using code generation.

    My company Generates the entire DAL and BO layer (without out custom functions) from a data model, using the CSLA .NET templates and CodeSmith.

    So yes you can do quite a bit using generation and I haven't even really touched the surface of what you could really do.