What web platform is right for me?
Posted
by egervari
on Stack Overflow
See other posts from Stack Overflow
or by egervari
Published on 2010-05-29T23:37:25Z
Indexed on
2010/05/29
23:42 UTC
Read the original article
Hit count: 217
I've been looking at web frameworks like Rails, Grails, etc. I'm used to doing applications in Spring Framework with Hibernate... and I want something more productive.
One of the things I realized is that while some of the things in Grails is sexy, there are some serious problems with it. Grails' controllers:
1) are implemented awfully. They don't seem to be able to extend from super classes at runtime. I tried this to add base actions and helper methods, and this seems to cause grails to blow up.
2) are based on an obsolete request parameters model (rather than form backing objects, which are much nicer).
3) are hard to test. Command objects are treated totally differently... and it's actually MUCH harder to write the test than it is to write the controller code.
4) Command objects operate totally differently. They are pre-validated and bound, which causes a lot of inconsistencies than basic parameter model.
5) Command objects are not reusable, and it's a pain in the rear to reuse most of the stuff from the domain classes, like constraints and fields. This is TRIVIAL to do in basic Spring. Why the hell was it not trivial to do in Grails?
6) The scaffolding that is generated is pure crap. It doesn't generalize inserts and updates... and it actually copy/pastes a pile of code in two views: create.gsp and edit.gsp. The views themselves are gargantuan piles of doggie do-do. This is further compounded by the fact that it uses low-level parameters and not objects.
Integration tests are 30x slower than a Spring integration test. It is disgusting.
Some mocking tests are so hard to write and aren't guaranteed to work when it's deployed, that I think it discourages fast, tdd test cycles.
Most things seem to screw up grails while it's running, like adding a taglib, or anything really. The server restart problem wasn't solved at all.
I'm starting to think going with Spring/Hibernate/Java is the only way to go. While there is a pretty big cost at startup, I know it'll eventually smooth out.
It sucks I can't use a language like Scala... because idiomatically, it is so incompatible with Hibernate.
This app is also not a run-of-the-mill UI over a database. It's got some of that, but it's not going to be a slouch. I am deathly scared of Grails now because of how crap it is in the Controller layer.
Suggestions on what I can do?
© Stack Overflow or respective owner