Code Generation
I've been thinking about building a code generator for some business objects I'm working on for a project. A lot of the stuff is repeating a pattern that occurs to me would lend itself well to code generation. I think I could build a template .cs file that could be parsed to build new classes with the stubs and basic code for all manager methods. For the interfaces, a generator could parse the xsd schema that I'm using to build the entity objects. I'm using XsdObjectGen for those already, but it doesn't include an option for interfaces. If this could speed up things even more, it might be worth spending a couple hours on it.
I've never done it in anything like this except in Perl, and my Perl is extremely rusty. I haven't had a chance to start reading Kathleen Dollard's code generation book, so I might use Ruby or Python instead of C#.
0 Comments:
Post a Comment
<< Home