Click here to Skip to main content
15,891,316 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: Inherit without exposing? Pin
francoisdotnet4-May-07 5:22
francoisdotnet4-May-07 5:22 
GeneralRe: Inherit without exposing? Pin
CPallini4-May-07 5:33
mveCPallini4-May-07 5:33 
AnswerRe: Inherit without exposing? Pin
led mike4-May-07 17:08
led mike4-May-07 17:08 
GeneralRe: Inherit without exposing? Pin
Stephen Hewitt6-May-07 16:00
Stephen Hewitt6-May-07 16:00 
GeneralRe: Inherit without exposing? Pin
led mike6-May-07 16:30
led mike6-May-07 16:30 
GeneralRe: Inherit without exposing? Pin
Stephen Hewitt6-May-07 16:40
Stephen Hewitt6-May-07 16:40 
GeneralRe: Inherit without exposing? Pin
led mike6-May-07 17:01
led mike6-May-07 17:01 
Questiondecoupling business and database? Pin
giddy_guitarist28-Apr-07 12:11
giddy_guitarist28-Apr-07 12:11 
hi ,
I'm a pretty simple self taught developer. I did do some reading on business objects , 3-tiered apps etc and i just got myself a book on OOAD.

But i'm still not very clear about decoupling the data layer and the business layer.

In my DB i have 2 tables -Rooms and Persons:
Rooms:
RoomID
Cost
PersonID

Persons:
PersonID
Name
LastName
Age...
...

So , my business objects[Room , Person] are pretty much a class with properties corresponding the columns in the table.

I need to have a cache of all Persons and all Rooms , so dont keep accessing the DB all the time.

Should my data layer do this: (Should the DataLayer know the existence of the business class??
List<person> GetPersons()
{
//open a connection...(sql servr 05)
//get data
//iterate through all the persons ..
lstTemp.Add(new Person**(strName , strLastName , iAge...));
//end iterate
return lstTemp;
}

Also , i did say the classes are just like the columns. Persons.PersonID & Rooms.PersonID have a relatioship in the DB

the Person class has:
+int PersonID
+string name
...

And Room :
+int RoomID
+int cost
...
(They hold IDs just like the DB)

After my app loads , i have a seperate List<> of Persons and Rooms , and if i need to know what Person is in a particular room , like DB access , i have to Traverse the Persons list in memory to find the right Room.PersonID

This is not correct right? Is there some article book or anything that would educate me on how to do this right!???

Thanks so much

Gideon
AnswerRe: decoupling business and database? Pin
Eugene Ciloci28-Apr-07 16:36
Eugene Ciloci28-Apr-07 16:36 
GeneralRe: decoupling business and database? Pin
giddy_guitarist29-Apr-07 13:01
giddy_guitarist29-Apr-07 13:01 
AnswerRe: decoupling business and database? Pin
Chris-Kaiser3-May-07 13:39
Chris-Kaiser3-May-07 13:39 
QuestionStructured error handling practises in asp.net Pin
shaunll27-Apr-07 4:36
shaunll27-Apr-07 4:36 
AnswerRe: Structured error handling practises in asp.net Pin
Eugene Ciloci28-Apr-07 17:03
Eugene Ciloci28-Apr-07 17:03 
GeneralRe: Structured error handling practises in asp.net Pin
shaunll30-Apr-07 22:30
shaunll30-Apr-07 22:30 
Questioninterface desginer software Pin
Giorgi Dalakishvili26-Apr-07 21:43
mentorGiorgi Dalakishvili26-Apr-07 21:43 
AnswerRe: interface desginer software Pin
Colin Angus Mackay26-Apr-07 22:30
Colin Angus Mackay26-Apr-07 22:30 
GeneralRe: interface desginer software Pin
Giorgi Dalakishvili26-Apr-07 22:34
mentorGiorgi Dalakishvili26-Apr-07 22:34 
GeneralRe: interface desginer software Pin
Pete O'Hanlon26-Apr-07 22:42
mvePete O'Hanlon26-Apr-07 22:42 
GeneralRe: interface desginer software Pin
Giorgi Dalakishvili26-Apr-07 22:50
mentorGiorgi Dalakishvili26-Apr-07 22:50 
GeneralRe: interface desginer software Pin
Pete O'Hanlon26-Apr-07 22:58
mvePete O'Hanlon26-Apr-07 22:58 
GeneralRe: interface desginer software Pin
Giorgi Dalakishvili26-Apr-07 23:02
mentorGiorgi Dalakishvili26-Apr-07 23:02 
GeneralRe: interface desginer software Pin
Pete O'Hanlon26-Apr-07 23:04
mvePete O'Hanlon26-Apr-07 23:04 
GeneralRe: interface desginer software Pin
Dan Neely27-Apr-07 2:12
Dan Neely27-Apr-07 2:12 
GeneralRe: interface desginer software Pin
Pete O'Hanlon30-Apr-07 9:03
mvePete O'Hanlon30-Apr-07 9:03 
GeneralRe: interface desginer software Pin
Colin Angus Mackay26-Apr-07 23:18
Colin Angus Mackay26-Apr-07 23:18 

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.