I am looking for a way to generate some model classes to multiple languages (Java, C#, JavaScript) to maintain consistency among these. Is there some tool which will help me define the model in one place and generate it after each change for all three languages? I was looking at JetBrains MPS, but it seems to be useful for generating only one language, it is even written in documentation, that only one language generator (if any) is recommended.
Only way I found so far are XML files and XSL transformation for each language, but I am looking for more convenient way.
If by "model" you mean classes that only keeps data, and you need consistency for serialization / deserialization, you should consider google protocol buffers: https://developers.google.com/protocol-buffers/ or similar solution.
For more sophisticated uses, you may consider writing in c and generate wrappers with swig: http://www.swig.org/, but is is extreme ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With