Blog Post - Property Code Reduction

Blog Post - Property Code Reduction

Old forum URL: forums.lhotka.net/forums/t/4439.aspx


Patrick.Roeper posted on Friday, February 29, 2008

Since the blog doesnt want to take my comments...

Can you give an example of where a developer using CSLA would have to "hook and re-hook child data binding events"? The only place in my application where I have had to worry about child objects in the context of data binding is worrying about bindingSources in the UI whenever I update the reference of a parent object, which is something completely different I think.

Also, since "CSLA is managing the child object value", is there the possibility of implementing a deep-brokenRulesCollection directly in the CSLA base classes? In the UI, whenever the user tries to save an Invalid object, I would love to be able to display all broken rules for the entire object graph.


JoeFallon1 replied on Friday, February 29, 2008

I do not do the hooking that many other people do but I have seen enough posts where the child object needs to communicate with the parent BO and people are hooking this up.

I have been using a "deep broken rules" collection since the 1.x days. I re-wrote it for 2.x and posted on this forum. Never got much feedback on it though. I am sure it could be improved but it does list out all the broken rules for the root BO and its contained BOs.

Given that Rocky has essentially done the same thing as I did with his management of child BOs, there is absolutely no reason we should not be able to get  the deep set of rules. I am not sure if Rocky has written it yet or even plans to write it.

If you find the link to my old code then maybe Rocky can see if it is worth re-using any of the ideas.

Joe

 

Copyright (c) Marimer LLC