3 ms·
> Running unit tests has been so painful that we hacked Rails to run tests via Web interface. If that's because of the warm-up problem, Groovy is much better s
by martincmartin 17y ago
> Running unit tests has been so painful that we hacked Rails to run tests via Web interface.
If that's because of the warm-up problem, Groovy is much better since it doesn't start a new JVM for each test.
> Moreover, accessing Java classes from JRuby isn't nearly as smooth as using something like Closure. Ruby strings aren't Java strings and it applies to arrays, hash tables, everything.
With Groovy, it's about as seamless as you're going to get. That was very much a design goal of Groovy.
The down side is, if you already know Rails, you have to learn half a language (Groovy borrows a lot from Ruby, so you only have to learn the deltas.) And of course you can't use Ruby packages. But you do get all Java libraries for free.
- donw 17y agoI started my current project in Grails, and switched back to Rails, because debugging was a nightmare. Massive stack traces (multiple hundreds of lines) due to reflection, and some really irritating typecasting nightmares due to the String/GString difference. The long-running memory leaks were the sort of things the Vikings wrote poetry about, because even Beowulf couldn't smite them. Not to mention some massive showstopper bugs in Grails, things like 'logging doesn't work, and yes, we know.' Also, if you want to 'break out of the box' in Grails, and are not a really seasoned Spring/Hibernate developer, good luck. Groovy is a nifty language, and I like the idea of Grails. It's a great tool if you're already an experienced Java/Spring/Hibernate developer, but it isn't really a Rails replacement.