I know the title may seem like apples & oranges, but hear me out... :)
I'm building the architecture of an MVC app and considering what to use for the core of the controller / services. This stack will also serve as a RESTful API which will be equally as important as the UI.
I'm narrowing down my stack to be built with either Grails or JAX-RS (at this point I've ruled out other options and am not super interested in expanding this list). Either way I'll be using Groovy, and my model and views will be virtually unaffected by this choice, so that further levels some of the differences between the two. Here are the pros/cons that I've been pondering and was wondering if anyone had any other inputs or caveat experiences.
Grails
- I am not going to use a ton of the built-in Grails features (GSP/SiteMesh, Hibernate, nearly all plugins), so I'm concerned that Grails might be a bit heavy for my purposes
- I'm concerned that I won't have enough control over my ability to handle the REST API since it is very view-centric
- I've seen inconsistencies in the quality of plugins to the point where I'm not sure I consider them much of a 'pro'
- I love the convention-over-configuration & edit-and-refresh, to the point where I'd probably want to wire up something similar if I go with JAX-RS
- I like the grails command line for everything it streamlines, but I'm concerned that it might get in my way since I'm not using as much of the stack
- I like the scaffolding but since I'm not using Hibernate or GSP/SiteMesh it might not mesh well
JAX-RS
- JAX-RS is made for REST. This will make my RESTful API really a snap to implement as I have complete control
- Groovy is an important part of what makes Grails shine, so I'll benefit from that even in JAX-RS
- I love how JAX-RS doesn't automatically pull in a bunch of other things so I can have more control of what components are in/out
- unfortunately since it doesn't pull in everything else anything that I end up needing will require more work, whereas Grails might have a plugin
- the grails command line and scaffolding will be missed; perhaps Maven can fill some gaps
It seems like the capabilities of each for creating actions and routing are pretty similar (although the implementation styles are different). In fact there are other SO questions wish touch upon this so I'm not too concerned.