Maybe "transient" is misleading in my side of the discussion. Essentially a viewer should be able to instantiate an ISIS domain object that has no connection to DataNucleus, repository as such but can still have a domain service implementation fetch and put data from an external source (via, web-service, jms, whatever) and inject into the domain object. That keeps my domain layer intact and doesn't result in bleeding any domain behaviour out to other layers (e.g. view objects which are logically in the UI layer).
However as Dan points out, this doesn't sit well with RESTful style. In a traditional app, UI layer (usually using a MVC model) will make several invocations on domain object graph behaviour (fine grained method level calls) with state being maintained in the session for as long as needed over a series of client requests. This is not the case with RESTful style. Client is responsible for maintaining state with the server having no obligations in this regard. This does not sit well with a fine-grained method invocation on the domain layer - you would normally go for those big coarse grained calls and end up re-implementing a domain layer in the client that replicates domain behaviour. This is where the RESTful model falls into a heap (in my opinion) as the tradeoff is very significant. To retain the "finegrained" domain layer invocation on the server side in the RESTful style would necessitate rebuilding the relevant domain object graph with every call and trashing it afterwards. This rebuilding "hit" could be mitigated by careful use of caching on the domain service layer, however the lifecycle of the domain object graph has to be completed on every RESTful invocation. Regards, David. On Thursday, 20 March 2014 9:06 AM, Jeroen van der Wal <[email protected]> wrote: I do agree with David that there are plenty of use cases to think of where having a transient domain object on the server can be useful. I am wondering how comparable architectures deal with transient objects, perhaps an analogy with a Stateful Session Bean can be made? [1]. This would make a good topic of conversation on the IsisCon conference too. [1] http://www.jguru.com/faq/view.jsp?EID=917
