I'll be joining a Java project that uses the Stripes web framework. Personally, I much prefer writing Groovy than Java, and am looking for opportunities to use Groovy in this project.
I'm looking for examples of where you can use Groovy (instead of Java) in a Stripes project presumably. Are there any particular steps that need to be taken in order to get Groovy working with Stripes (e.开发者_开发问答g. modifying the build)?
I'm particularly interested to know if it's possible to use GORM and GSP in a Stripes application.
Thanks, Don
There is an article explaining how to use Groovy with Stripes here : http://www.fdaoud.com/groovy.html
There aren't any specific steps, apart from modifying your build process to include the groovy libs at compile and runtime. We've integrated groovy into some of our new stripes applications, and I've only noticed a few gotchas:
- @URLBinding("/foo/{$bar}") needs to use single quotes, otherwise groovy tries to interpret as a gstring.
- While the linked article states you can take off getters and setters, I haven't had any luck. I just tried again and confirmed it doesn't work for me. I always assumed Stripes was using reflection to find the get* set* methods or something.
Edit: I should mention, I mean on an action bean and using the variables through stripes:form or stripes:useActionBean
精彩评论