The relevant documentation on DTOs usage and justification is at [1]. It
just seems to me that there are two main threads to Apache Isis namely
Naked Objects and REST (i.e. representations) and the DTO concept seems a
bit foreign at the moment.


[1]http://isis.apache.org/guides/ugbtb.html#_dtos_code_1_11_0_snapshot_code

On Mon, Dec 28, 2015 at 8:23 PM, Stephen Cameron <[email protected]
> wrote:

> Hi,
>
>  Merry Christmas to all and best wishes for 2016.
>
> I have to implement a 'bulk upload' monthly report in XML format to a
> funding organisation.
>
> After reading up on the new JAXB @XmlRootElement form of 'View Model' I am
> still unclear as to why there is also a need for the concept of a Data
> Transfer Object (DTO)? What function does having DTOs serve over and above
> what is possible with the JAXB annotations?
>
> I can understand the need for versioned interfaces so that the domain
> model can evolve independantly, but aren't View Models capable of serving
> the same purpose? It just seems to me that adding DTO into the picture is
> complicating things.
>
> I am envisaging that my reports can be such a View Model class, one for
> each month and each with collections to hold summary statistics (e.g total
> contact hours per client) for that month, derived from either SQL views or
> processing other true domain objects.
>
> What is not clear at the moment is how I can allow access those XML format
> view models, created via JAXB annotations, to the user via the UI. The XML
> snapshot service is used in the todoapp demo for this, but it has
> limitations on the size of what can be handled it seems. Is it possible to
> use the JAXB marshalling in the same way?
>
>
>
> Thanks.
>
>
>
>
>

Reply via email to