Hi everybody,
I don’t know if it is appropriate to post this message here or elsewhere in this forum; if not please don’t hesitate to give me feedback at regard.
As I love learning hands-on, I built a Java library that allows to define and organize rules, decisions and validations. I’m not new in making internal DSLs to simplify the creation of certain data structures and make the creation easily readable by less technical people. This time though I pushed myself one step further and I created a DSL with ANTLR4. To push myself even further out of my comfort zone I decided to not only make it public (the code is retrievable here: https://github.com/TristanoSuriani/jadeval ), I also decided to publish the glorious version 0.2.2 in Maven Central, so if someone wants to try it out this is the dependency to be added to the pom file:
nl.suriani
jadeval
0.2.2
It is a pet project and it shows; nonetheless, I think I can get much more precious feedback by going public than by keeping it private and forget it there. I’ll appreciate any type of feedback especially but certainly not limited to my ANTLR4 grammar (https://github.com/TristanoSuriani/jadeval/blob/master/src/main/antlr4/nl/suriani/jadeval/decision/Decisions.g4) my first own grammar written after reading until half of chapter 4 of Terence Parr’s book. Like someone says, if you’re not ashamed of your first release, you waited too long (or something like that).
Thanks in advance for any feedback!
Tristano
2 Likes
It seems we have now 2 Tristano in the community ![:smiley: :smiley:](https://emoji.discourse-cdn.com/twitter/smiley.png?v=9)
How would your project compare to something like Drools? Or to something like openValidation?
1 Like
Necroposting ![:slight_smile: :slight_smile:](https://emoji.discourse-cdn.com/twitter/slight_smile.png?v=9)
I forgot about this community for long time, but I’m finally back. To answer your question Federico, this project has been initially inspired by Drools. It was born as a proof of concept for a customer that wanted to implement a business rule engine for their application landscape, but eventually they chose to buy a commercial product. My reason not to choose Drools in first instance is that Drools is a very complex feature rich project, with a syntax that resembles more to Java code than to business expert’s language. My biggest success has been to let a colleague try to model a workflow with my language only based on a couple examples and a short explanation and in 10 minutes (explanation included) he successfully modelled a workflow without any mistakes.
At the moment this project is discontinued. That is mainly because I am not paid (anymore) to build it and I’m focusing on other learning areas. However, my 2 biggest findings have been:
- Although a modelling language can be useful, I would choose for a DSL that models the business itself in most of the cases.
- Providing good API’s to integrate the DSL in the GPL code is crucial for the adoption of the DSL by developers.
Overall, a great learning experience for a beginner language modeller.
2 Likes
It seems a very interesting project indeed.
I would have maybe considered building a DSL and then translate it back to Drools to avoid having to rewrite the rule engine. Just a thought, not sure if it would make sense
1 Like