I am writing code for a cloud based NoSQL Database in Android Studio and realized that I also need some backend processing in a different language for the same data set. Now I would prefer to not repeat the field and document names both in Java and in the other language (node.js, php, python, you name it).
Can this be done from within Android Studio? I am aware that I can create my custom gradle task but gradle is only an automation tool it does not transform data etc.
I've found various tools for code gen creating activities etc but nothing more general, e.g consuming some DSL and generating java and other files.
If you want to generate the backend code, you can try Telosys http://www.telosys.org/
This tool has a DSL to define a model and it can generate code for different kind of languages (Java, Python, NodeJS, etc ). Typically for REST services.
It's possible to use the CLI version as a companion tool for your favorite IDE (like Android Studio)
For NodeJS you can try this set of templates: https://github.com/so-technology-watch/telosys-templates-nodejs
For Python you can use the following templates :
Python REST with Bottle : https://github.com/telosys-templates-v3/python-web-rest-bottle
Python persistence with SQL alchemy : https://github.com/telosys-templates-v3/python-persistence-sqlalchemy
And for Java there are different kinds of persistence templates here : https://github.com/telosys-templates-v3 (JPA, Redis, Mongo, etc )
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