Click here to Skip to main content
15,895,483 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
AnswerRe: Forms vs Dialogs - A Question of Architecture Pin
dealon2-Apr-09 20:50
dealon2-Apr-09 20:50 
QuestionClass methods Pin
CrimeanTurtle200831-Mar-09 14:01
CrimeanTurtle200831-Mar-09 14:01 
AnswerRe: Class methods Pin
led mike2-Apr-09 8:22
led mike2-Apr-09 8:22 
QuestionOOP Programming, Two approachs for a problem Pin
Quake2Player22-Mar-09 16:52
Quake2Player22-Mar-09 16:52 
AnswerRe: OOP Programming, Two approachs for a problem Pin
PIEBALDconsult22-Mar-09 17:45
mvePIEBALDconsult22-Mar-09 17:45 
AnswerRe: OOP Programming, Two approachs for a problem Pin
Jonathan Davies23-Mar-09 3:13
Jonathan Davies23-Mar-09 3:13 
GeneralRe: OOP Programming, Two approachs for a problem Pin
Quake2Player23-Mar-09 6:53
Quake2Player23-Mar-09 6:53 
GeneralRe: OOP Programming, Two approachs for a problem Pin
Jonathan Davies23-Mar-09 8:25
Jonathan Davies23-Mar-09 8:25 
Hi,
That future operations will be easier because of treating with an object person than a string..

Leaving aside whether these future operation will be easier this way or not for a second, it's homework - you've only got a limited amount of time to design and code a limited amount of features. So you really need to decide what those features are before coding i.e What are you going to do. Only after that, decide how to do it. Just like any Project - homework or otherwise.

For example searching, or showing the person info (lets say a picture, or the fullname, or whatever) when reading the message...
Searching for what? You have do decide befor starting the coding.
Are you going to want to display a picture for every email you read? You won't have one for most of the spam you get!
Do you have to display the fullname of every email you read? Again a lot is junk so you won't be able to for everyone
'Or whatever': The 'whatever' bits derail lots of projects because nobody has decided what features are being aimed at, they've just sat down and started coding.

A message can contain multiple emails in the to, bcc, and cc field

Decide exactly what a message is. Is it an email (rather than multiple emails) with multiple addresses rather than multiple emails?

Of course I can do that too if those fields are strings but I think i would have more hardcoding instead...

to be honest I'd say its hard to tell how much coding will be needed either way at this stage. Though I see what your point is.

Am i right? also conceptually I would have object connections between a person and a contact, which wouldnt be that explicit if those fields where strings
One of the biggest slip-ups I see, and which I made, when starting OOP is to have all the objects dependant upon (know about) one another. Object A knows about object B which knows about C, D, E etc and when you want to make a little change to one it affects them all and gets complicated.

Get used to thinking what the User wants. If the User wants stuff like being able to hover their mouse over an address in an email and have details pop up, it may be that being able to link that address to the Person object will be handy.

I'd think of another object or just code that combines other objects - The-email-editor as well. This could do the hard work of linking addresses to Persons, and could keep the Message and Person objects separate.

Sorry if I'm not saying Yes/No you should use the Person class, but its your homework after all and I'm just trying to make you think of some of the reasons why you would decide Yes or No. One definite thing is, that by being able to code Person without knowing about the design/code of Message and vice-vera you have an advantage.
GeneralRe: OOP Programming, Two approachs for a problem Pin
Quake2Player23-Mar-09 8:42
Quake2Player23-Mar-09 8:42 
GeneralRe: OOP Programming, Two approachs for a problem Pin
led mike23-Mar-09 8:31
led mike23-Mar-09 8:31 
AnswerRe: OOP Programming, Two approachs for a problem Pin
Quake2Player24-Mar-09 7:31
Quake2Player24-Mar-09 7:31 
GeneralRe: OOP Programming, Two approachs for a problem Pin
Jonathan Davies24-Mar-09 8:51
Jonathan Davies24-Mar-09 8:51 
Questioncomposite pattern serializing Pin
Jarno Burger20-Mar-09 13:18
Jarno Burger20-Mar-09 13:18 
AnswerRe: composite pattern serializing Pin
Jonathan Davies22-Mar-09 5:14
Jonathan Davies22-Mar-09 5:14 
QuestionObject Oriented Design - object graphs and lookup table data Pin
Leftyfarrell13-Mar-09 2:09
Leftyfarrell13-Mar-09 2:09 
AnswerRe: Object Oriented Design - object graphs and lookup table data Pin
led mike13-Mar-09 5:03
led mike13-Mar-09 5:03 
GeneralRe: Object Oriented Design - object graphs and lookup table data Pin
Leftyfarrell14-Mar-09 3:58
Leftyfarrell14-Mar-09 3:58 
QuestionEmpty abstract method override -- good or bad design? Pin
brontofuzik12-Mar-09 10:46
brontofuzik12-Mar-09 10:46 
AnswerRe: Empty abstract method override -- good or bad design? Pin
Luc Pattyn12-Mar-09 10:57
sitebuilderLuc Pattyn12-Mar-09 10:57 
AnswerRe: Empty abstract method override -- good or bad design? Pin
Mark Churchill12-Mar-09 14:39
Mark Churchill12-Mar-09 14:39 
GeneralRe: Empty abstract method override -- good or bad design? Pin
Luc Pattyn12-Mar-09 15:05
sitebuilderLuc Pattyn12-Mar-09 15:05 
GeneralRe: Empty abstract method override -- good or bad design? Pin
Mark Churchill12-Mar-09 15:14
Mark Churchill12-Mar-09 15:14 
QuestionTechnical Design vs. Implementation vs. Testing Pin
shakhtyor12-Mar-09 10:45
shakhtyor12-Mar-09 10:45 
AnswerRe: Technical Design vs. Implementation vs. Testing Pin
Perry Holman22-Apr-09 0:16
Perry Holman22-Apr-09 0:16 
AnswerRe: Technical Design vs. Implementation vs. Testing Pin
Robin_Roy23-Jul-09 16:38
Robin_Roy23-Jul-09 16:38 

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.