Saturday, September 16, 2006

Quick research on the idea of aspectize databinding support

I did a quick research on the idea of aspectize databinding support (see my previous post

I googled "databinding and nhibernate". (why? because I knew hibernate is pure OO. To make it to support databinding, you either add that via code generation, or, using aop.
I could just google “aspect and databinding” – somehow, I googled nhibernate first. I guess I feel a concrete solution is more searchable than an abstract concept – Later, I did the latter also, same result.

I will put more thoughts in my comments.


Blogger survic said...

Now, I read all his posts. I got one important info: ObjectViews. So, I googled: "ObjectViews databinding".

Also, I realized that a better way is not using inheritance (not even aop-ed), just a simple wrapper ("shell").

I get a lot of useful links. I am reading them and will post my comments later.

google research is fun -- as long as you know what to search!

9/16/2006 06:42:00 PM  
Blogger survic said...

After I go through this period of dataset craziness, I will use the ObjectViews approach (perhaps inherit BindingSource) or aop-mix-in approach (as long as we have control of the Factory for those object lists for the UI controls, the latter is less intrusive).

The following is my post to:

I am new here. I knew ObjectViews just a few hours ago. However, I read all posts in

I have an idea: how about get some ideas from CSLA?

Of course, ObjectViews need to move the logic from the base class to ObjectView, a lot of redirect calls. However, since CSLA is quite mature for .Net20 now; it is a short cut for ObjectViews for .Net 20.

9/16/2006 11:19:00 PM  
Blogger survic said...

We need to change the databinding anyway:

9/17/2006 12:36:00 AM  
Blogger survic said...

also, Gentle.NET's ObjectView
-- it has minimum custom code.

10/26/2006 08:50:00 PM  
Blogger survic said...

notes of reading:
---- yes, I am slowly working on it as my relaxing mechanism -- so, mostly reading, and making notes.

What's flattening you ask? What if you need to bind to a list of persistent object, and want to show properties of properties? Flattening will do it.

IObjectView view = ObjectView.Create(someList, typeof(MyClass), "Name, Age, Group.Name AS Group");

Now bind to view, and you get 3 columns, Name (MyClass.Name), Age (MyClass.Age), and Group (MyClass.Group.Name). The bound objects will be of type IObjectRowView, and will carry a reference to the origonal object (in this example, MyClass). This is just like DataRowViews, and thier reference to DataRow.

10/26/2006 09:15:00 PM  
Blogger survic said...

why CSLA here? because of net20, for example, generics

10/26/2006 09:20:00 PM  
Blogger survic said...

Do not use the two approaches:

1. changing BindingSource: this can be the next step; but not necessary. objectView should be the first step.

2. object->datatable->dataview: it is too messy.

so, we return the "objectView" approach; to do it in 2.0, we need to borrow CSLA.

10/26/2006 09:36:00 PM  
Blogger survic said...

so, the real solution of databinding is in custom databinding, which in turn is in
objectview's code and its forum: and CSLA.

10/26/2006 10:10:00 PM  
Blogger survic said...

a post on objectView:

take a look of CSLA,
especially its SortedBindingList. Note that using that does not need to use CALA as a whole (I know it is one of the best; but I also feel it is a tough sell to use it as a whole) -- so, IEditableObject is still an issue. It seems that we should add the function to SortedBindingList so that it can handle object without IEditableObject. Also, we need to add more features when it is just a IList (not BindingList with T).

10/30/2006 12:16:00 AM  
Blogger survic said...

Here is the result:

11/05/2006 02:46:00 AM  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home