Hi!
I think that it might be a good idea to make this ObjectView specialized for Hibernate, to make it attrative for:
1) .NET 2.0 Users (an Object View is included in .NET 2.0 with basic functionality) That is, if we provide only basic functionality, it might become obsolete when .NET 2.0 is release
2) Make NHibernate attractive for hightly visual programmers.
A generic (O/R agnostic) ObjectView can provide basic collection operations (Add, Delete) but it cannot provide complex operations like sorting or filtering because then it would depend on the particular object querying language and every O/R in the market uses a differeng language for that.
Maybe what should be buillt is something more like ECO expression handles take a look at:
http://www.borland.com/us/products/delp ... rial1.html
and at:
http://www.borland.com/us/products/delp ... rial2.html
Of course, the UML diagramming is outside the scope of this discussion, what we need to focus in is the way the Expression handles can be used to specify "visually" which objects are going to be loaded (in ECO, using an OCL Expression, in NHibernate, it should be possible to do the same using an HQL expression)
It is also nice how master-detail relationships can be handled visually.
Another interesting "visual" functionality, is the ability to configure the connection between a particular ObjectView (ExpressionHandle) and the current ECOSpace (througn the rhRoot). This means that after someone builds a bussinesobjects layer that works, a developer can easily (and fast) build an UI that works.
Copy&Pasted from Borland Site: "The ReferenceHandle component, which was placed on the form by the ECO Application wizard, provides the link between the EcoSpace and the Winform. A ReferencetHandle can be set to reference a specific object in an ECO Space or the entire ECO Space. This is how the ReferenceHandle is being used in this example. It is important to set the reference handle to use the ECO Space we have just defined in our model, set the following parameter for the rhRoot component.
EcoSpaceType = ContactManagerEcoSpace.TContactManagerEcoSpace
The ExpressionHandle is linked to another handle, either an ExpressionHandle or a Referencehandle, and evaluates an OCL expression to provide a resulting object, collection or value. It is possible to daisy chain ExpressionHandles where each handle evaluates its result from the results of the previous handle"
IMHO this means we could build a component to "visually" bind a particular NHibernate session to a our WindowsForms UI...
I think all this could make much easier for non O/R RAD programmers to adopt NHibernate... What do you think?