I've upgraded to 3.6.1 and wanted to start using the child dataportal.
I've seen the ProjectTracker example and found that when the Project root is fetching the Resources BL, it's calling its shared friend factory method, then it calls Dataportal.FetchChild. I wonder if it's ok -or not- to call directly the child DP inside Root DP and bypass the shared method since it isn't doing anything special.
In Project.vb, DataPortal_Fetch method, instead of
LoadProperty(
Of ProjectResources)(ResourcesProperty, _I'd like to use this:
LoadProperty(Of ProjectResources)(ResourcesProperty, _
Dataportal.FetchChild(Of ProjectResources)(data.Assignments.ToArray))
I also missed a FieldManager.FetchChildren() method to call multiple child BL, just like the FieldManager.UpdateChildren pattern. Maybe this can be added to the framework if it makes sense.
Thanks in advance for your comments
Thanks for your comments ajj3085
I don't see where it breaks encapsulation... I think that the parent should delegate to child DP the creation of the children, just like it delegates the update call. I don't see the point of having the child friend factory method now since we have child DP. In fact I think that the factory method was friend scoped for allowing the parent to call it, isn't that also breaking encapsulation?
Maybe I'm wrong but now I'm dropping all child factory methods in favour of the DP code, it saves some code and I think that the encapsulation is more o less the same.
Copyright (c) Marimer LLC