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
1
votes
You 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
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
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
1 Answers
1
votes
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.