Deep Data - DTO for Editable Root Object

Deep Data - DTO for Editable Root Object

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


tsaltd posted on Thursday, October 11, 2007

The pattern for creating ReadOnlyLists and ReadOnlyInfo BO's is clearly documented in the Deep Data sample for eliminating Data Readers and passing DTO's from the DAL  ....

But what about CRUD functions for Editable Root / Editable Child objects using DTO and DAL architecture  ??

Even tho I am consistently using DTO's in my application, I do see some value in staying with the DataFactory pattern .....

But since the example only fetches lists, I'm not clear on how to code Fetches for single objects ...

Try/Finally

The VB samples have Exception handling in the fetch methods of the OrderList .... I assume try/catch needs to be coded in C#, too ... for ReadOnly and Editable BO's

This is needed to take advantage of Idisposable, correct ???

DataFactory.GetxxxData() as xxx

Also ... the data factory only has one method for dynamically instantiating the Collection of Orders .... if there was an Order Editable Root, a method would be needed for that ... also, right ???

So in effect we need to create data factory methods for each of the BO's that may be "hydrated" from dynamically selected DAL assembiles ....

I also noticed a thread on this subject that indicates that the DTOs need to have IsNew, IsDirty, and Is Deleted properties .... any other pointers on CRUD functions for Editable Root and Editible Children when using DTO and dynamic references to DAL ???

Thanks,

Steve

tsaltd replied on Sunday, October 14, 2007

 

I'm continuing to develop my DAL using LLBL and DTO's ... ( I seem to be moving forward OK despite still being puzzled / uncertain about the questions I posted earler)

Now I'm looking at something else ... In Deep Data the DAL and DTO methods are mostly Public ... Shouldn't access to those funcitons be locked down more securely ??

Is there a resaon not to decorate themas "Friend Assemblies" so that Protected methods can be authorized for access across different assemblies ... I'm working in C# .. so I know that is a feature I can use .. Not sure about VB.

Thanks .. Steve

Copyright (c) Marimer LLC