Thoughts on Code Generation

Ruby is a fantastic language. I personally code in C# and use Ruby as my primary scripting language. I know there is a lot of hype out there regarding Ruby on Rails (ROR) and rightly so, but I’m constrained to developing my web applications in .NET which is a fantastic framework also. The reason I’m constrained is I have to adhere to specific DOD security requirements and as of right now the network I deploy on doesn’t have Ruby as a certified framework.

That doesn’t however mean that I’m rubyless. I do use Ruby to make my life easier as a developer. One of the things I’m working on is generating my .NET business layer from a very basic schema xml file using Ruby, XPath, and erb as the templating language. I have a working prototype and I’ll be posting my results soon to this blog.

I think one of the selling points of ROR is the ability of the framework to “blackbox” the data access. That’s what I’m aiming for in my code generation. You have to realize upfront though that you can never have a one stop shop so to speak. You have to allow the developer to have the flexibility to extend the generation without altering the generated files themselves. This is where the beauty of abstraction comes into play. I’ll delve more into that later in my posts.

2 Responses to “Thoughts on Code Generation”

  1. Ian Lumb Says:

    First of all welcome!
    You wrote:

    One of the things I’m working on is generating my .NET business layer from a very basic schema xml file using Ruby, XPath, and erb as the templating language.

    I’m very interested in learning more about what you’ve done. My own interests are in developing a semantically rich data model.

  2. libera Says:

    i’am really impressed!!

Leave a comment