It looks like our company Subversion service is unavailable at this moment (update: My colleagues told me it’s most likely hanging at the RAID bios after a power failure in the building. It could be hanging there since there was one defect disk being replaced, but since it’s Sunday and the disk will arrive this Monday anyway, chances are high nobody is going to press [enter] until Monday morning: damned). But no worries, I’ve put online a new snapshot. Note that this one isn’t yet
committed in the Subversion repository (as the service is also unavailable for me). So if you
update your sources before I commit this new stuff, you’ll get less. If this unavailability happens often,
I’ll put it on a more known repository (like the ones that you can get at Novell Forge).
Feel free to make suggestions about this.
Note that I removed all the Subversion meta information to make sure nobody will
use this snapshot as a starting point (to make sure nobody will update
the snapshot code using Subversion). View this one as a sneak preview.
Again quite a lot has changed. I refactored a lot stuff. Added support for protected class members and the visibility attribute for interfaces and classes. And I fixed
stuff so that the Default XSLT Templates now successfully transform into a
complete VS.NET 2003 solution. Including correctly build classes that are filled with,
correctly build interfaces with abstract operations and attributes, correctly build project files and a correctly
build solution file. Somebody should really repeat this XSL Template work
for Eclipse Java, Python, Perl, PHP, GObject, C++ etcetera. Now that we
have a Free Software code generator framework, lets make it greater than
any existing one.
Therefore I created this technical documentation. It explains how to build your own code generator
using codegen (which ain’t hard and very few code is needed, don’t worry)
and how to prepare your XSLT Templates so that’ll generate
code in your favourite programming language and environment. This lets
you define the generated code exactly how you want it. And this lets you
choose how much of house-style code gets generated.
Note to the people that hate code generators: Codegen does not try
to define nor generate your implementations. It merely attempts to convert your UML
Class diagram into skeleton code. This basically means that it’ll generate
your classes and interfaces in the syntax of your favourite programming
language. Codegen will not read your database or whatever. At this moment it’s only using your UML Class diagram. Support for generating code using a database schema as input isn’t planned.
You have the very nice NHibernate for that.
Yet technically spoken isn’t NHibernate a code generator. It’s rather
a very useful framework for making it more easy to implement your data access
layer. Integration with NHibernate is a possible feature for a codegen user to
create. I can imagine one could mark certain UML objects as an implementation
of a IPersistable interface, and tell codegen to generate code for each
class that implements that interface to try generate calls to the NHibernate
framework. There’s not yet such a generator for codegen implemented. The main focus
of codegen isn’t to generate this type of implementation code. Often it’s
the task of the programmer to do this. But it could be a nice add-on, yes.