For several years now I have been developing a tool called CodeGen. As you may have already guessed from the name, it’s a code generator! What’s a code generator? It’s a tool that generates code … sounds useful, right?
Well it is useful, in many different situations. Not all situations of course. If a code generator could generate ANY piece of source code that you might need then we wouldn’t need programmers any more … so why would a programmer write such a tool?
OK I jest a little. Believe me, if it were possible to write such a tool then I would have done it, and I’d have made a lot of money from it, and I probably wouldn’t be sitting here writing this BLOG right now 🙂 No, of course it’s not possible to write a tool that can generate ANY piece of source code, but it absolutely is possible to create a tool that can generate useful code to address a wide variety of different requirements, and that’s what CodeGen does.
So just what is CodeGen? Well, I generally describe it as a “template-driven” code generator. What that means is that you start with a template file that defines the general “rules” for the code that is to be created, and you combine the information from that template file with some meta-data in order to produce the final code. So now the question is where does the meta-data come from? Well, when using CodeGen, in most cases it comes from a Synergy repository.
A repository database is an extremely rich source of meta-data relating to the data structures that are used within your applications. The applications that we write totally revolve around data, they create data, update data, and analyze and present data. So having a repository which completely describes not only the data structures that your application uses, but also a huge amount of additional information about HOW that data is represented and to processed, and armed with an API (ddlib) which allows programmatic access to that meta-data, a programmer can create software that “does things” based on that information. That’s what CodeGen does.
By the way, don’t fret it if you don’t already use Repository … that’s easy to address.
I have no intention of “rambling on” about what CodeGen is and how it works, because that information is all available elsewhere. CodeGen has been in use for several years, I use it extensively, and I have used it to deliver real value to several customers also. In fact in the past, that was the model. CodeGen was a tool developed by Synergex Professional Services Group, and it was available for us to use during consulting engagements. If we used it during such an engagement then that customer got to continue to use the tool, and many have done so.
The real point of writing this post is to announce, with great delight, “that times are a changing”. We’ve decided to take a different tack, and make CodeGen available to a wider audience; a MUCH wider audience. I am delighted to announce that CodeGen is now an Open Source product, and is published for the world to download and use. The project is hosted on CodePlex (Microsoft’s Open Source hosting platform) and you can view the CodeGen project home page at https://codegen.codeplex.com.
So just what does this mean? Well, it means that CodeGen is now available for you to download and use, and I hope that lots of you do just that. CodeGen is now primarily developed with Synergy .NET in Visual Studio, and if you want to use it you have two choices:
- Download the pre-built distribution (a Windows Installer setup program).
- Download the source code package and build it yourself.
The binary distribution is built with the latest version of Synergy.NET (9.5.3b), so you’ll need that version of Synergy to use it. If you’re working with an older version of Synergy then you’ll need to build CodeGen from source code, but you’ll still need a pretty recent version of Synergy/DE.
Even though the main development environment for CodeGen is now Synergy .NET, it wasn’t always that way. CodeGen started out life as a regular “Traditional Synergy” application, and it still works just fine that way. What that means is that CodeGen is equally at home under Synergy .NET or Traditional Synergy on Windows, Unix, Linux or OpenVMS, and the source code download includes scripts to build CodeGen on all of these platforms.
If you are currently attending the Synergex DevPartner Conference in Chicago, IL then you’re going to hear more about CodeGen during the conference today, and on Tuesday afternoon there will be a hands-on tutorial available to help you get real experience working with it. And if you’re attending the conference in York, England in June then don’t fret, you’ll get the same opportunity. But if you’re not attending either conference (it’s not too late to sign up for York) then you’re definitely missing out on some great information about CodeGen, and a BUNCH of other cool stuff!
But just because you’re not attending the conference doesn’t mean that you can’t use CodeGen. Head on over to https://codegen.codeplex.com to get started right now. And please, even if you don’t use CodeGen right now, at least “follow” the CodePlex project so that you’ll be kept up to date with news about the product.
By the way, to my best of my knowledge this is the first time that a “DIBOL” (Synergy) application has been published as an open source project, and I’m pretty stoked about that. BUT … there’s more! There’s another open source Synergy project about to “hit the streets” … and it utilizes CodeGen … but I’ll leave it up to my friend and colleague Richard Morris to tell you all about that!