Imagine two Grails applications which share a domain class. Maybe a Book domain class.
One application is identified as the owner of the data, one will have to access the domain data. Something like amazon and the amazon web services.
I guess it is trivial that the owning application will use a normal domain class and will expose the data through web services - no problem in grails.
But what would be best practice to implement the domain in the other application?
- use a service to access the remote domain and not implement a local domain class at all?
- implement a local domain class, overwrite the get()-method in order to fetch the remote data and use the local database as cache?
- what other solution comes to your mind?