groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Theodorou <>
Subject Re: DSL Recommendation
Date Wed, 10 Jan 2018 16:42:20 GMT

Am 10.01.2018 um 15:35 schrieb Mohan Radhakrishnan:
> Hi,
>       I didn't know Groovy DSL's could be almost like plain english as 
> shown in

> <>
> Is that the latest recommendation ?  My use case is this.
> I would like to create a small library to create XPath 
> axes( 
> <>) using a DSL.
> Something like this.
> id of ancestor of descendant of Node
> This is just to create a more flexible way of using XPath expressions. I 
> don't plan to completely implement all expressions. Just a few.

DSLs are always depending on who is going to use them. If they know 
Xpath a bit, then GPath: would be my 
recommendation. Your suggestion for example is different than the often 
used top-down approach and is instead bottom-up. This can lead to a 
problem if your target audience is not used to that. On the other hand 
this can be exactly right... It really depends. Who is going to use it.

bye Jochen

View raw message