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.
