Question

An all-purpose code generator/modeler, probably template-based, that can generate code in one or multiple (mixed) languages, with a dedicated, easy IDE (no tangled command-line tools), where you can develop and maintain your entire application from scratch, would be nice!

This generator/modeler would let you work on your model, and never on the resulting code (no round-trip necessary).

Do you know any such product, or is this still utopic?

Was it helpful?

Solution

Take a look at http://www.codesmithtools.com/

"a template driven source code generator that automates the creation of common application source code for any language (C#, Java, VB, PHP, ASP.NET, SQL, etc.)."

There's also www.mygenerationsoftware.com, but they only advertise support for "Template Based Code Generator Supporting Four Template Languages - JScript, VBScript, C# and VB.NET."

Also, look at the suggestions from this question: Do you generate code? If so, what do you use and what do you generate?

OTHER TIPS

Do you mean code generators for DAOs, XML parsing and generation, Serialisation, end-language model code, etc, from a model definition? Obviously business logic would be something else, unless you were going to handle that with a rules engine like JBoss Rules.

Axis 2 for Java can take a model definition as .xsd and generate a Java model and XML. DAOs could be handled by Hibernate, etc.

But I am not aware of any specific tools (although that CodeSmith looks pretty useful to me now I've had a look at it), although I have been thinking of generating such a tool for my own projects (writing DAOs, XML, etc, bores me to death otherwise), but a few pages in a notebook does not make a usable project :)

For Visual Studio, there's T4 and this addon

http://www.t4editor.net/

There are also Blueprints

http://channel9.msdn.com/wiki/softwareplusservicesblueprints/

See the discussion of how our DMS enables a wide variety of code generation. What you are calling templates are called "transformation rules" or "patterns" there, except they aren't blobs of text with holes in them; rather, they are crisp fragments of whatever source or target language you are using with precise placeholders for variables. Unlike text templates which can easily be abused to produce invalid syntax, you cannot generate invalid syntax with a DMS pattern or rule.

Yes there is Click2Code, a template driven generic and easy code generator from onlinewebtech.com

codesmith ftw

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top