[
https://issues.apache.org/jira/browse/ISIS-561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13794937#comment-13794937
]
Dan Haywood commented on ISIS-561:
----------------------------------
Transient objects have grown to have two separate usages.
The first usage - as you say - is that they act as view models. However, they
have had some limitations, in that they rely on the viewer to maintain their
identity over time. The DnD viewer and the Scimpi viewer do this, and I might
even have written the Wicket viewer to do this also; but the RO viewer does not
and cannot do this because it is deliberately stateless. Therefore for RO at
least a transient object is a very anaemic view model.
The second usage (and the original one) is that a transient object is a domain
entity that hasn't yet been persisted. Hence we have the
newTransientInstance(...) followed by persist(...) idiom. Generally though
these methods are called in the same action, so separating them seems silly.
Internally, transient objects get their own Oid state, so there's a bunch of
logic within the core of Isis to handle them (separate from the logic to handle
view models).
> Now we have support for view models, we could simplify matters elsewhere by
> removing support for transient objects.
> -------------------------------------------------------------------------------------------------------------------
>
> Key: ISIS-561
> URL: https://issues.apache.org/jira/browse/ISIS-561
> Project: Isis
> Issue Type: Improvement
> Components: Core
> Affects Versions: viewer-wicket-1.2.0, viewer-restfulobjects-2.0.0,
> core-1.2.0
> Reporter: Dan Haywood
> Assignee: Dan Haywood
> Fix For: viewer-wicket-2.0.0, viewer-restfulobjects-2.2.0,
> core-2.0.0
>
>
> Some discussion is required before going ahead with this. But it'd be nice
> to delete a bunch of code... :-)
--
This message was sent by Atlassian JIRA
(v6.1#6144)