I am working on a project where the business object model and their persistence are already defined and implemented in Java (with JPA), my task is to develop a Web UI on top of them. The UI will be customized for the business operations, so it is not simple CRUD. Another goal is to build a set of REST API for external clients to access these business objects.
My question is, is Grails a good framework to use for my situation? Can I use Grails to wrap around my existing business object model instead of handling the persistence by itself? How easy it is for Grails to build highly customized UI (instead of straight CRUD UI that it generates for you automatically)? I suppose it should be really easy to build a REST API layer with Grails, is that correct?
Thanks for any feedback,
Yu
The short answer is Yes.
The reason why the answer is Yes, is because Grails is a framework. Just because Grails has Hibernate and GORM and uses Domain classes defined in Groovy doesn't mean your application has to. Have JPA backed objects? Great. Wire up some services (Since Grails is a Spring application you can do JPA through Spring) and make use of that.
Same with the UI. You don't have to use scaffolding. Plenty of Grails applications have very customized UIs that have nothing to do with scaffolding.
Grails offers you lots of tools for building REST APIs, they may fit your needs.
Take a good look through the Grails documentation and you will see it covers all layers of a modern web application. I know it's a lot of information to take in but there is a lot of details along the way in each layer that explains your options. That's the key. You always have options with Grails. This could be anything from a new view rendering engine to some Spring project or feature to one of the many Grails plugins. Take the time and do some research and I think you will find Grails is a very flexible option to consider.
The key take away is that Grails is a framework. Powered by Spring and Java. You can use all of the framework or some of it. You can use Groovy or Java. You can use Spring. The entire Java ecosystem is available to you. All in, Grails.
So, Yes.