Click here to Skip to main content
15,886,806 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: How to get dll's functions? Pin
Peace ON16-May-10 23:47
Peace ON16-May-10 23:47 
AnswerRe: How to get dll's functions? Pin
neal12318-May-10 19:14
neal12318-May-10 19:14 
QuestionAbout Garbage collector Pin
sujithkumarsl16-May-10 20:51
sujithkumarsl16-May-10 20:51 
AnswerRe: About Garbage collector Pin
Peace ON16-May-10 23:51
Peace ON16-May-10 23:51 
AnswerRe: About Garbage collector Pin
Eddy Vluggen16-May-10 23:51
professionalEddy Vluggen16-May-10 23:51 
QuestionHow to customize Windows Regional options Pin
kindman_nb16-May-10 19:04
kindman_nb16-May-10 19:04 
AnswerRe: How to customize Windows Regional options Pin
Eddy Vluggen16-May-10 23:54
professionalEddy Vluggen16-May-10 23:54 
QuestionHierarchical domain object creation not SOLID Pin
Peter Trevor16-May-10 8:11
Peter Trevor16-May-10 8:11 
I have a project where the data is intended to be hierarchical in nature. The obvious solution seemed to be to create a hierarchical set of domain objects: when you instantiate the root object (with its key) it goes to the database to get its properties and a list of children. It then instantiates a child object for each and maintains them in a collection. As each child object is instantiated the process repeats itself recursively.

All well and good. Except it doesn’t follow the principles of SOLID: these domain objects contain data access code. What is the correct design (or design pattern) here?

- Do I ignore SOLID in this case?
- Have a parallel hierarchy of data access helper objects (one for each domain object)?
- Do I keep all the data access code in the object that created the root domain object (ensuring it is thread-safe) and reference it from the domain objects using callbacks?
- Encapsulate the data access code in a thread-safe singleton helper?
- Is my basic approach flawed?
- Something else?

(The database hasn’t been designed yet, and the domain objects will need to be able to save changes ... more data access code. These domain objects will be accessed a number of ways including via a treeview in the UI.)

Surely this is something that must have come up many times before.
AnswerRe: Hierarchical domain object creation not SOLID Pin
TheyCallMeMrJames17-May-10 6:41
TheyCallMeMrJames17-May-10 6:41 
GeneralRe: Hierarchical domain object creation not SOLID Pin
DotNetJoe18-May-10 4:17
DotNetJoe18-May-10 4:17 
GeneralRe: Hierarchical domain object creation not SOLID Pin
TheyCallMeMrJames18-May-10 4:33
TheyCallMeMrJames18-May-10 4:33 
GeneralRe: Hierarchical domain object creation not SOLID Pin
DotNetJoe18-May-10 6:25
DotNetJoe18-May-10 6:25 
Questionto remote or not to remote Pin
esparagus15-May-10 1:04
esparagus15-May-10 1:04 
AnswerRe: to remote or not to remote Pin
Not Active15-May-10 2:59
mentorNot Active15-May-10 2:59 
AnswerRe: to remote or not to remote Pin
PIEBALDconsult15-May-10 4:31
mvePIEBALDconsult15-May-10 4:31 
QuestionSystem.Web.Services Not Found Pin
Winkles14-May-10 10:29
Winkles14-May-10 10:29 
AnswerRe: System.Web.Services Not Found Pin
Henry Minute15-May-10 3:34
Henry Minute15-May-10 3:34 
AnswerRe: System.Web.Services Not Found Pin
Abhinav S15-May-10 8:15
Abhinav S15-May-10 8:15 
GeneralRe: System.Web.Services Not Found Pin
Winkles15-May-10 12:06
Winkles15-May-10 12:06 
QuestionHow To Restrict Pin
mjawadkhatri13-May-10 19:29
mjawadkhatri13-May-10 19:29 
AnswerRe: How To Restrict Pin
Rajesh Anuhya13-May-10 19:46
professionalRajesh Anuhya13-May-10 19:46 
AnswerRe: How To Restrict Pin
The Man from U.N.C.L.E.14-May-10 3:29
The Man from U.N.C.L.E.14-May-10 3:29 
AnswerRe: How To Restrict Pin
DaveAuld14-May-10 3:48
professionalDaveAuld14-May-10 3:48 
QuestionUsage of generics in .net projects Pin
kalyan_vb12-May-10 18:34
kalyan_vb12-May-10 18:34 
AnswerRe: Usage of generics in .net projects Pin
Abhinav S12-May-10 20:04
Abhinav S12-May-10 20:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.