Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the best way to split a Grails application into web service(s) and a presentation?

I have a fairly conventional Grails application. It's monolithic; although it's somewhat split into plugins along functionality lines, it is built into a single war for deployment. Due to company architectural constraints, I need to consider isolating the app's persistence into a web service (or series of web services). What's the best approach to dividing a Grails application into a persistence service and a presentation application?

like image 211
Jim Norman Avatar asked Nov 14 '22 15:11

Jim Norman


1 Answers

Put your domain classes in a Grails plugin, and have two distinct Grails applications, one for your web front-end and one for your web service. Both access the database directly, but code for persistence is not duplicated.

Here is a blog post that have some more details on how to realize that.

like image 125
Antoine Avatar answered Dec 23 '22 13:12

Antoine