Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Vorto » Configurable Vorto Generators?(Configuration or Settings for Vorto Generators)
Configurable Vorto Generators? [message #1725338] Wed, 02 March 2016 16:47 Go to next message
Nagavijay Sivakumar is currently offline Nagavijay SivakumarFriend
Messages: 11
Registered: August 2015
Junior Member
There are sometimes code generators needs to be configured at runtime with certain properties to have code generated differently. Currently the Vorto generator doesn't have option to provide different configuration for the current generator, instead user has to create a new generator or have new version of the same model with different implementation. This forum is to explore the possibilities of configurable generators.

The example scenarios are discussed in this topic.

Few example usecase Scanarios:
1. If there is a generator written for Rest api, there is a possibility to generate rest api with standard jsr 311/339 or spring mvc (http:==projects.spring.io/spring-framework/) (assuming spring mvc is commonly used in enterprise ). Often this should be configured as a configurable parameter instead of writing new generator.
2. For generator written to handle Database related code, often there could be many different implementation of database (like mysql, mongodb, oracle etc). Each of the generated code have few minor changes only.

For these kind of scenarios, writing generator for every possible database vendor is not efficient. So, user should have option to provide settings at the runtime.

This section is discuss the above in detail.

Implementation options:

- Possible options could be, is to have a default properties file within generator and the properties are overriden at runtime by User supplied values from GUI or command line parameters depends on the context it's used.

[Updated on: Wed, 02 March 2016 16:50]

Report message to a moderator

Re: Configurable Vorto Generators? [message #1725361 is a reply to message #1725338] Thu, 03 March 2016 02:38 Go to previous messageGo to next message
Alexander Edelmann is currently offline Alexander EdelmannFriend
Messages: 35
Registered: January 2015
Member
Hi Vijay,

thanks for your suggestions and I agree, that would definitely be very useful!
To put your idea in other words, you want to have a generator configuration that is passed to the specific generator upon invocation time and based on these configurations it would handle the generation differently, right?

At the moment this input context is not implemented and would require a API change , e.g. to something like that

generate(InformationModel model, GeneratorContext context)

where the generator context would contain the mapping context and input key/value pairs coming from the UI / when invoking the generator.

Would you please raise a bugzilla feature issue about this, under component Code Generator?

Thank you + Cheers,

Alex
Re: Configurable Vorto Generators? [message #1725466 is a reply to message #1725361] Thu, 03 March 2016 16:41 Go to previous messageGo to next message
Nagavijay Sivakumar is currently offline Nagavijay SivakumarFriend
Messages: 11
Registered: August 2015
Junior Member
Created new bugzilla issue to track https://bugs.eclipse.org/bugs/show_bug.cgi?id=488964
Re: Configurable Vorto Generators? [message #1725477 is a reply to message #1725466] Thu, 03 March 2016 17:42 Go to previous message
Olaf Weinmann is currently offline Olaf WeinmannFriend
Messages: 29
Registered: May 2015
Junior Member
Thanks for creating a bug for this! I absolutely agree that this will improve our code generator infrastructure a lot!

Cheers,

Olaf
Previous Topic:Overriding Vorto Code Templates
Next Topic:Java library for accessing Vorto repository
Goto Forum:
  


Current Time: Fri Sep 21 12:13:21 GMT 2018

Powered by FUDForum. Page generated in 0.01529 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top