Modern client-server applications manipulate complex graphs of data objects. For example an insurance contract with its positions and optional amendments is represented as a hierarchy of data. These information graphs are transferred between the server and the client applications. The user views data, edits it and commits the changes to the server and the underlying database through server functions. The patterns commonly found in the literature describe thoroughly how to implement simple data transfer objects DTO but ignore the complexity how graphs of objects should efficiently be transmitted between server and client components.
The intended audience is software developers interested in using Data Object Graphs or implementing their own variant. The framework described provides pragmatic solutions to this common problem. This “state of the industry” approach efficiently transfers trees and graphs of value objects between client and server. Modern code generation technologies, based on the model driven architecture MDA approach are used to generate needed code artifacts. The application architect can fully concentrate on the business analysis and avoid loosing time to solve infrastructure problems.
The approach used in this implementation is to transmit all operations performed on the graph of entities to the server for execution. Therefore no complex logic to find out which changes were performed on a graph needs to be implemented. The changes are send as a list of commands to execute on the original graph of entities. This approach is different to previous designs we publish in the pmMDA project where the commands were computed as the differences between two graphs of objects.
Manipulation on a graph of entities can be described with the following commands.
Each entity has four characteristics
The qualified classname and either the internal identifier or external identifier uniquely identify an active instance in the context of a domain model. In other words these two information always find the row of data in the relational database.
Adding the version empowers you to retrieve the archived instance in the context of a domain model and its lifecycle.
Storing the commands in a queue command provides an efficient implementation of undo and redo behavior on the domain model.
To be written