Click here to Skip to main content
15,888,802 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
AnswerRe: Multiple methods vs Single method with enum Pin
Keld Ølykke4-Mar-14 19:13
Keld Ølykke4-Mar-14 19:13 
GeneralRe: Multiple methods vs Single method with enum Pin
Harley L. Pebley6-Mar-14 9:27
Harley L. Pebley6-Mar-14 9:27 
QuestionCMS Structure for Project Collaboration. Pin
Brady Kelly14-Feb-14 22:23
Brady Kelly14-Feb-14 22:23 
AnswerRe: CMS Structure for Project Collaboration. Pin
Ahmed Bensaid26-Feb-14 23:45
professionalAhmed Bensaid26-Feb-14 23:45 
GeneralRe: CMS Structure for Project Collaboration. Pin
Brady Kelly27-Feb-14 2:29
Brady Kelly27-Feb-14 2:29 
QuestionSuggestions or comments needed: Abstracting Data Access Layer Pin
Charles Merighi13-Feb-14 6:02
Charles Merighi13-Feb-14 6:02 
QuestionRe: Suggestions or comments needed: Abstracting Data Access Layer Pin
José Amílcar Casimiro13-Feb-14 6:59
José Amílcar Casimiro13-Feb-14 6:59 
AnswerRe: Suggestions or comments needed: Abstracting Data Access Layer Pin
jschell13-Feb-14 8:56
jschell13-Feb-14 8:56 
Just to counter the other inference in the other response there are good reasons for having a data layer.

It helps to start with a data model. A data model represents data in the application and although it will often be one to one with database tables/objects that isn't always the case.

Once you have that then your data base layer is created to expose that data model.

This is common enough that there are already generic frameworks for it. NHibernate is one and there are others.

In my experience it is a bad idea to use inheritance as you have suggested. Data models seldom represent inheritance and implementing it like that even when it seems like such models are there is often a problem. This of course is compounded by a poor design where inheritance is used rather than a better choice of attributes and/or composition.

You data layer should not expose anything about the database itself. Often it will be better to have helper classes that do the real work and your exposed classes use those to do the real work.
AnswerRe: Suggestions or comments needed: Abstracting Data Access Layer Pin
Eddy Vluggen13-Feb-14 9:27
professionalEddy Vluggen13-Feb-14 9:27 
GeneralRe: Suggestions or comments needed: Abstracting Data Access Layer Pin
Charles Merighi13-Feb-14 10:45
Charles Merighi13-Feb-14 10:45 
GeneralRe: Suggestions or comments needed: Abstracting Data Access Layer Pin
jschell14-Feb-14 10:00
jschell14-Feb-14 10:00 
GeneralRe: Suggestions or comments needed: Abstracting Data Access Layer Pin
Eddy Vluggen14-Feb-14 22:53
professionalEddy Vluggen14-Feb-14 22:53 
AnswerRe: Suggestions or comments needed: Abstracting Data Access Layer Pin
V.16-Feb-14 22:51
professionalV.16-Feb-14 22:51 
AnswerRe: Suggestions or comments needed: Abstracting Data Access Layer Pin
John D. Sanders28-Feb-14 6:58
John D. Sanders28-Feb-14 6:58 
Questionlooking for design pattern which does continous monitoring Pin
manishakc10-Feb-14 18:55
manishakc10-Feb-14 18:55 
AnswerRe: looking for design pattern which does continous monitoring Pin
Richard MacCutchan10-Feb-14 21:08
mveRichard MacCutchan10-Feb-14 21:08 
GeneralRe: looking for design pattern which does continous monitoring Pin
manishakc10-Feb-14 21:14
manishakc10-Feb-14 21:14 
GeneralRe: looking for design pattern which does continous monitoring Pin
Richard MacCutchan10-Feb-14 21:22
mveRichard MacCutchan10-Feb-14 21:22 
GeneralRe: looking for design pattern which does continous monitoring Pin
manishakc10-Feb-14 21:52
manishakc10-Feb-14 21:52 
GeneralRe: looking for design pattern which does continous monitoring Pin
Richard MacCutchan10-Feb-14 23:47
mveRichard MacCutchan10-Feb-14 23:47 
AnswerRe: looking for design pattern which does continous monitoring Pin
Shameel11-Feb-14 1:56
professionalShameel11-Feb-14 1:56 
GeneralRe: looking for design pattern which does continous monitoring Pin
manishakc16-Feb-14 21:16
manishakc16-Feb-14 21:16 
Questionlooking for appropriate design pattern which will help in decision making Pin
manishakc6-Feb-14 23:00
manishakc6-Feb-14 23:00 
AnswerRe: looking for appropriate design pattern which will help in decision making Pin
Richard MacCutchan7-Feb-14 0:04
mveRichard MacCutchan7-Feb-14 0:04 
AnswerRe: looking for appropriate design pattern which will help in decision making Pin
jschell7-Feb-14 8:18
jschell7-Feb-14 8: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.