5.1 Creating Code Automatically with MyGeneration

The development process involves many repetitive tasks that require enormous amounts of time but involve little creativity. These tasks usually involve heavy use of copy and paste and are the cause of many errors. Creative developers often write custom applications to automate these repetitive tasks. These rag-tag, custom-built code generators are very limited in their use, though, and are often thrown out soon after they’re written.

MyGeneration templates let developers automate these boring tasks and concentrate on the more challenging problems of implementing a system. Many O/RM platforms, such as NHibernate, EntitySpaces, dOOdads, Gentle.Net, Opf3, Easy-Objects, and iBatis, already offer templates free of charge in MyGeneration’s online template library (http://www.mygenerationsoftware.com/templatelibrary/default.aspx). The entire template library is also accessible through the MyGeneration application’s template browser. A plug-in framework exists to enable custom assemblies to be referenced within a template, and the Microsoft .NET Framework is fully accessible as well.

Unlike many popular code generators, MyGeneration is not tied to any specific Framework or language. It can generate any kind of file: PDF, SQL script, C# class, XML, or any other format. Because it uses a template-based approach, it is easy to customize it to fit your own code-generation needs.

While MyGeneration can generate almost anything, its most popular ...

Get Windows Developer Power Tools now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.