Modeling Object Graphs
Having looked at the JDNC api, it occurs to me that it is mainly focussed on modeling simple, 1 dimensional DataModels.
Has anyone given any thought to supporting Object Graphs, where a field of a DataModel could itself be another DataModel? This would match to, for example, a JavaBean with other Javabeans (or collections of beans) as its properties.
Looking at the DataModel API, you could probably add two methods to achieve this:
<br /> /**<br /> * @return the DataModel at named field, or null if field<br /> * holds a simple value<br /> */<br /> public DataModel getDataModel(String fieldName);</p> <p>/**<br /> * Sets the DataModel to be held by named field<br /> */<br /> public void setDataModel(String fieldName, DataModel value);<br />
Supporting the structure of the Object Graph at DataModel level, with appropriate MetaData to configure it, is a better option than relying on the application to ensure that disparate parent-child DataModels are kept in sync.
Another feature that would be useful is UI support for transaction demarcation. By that I mean that, a lot of client form programs I have seen will 'disable' entry into components outside of a transaction (ie. editing displayed data or creating a new data record, or even entering search criteria), and only enable field entry within a transaction. Likewise, certain operations (navigating through multiple records) are disabled during a transactional operation.