Click here to Skip to main content
15,886,815 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: MVC Pattern question Pin
Quake2Player7-Jul-09 17:37
Quake2Player7-Jul-09 17:37 
QuestionClient Server Protocol Definition - Best Practices Pin
Member 404718314-Jun-09 17:16
Member 404718314-Jun-09 17:16 
AnswerRe: Client Server Protocol Definition - Best Practices Pin
Jimmanuel15-Jun-09 0:40
Jimmanuel15-Jun-09 0:40 
AnswerRe: Client Server Protocol Definition - Best Practices Pin
led mike15-Jun-09 4:28
led mike15-Jun-09 4:28 
QuestionI have a couple of design issues Pin
Mycroft Holmes13-Jun-09 15:54
professionalMycroft Holmes13-Jun-09 15:54 
AnswerRe: I have a couple of design issues Pin
CodingYoshi11-Jul-09 9:24
CodingYoshi11-Jul-09 9:24 
GeneralRe: I have a couple of design issues Pin
Mycroft Holmes11-Jul-09 14:56
professionalMycroft Holmes11-Jul-09 14:56 
GeneralRe: I have a couple of design issues Pin
CodingYoshi13-Jul-09 3:35
CodingYoshi13-Jul-09 3:35 
I don't like the idea of asking the Staff object to return a list of Staff objects. A staff should have methods and properties for a Staff but not a list of Staff. I would take one of the collection classes (if using .NET or something similar if using else) and extend it like below:

public class StaffCollection : List<Staff>
{

private Department _department;
// Inject the object with the department at construction
// Now this staff collection realizes its department
public StaffCollection(Department dept)
{
this._department = dept;
}

public void Load()
{
// Load this from the database. I will create a DAL and pass a reference of this to it so it can load it for me.
}

// You can put many other methods--based on your requirements--here. For example, find all employees who earn more than 100K   and it will return a bunch of employees who wear pink shirts and have spiked up hair
}

Here is the department class

public class department
{
// put everything for department here: email, name etc.

private StaffCollection _staffs;

public Department()
{
this._staff = new StaffCollection(this);
}
public void LoadStaff()
{
// You can check first if already loaded or just reload everytime
this._staff.Load();
}
}

You will still need a Staff class and might need a DepartmentCollection class.

CodingYoshi

Visual Basic is for basic people, C# is for sharp people. Farid Tarin '07

GeneralRe: I have a couple of design issues Pin
Mycroft Holmes13-Jul-09 14:37
professionalMycroft Holmes13-Jul-09 14:37 
QuestionGod object problem Pin
Quake2Player9-Jun-09 13:50
Quake2Player9-Jun-09 13:50 
AnswerRe: God object problem Pin
Mycroft Holmes9-Jun-09 14:50
professionalMycroft Holmes9-Jun-09 14:50 
GeneralRe: God object problem Pin
Quake2Player9-Jun-09 14:58
Quake2Player9-Jun-09 14:58 
GeneralRe: God object problem Pin
Mycroft Holmes9-Jun-09 15:53
professionalMycroft Holmes9-Jun-09 15:53 
AnswerRe: God object problem Pin
CodingYoshi13-Jul-09 3:40
CodingYoshi13-Jul-09 3:40 
QuestionRS232 protocol Pin
AlecJames4-Jun-09 23:04
AlecJames4-Jun-09 23:04 
AnswerRe: RS232 protocol Pin
led mike5-Jun-09 4:21
led mike5-Jun-09 4:21 
AnswerRe: RS232 protocol Pin
Luc Pattyn9-Jun-09 5:38
sitebuilderLuc Pattyn9-Jun-09 5:38 
QuestionBest scenario Pin
mr.me30-May-09 20:15
mr.me30-May-09 20:15 
AnswerRe: Best scenario Pin
Eddy Vluggen8-Jul-09 0:27
professionalEddy Vluggen8-Jul-09 0:27 
GeneralData Entry with Linked Combos Pin
Brady Kelly30-May-09 7:15
Brady Kelly30-May-09 7:15 
GeneralRe: Data Entry with Linked Combos Pin
Jimmanuel1-Jun-09 4:53
Jimmanuel1-Jun-09 4:53 
QuestionA tagging system (like html), support on the model please Pin
Quake2Player29-May-09 16:52
Quake2Player29-May-09 16:52 
AnswerRe: A tagging system (like html), support on the model please Pin
Quake2Player29-May-09 16:58
Quake2Player29-May-09 16:58 
QuestionParameters Pin
CodingYoshi29-May-09 7:11
CodingYoshi29-May-09 7:11 
AnswerRe: Parameters Pin
Luc Pattyn29-May-09 8:45
sitebuilderLuc Pattyn29-May-09 8:45 

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.