DSL driven web service testing/usage
hi,
can you please let me know whether the following is possible using MPS.
I want to create a DSL using which our clients can create models. Some piece of code reads the models and translate them to REST calls and execute them. If there are errors, should show them in the model editor.
For example, say I have the following model.
user Tom {
fn : Tom
ln : X
age : 34
groups {
admin, employee
}
}
I should be able to read this model and figure out that I need to
1. create a user with those attributes and
2. put the user in the said groups
3. translate the api responses appropriately to the domain editor.
While I understand that a DSL can be created, is the access to the model available to a java program ?
I am sure such a thing is possible, but, I am concerned whether it is easily doable ?
which example is suitable for this usecase ?
Appreciate your help
thanks
can you please let me know whether the following is possible using MPS.
I want to create a DSL using which our clients can create models. Some piece of code reads the models and translate them to REST calls and execute them. If there are errors, should show them in the model editor.
For example, say I have the following model.
user Tom {
fn : Tom
ln : X
age : 34
groups {
admin, employee
}
}
I should be able to read this model and figure out that I need to
1. create a user with those attributes and
2. put the user in the said groups
3. translate the api responses appropriately to the domain editor.
While I understand that a DSL can be created, is the access to the model available to a java program ?
I am sure such a thing is possible, but, I am concerned whether it is easily doable ?
which example is suitable for this usecase ?
Appreciate your help
thanks
Please sign in to leave a comment.
Still, you can "generate" your model into any format, and work with the resulting file from your java code.
We're going to let the users generate a web editor from a language description. Also, hand-written user's code will be able to access the underlying model and do application-specific things. We're using GWT as the backend.
it should be possible then to provide a web interface to clients to write custom rules [in a dsl we develop] and let the application back end process those rules. thank you.
thanks
Daniil Elovkov, sounds awesome, are there any progress?