I have heard and read quite a bit on the Grails framework. I understand from their website that it's a framework designed to target the Groovy language.
Grails looks like a framework more suitable for small to medium applications than frameworks like Spring and Struts which need too many configurations to setup. But at the same time I'm quite reluctant to jump right into the Groovy language for reasons such as not mature enough, difficult to find developers, etc.
I want to know whether I can use Java instead of Groovy and yet leverage the benefits of Grails (or something that models after Rails). So, can I use the Grails framework but code in Java language? Even though Groovy seems like a superset of Java and they both can work seamlessly with each other, I can't find a place that says specifically whether or not I can use Grails and write in Java.
You can, but you'll lose all benefits of Grails. Like dynamic methods, artifacts, controllers, most of plugins, etc. And I don't think that you will be able to use GORM (database mapping) from Java.
What you'll lose:
So, basically you'll get just standard Spring MVC app with limited GSP views and, maybe, more convenient way to configure app, easier usages of static files/resources and i18n.
PS You could always write Groovy code with Java-like syntax. And use all Grails features at this case (moving slowly to Groovy, you'll see)
PPS There is no shortage of Groovy developers, btw. Every Java developer can develop Groovy. It just takes 2-3 hours to read some introduction to Groovy for Java programmer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With