I have been doing auto code generation for .net application for many years now, and it seems that i have almost saved 35% of time or may be even more because of adopting to this technique.
Its not BIGGY to see how to do it. Following are ways we can think of:
- Writing our own code generator
- Using some other tool like CodeSmith (have to pay for it)
- OR Use MyGenerationSoftware’s Free tool – with ability to script the interface and as well as meta deta for database already built in.
I have concentrated on point 1 & 3 in most of my career and found both worthy of adopting. Ofsource first one take more time than later one. Now, coming to our big point HOW THAT CAN HELP ME???
To answer this let’s work out a little generic – pseudo – template example here:
FirstName = firstName; :LastName = lastName;
Now, the above little seems to be simple – but often its not the case that we have just 2 propeties to work out so there can be 20 of them. You can imagine where we are going on this.
Now auto code generation could help do the following:
- Maintain Coding Guidlines (cases, varaible names etc …)
- Confidence of being right – no testing needed for each object.
- basic implementation (insert, delete & update or even concurrency handling)
So, this kind of effort allows us to actually same time in our development and gives us confidence that generated code will be working all the time and we will be taking benefit from it.
Think of $$$ a company can save by using this technique…
by the way you can download free tool from www.mygenerationsoftware.com
they also have there already buil template as well. So, enjoy code generation and save lots of $$$.
Take care, have a nice coding future!