I have created one grails project that contains all the foundational domain objects. I want to create separate grails projects so it helps me to keep the functional boundaries separate , but, I have a need to use these foundational domain objects and services as a base dependency so i can use this layer seamlessly in all of my other grails project. Any thoughts on if this is a right approach and some pointers on how to go about doing it is highy appreciated
Asked
Active
Viewed 100 times
1
-
1You could make it a plugin, but why not just make one REST API that multiple apps talk to to interact with the domain? – Todd Sharp May 24 '17 at 03:55
-
Agree with the first part, not with the second. REST API is not always the best solution; shouldn't be suggested, without adequate knowledge about the requirements and stuff. – Adeel Ansari May 24 '17 at 06:43
-
I did think about the REST API as one of the solutions but in the short term I did not want to increase the complexity of my architecture , so thought having them as a dependency will still help me achieve modularity. – jay May 26 '17 at 00:48
1 Answers
1
You can make the one, having domain classes, a plug-in, instead. Then, use that plugin in your actual app.
See the docs, especially the section, Plugins and Multi-Project Builds.

Adeel Ansari
- 39,541
- 12
- 93
- 133
-
Thank you Adeel Ansari for the suggestion, i will go through the docs and i will let you know if i found what i was looking for – jay May 26 '17 at 00:46