QGen – Code Generator

QGen is a rapid code generator I’ve been developing since 2007.

I’ve used it in 5 real time projects and found the enhanced productivity a boon.

Features

  • csv (/ tsv) file driven. So content can be managed in Excel making full use of Excel formulae, find and replace. Excel makes a good substitute for Class Diagrams and this way code always stays in sync
  • Switch folders based on namespaces (by using Lookup Columns)
  • Control when not to use a particular line in generation.
  • Generate different types of classes following the same set of rows (just add additional columns). Usually I create entities, FluentNH maps, Dtos and Views. This makes viewing your entire code base as easy as looking at a single excel file.
  • Merge contents of multiple files into one.

Compared to T4

Advantage: Visibility of Data. I can never stress this too much. Its especially helpful in multi layer applications where entity design keeps evolving. In T4, you have to navigate all over the place to regenerate stuff. tt / ttinclude files look horrible unless you find / buy a good syntax highlighter for it.

Disadvantage:

Include / exclude in visual studio with its source control implication.

Can’t run c# code or load stuff from database.

I will try and putup screenshots, and discuss some aspects of the code later.

2014 Update:

You can see it in action here:
http://ivy.cselian.com/aio

or the new one here
http://cselian.com/blog/tech/apps/qgen-lite


Warning: count(): Parameter must be an array or an object that implements Countable in /home/cselian/public_html/blog/wp-includes/class-wp-comment-query.php on line 405

Leave a Comment

Trackbacks and Pingbacks: