views:

26

answers:

3

I need to define simple classes and interfaces (Ex. IClassInterface) in a language neutral way and then use a variety of code generation tools to generate the code files in a variety of languages such as C#, Java, etc... Does anyone know of a standard; ratified or otherwise; that I can use for the neutral representation. I know UML is often used for creating diagrams, but I am actually looking for something that can easily be parsed, extended, and used to drive other automated processes. Maybe this is actually possible with UML, although I am not sure what the markup language might look like if one exists.

I could create my own definition using XML or something similar, but I would prefer to avoid reinventing the wheel if possible.

+3  A: 

UML

Daniel Moura
I am aware of the graphical approaches to UML design... Is there a markup form that is easily parsible?
JoeGeeky
@JoeGeeky see this answer http://stackoverflow.com/questions/15376/whats-the-best-uml-diagramming-tool/224568#224568Maybe some of those tools have something like this.
Daniel Moura
+1  A: 

There is IDL (for example, Google's protocol buffers), and WSDL, which can be used to produce interfaces and classes by many web service frameworks. (You typically do not have to use the generated code as an actual webservice.)

The wikipedia entry for IDL lists a number of implementations of IDL. Although IDL is mainly for describing interfaces, some implementations also use it to describe objects (e.g. Microsoft IDL.)

mdma
+1  A: 

I think you might be looking for XMI (XML Metadata Interchange)

Robert Harvey