Click here to Skip to main content
15,918,808 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
QuestionQuestion on dependency of Business Layer with Data Access Layer Pin
meeram39527-Sep-09 21:54
meeram39527-Sep-09 21:54 
AnswerRe: Question on dependency of Business Layer with Data Access Layer Pin
Ian Shlasko28-Sep-09 3:21
Ian Shlasko28-Sep-09 3:21 
AnswerRe: Question on dependency of Business Layer with Data Access Layer Pin
Rozis29-Sep-09 4:46
Rozis29-Sep-09 4:46 
GeneralRe: Question on dependency of Business Layer with Data Access Layer Pin
machadogj13-Oct-09 7:39
machadogj13-Oct-09 7:39 
QuestionThe Duct Tape Programmer (aka the squatter) Pin
Thesisus25-Sep-09 5:39
Thesisus25-Sep-09 5:39 
AnswerRe: The Duct Tape Programmer (aka the squatter) Pin
Pete O'Hanlon25-Sep-09 9:38
mvePete O'Hanlon25-Sep-09 9:38 
AnswerRe: The Duct Tape Programmer (aka the squatter) Pin
Paul Conrad13-Oct-09 7:55
professionalPaul Conrad13-Oct-09 7:55 
QuestionDesign a system to Transform source Files to target file. Pin
lucky akky21-Sep-09 20:54
lucky akky21-Sep-09 20:54 
AnswerRe: Design a system to Transform source Files to target file. Pin
Mycroft Holmes27-Sep-09 22:37
professionalMycroft Holmes27-Sep-09 22:37 
AnswerRe: Design a system to Transform source Files to target file. Pin
puri keemti7-Dec-09 0:43
puri keemti7-Dec-09 0:43 
QuestionPageRank and its mathematics: Explanation needed Pin
kentipsy20-Sep-09 8:41
kentipsy20-Sep-09 8:41 
Answerignore -- repost Pin
Luc Pattyn20-Sep-09 9:11
sitebuilderLuc Pattyn20-Sep-09 9:11 
Questionhow to pass excel application object to automation object? Pin
SRKSHOME17-Sep-09 20:51
SRKSHOME17-Sep-09 20:51 
AnswerRe: how to pass excel application object to automation object? Pin
David Skelly17-Sep-09 22:48
David Skelly17-Sep-09 22:48 
QuestionDesign Pattern Pin
Chiman111-Sep-09 10:02
Chiman111-Sep-09 10:02 
AnswerRe: Design Pattern Pin
Eddy Vluggen13-Sep-09 2:22
professionalEddy Vluggen13-Sep-09 2:22 
GeneralRe: Design Pattern Pin
Chiman118-Sep-09 9:57
Chiman118-Sep-09 9:57 
Questionwhich is the best design or architecture for developing small windows apps using c#? Pin
jarajeshwaran9-Sep-09 8:01
jarajeshwaran9-Sep-09 8:01 
AnswerRe: which is the best design or architecture for developing small windows apps using c#? Pin
Richard MacCutchan13-Sep-09 1:51
mveRichard MacCutchan13-Sep-09 1:51 
AnswerRe: which is the best design or architecture for developing small windows apps using c#? [modified] Pin
Eddy Vluggen13-Sep-09 3:01
professionalEddy Vluggen13-Sep-09 3:01 
Questioncode required Pin
vishwjeet7-Sep-09 10:08
vishwjeet7-Sep-09 10:08 
AnswerRe: code required Pin
Luc Pattyn7-Sep-09 10:44
sitebuilderLuc Pattyn7-Sep-09 10:44 
AnswerRe: code required Pin
Pete O'Hanlon7-Sep-09 11:20
mvePete O'Hanlon7-Sep-09 11:20 
QuestionHow to structure your entities Pin
Mycroft Holmes6-Sep-09 16:27
professionalMycroft Holmes6-Sep-09 16:27 
Currently I have something like this. Each table in the database has a class, a select and update (includes insert) procedure and usually a bunch of GetFor##### procs (CustomerGetForRegion, CustomerGetForBranch etc).

Many table also have a view (vwCustomer) that gets all the related labels, where the customer table stores the CustomerTypeID the view gets both the CustomerTypeID and the CustomerType. So typically a view has 2-6 joins. The GetFor#### use the view.

My dilema comes when creating the classes in C#. I natirally have a Customer class with all the ID fields and possibly a couple of list<> of child objects (Addresses, Contacts etc) but what about the labels CustomerType etc.

My customer class has 2 methods, GetRecord and GetObject, fairly obvious that one gets the table and the other gets the view. Both then populate the Customer class (it has properties for the view columns that are not in the table).

I experimented with inheriting the ICustomerType but that got very ugly very quickly as all my classes have the data fields and the methods for CRUD and query in them. This left me with multiple methods and properties hiding each other.

I am now looking to split my classes into Customer and CustomerDB. One hold the data and services properties and List<> requirements and the other gets does all the DB IO.

The floor is now open for discussion, criticism and ideas.



AnswerRe: How to structure your entities Pin
David Skelly8-Sep-09 2:42
David Skelly8-Sep-09 2:42 

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.