I've been tasked with identifying exactly how a proposed architecture
that includes nhibernate could read and write data provided by an
external system, presumably through some sort of service api.
Currently, I see two distinct approaches (but perhaps I am missing
some, feel free to comment!):
a) Make no distinction between data owned by the system and data owned
by other systems - represent them both in the domain model and do all
the necessary work with IEntityPersister. (ALOT of work, not sure how
far you can go with this.)
b) Do not represent data controlled by external systems in the domain
model. Handle collaboration between your system and the external
system from your services/managers (an example of this stereotype
would be your OrderService from here:
http://www.ayende.com/Blog/archive/9042.aspx).
I suspect that option a) is overly ambitious and I -much- prefer
option b). However I want to be sure that I have given both approaches
a reasonable amount of investigation.
I have made some effort to search for examples of implementing option
a) from the java side but am yet to find much.
On Jun 25, 1:27 pm, "Ayende Rahien" <
aye...@ayende.com> wrote:
> I would strongly suggest not doing this.
> You can probably find some examples on the Java side.
>
> What exactly are you trying to do?
>