Click here to Skip to main content
15,890,897 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
AnswerRe: POP3 Components Pin
Jammer13-Feb-11 23:56
Jammer13-Feb-11 23:56 
GeneralRe: POP3 Components Pin
phil.o14-Feb-11 0:10
professionalphil.o14-Feb-11 0:10 
QuestionOO design: Copying data from class A to B Pin
Nilzor25-Jan-11 23:05
Nilzor25-Jan-11 23:05 
AnswerRe: OO design: Copying data from class A to B Pin
venomation26-Jan-11 1:03
venomation26-Jan-11 1:03 
GeneralRe: OO design: Copying data from class A to B Pin
Nilzor26-Jan-11 1:14
Nilzor26-Jan-11 1:14 
GeneralRe: OO design: Copying data from class A to B Pin
Keld Ølykke26-Feb-11 14:12
Keld Ølykke26-Feb-11 14:12 
GeneralRe: OO design: Copying data from class A to B Pin
Nilzor27-Feb-11 22:39
Nilzor27-Feb-11 22:39 
GeneralRe: OO design: Copying data from class A to B Pin
Keld Ølykke28-Feb-11 10:24
Keld Ølykke28-Feb-11 10:24 
Your most welcome.

Yes, I am all for the approach with a Model reference in the ViewModel.

Thx for the link. I like the discussion. The MVVM architecture is however not my best friend (though very popular these days).

I prefer MVC with the a twist, where the C stands for Command (think a simple Controller that performs a specific Algorithm).
The Command Pattern is classic, but I have not seen much recent discussion about it, but here is a link with a little discussion: http://c2.com/cgi/wiki?CommandObject[^]

Since a Command can be both a Controller and Algorithm, you have a single class with the full responsibility (and all the code) of getting a specific task done.
When you got a bug, you know where to look. You automatically re-use code, since you just run the existing commands or combine them into composite commands e.g. sequences or parallels. When you think about it, most tasks can be specified as a command or composite commands: request, sleep, set, create, delete, save, undo, shutdown, etc. Execution of commands is a topic on its own, just like execution of CPU/VM instructions, fibers, threads, jobs, etc.

In the MVC, I let M be the model, let the V be the View that listen on the model and let the C be the commands that changes the model. Both the model and view may issue commands. If you don't like the Observer pattern, the view can be modified by commands that are called from model commands.
Just like Rockfor Lhotka suggests in "ViewModel as Action Repository", I create MVC layers when its makes sense e.g. when in need of faster response and I create a MVC subsystem when it makes sense in terms of a "black box" e.g. an application, a view or a dialog.

I hope above triggered some thoughts.
AnswerRe: OO design: Copying data from class A to B Pin
Eddy Vluggen26-Jan-11 8:07
professionalEddy Vluggen26-Jan-11 8:07 
GeneralRe: OO design: Copying data from class A to B Pin
Nilzor26-Jan-11 21:02
Nilzor26-Jan-11 21:02 
AnswerRe: OO design: Copying data from class A to B Pin
Ian Shlasko26-Jan-11 10:03
Ian Shlasko26-Jan-11 10:03 
AnswerRe: OO design: Copying data from class A to B Pin
Pete O'Hanlon26-Jan-11 22:41
mvePete O'Hanlon26-Jan-11 22:41 
AnswerRe: OO design: Copying data from class A to B Pin
GParkings2-Sep-11 2:30
GParkings2-Sep-11 2:30 
GeneralRe: OO design: Copying data from class A to B Pin
Nilzor2-Sep-11 3:27
Nilzor2-Sep-11 3:27 
GeneralRe: OO design: Copying data from class A to B Pin
GParkings2-Sep-11 4:16
GParkings2-Sep-11 4:16 
QuestionDifference between Generalization, Abstraction, Encapsulation? Pin
variantseeker19-Jan-11 15:58
variantseeker19-Jan-11 15:58 
AnswerRe: Difference between Generalization, Abstraction, Encapsulation? Pin
Praveen Raghuvanshi19-Jan-11 22:23
professionalPraveen Raghuvanshi19-Jan-11 22:23 
GeneralRe: Difference between Generalization, Abstraction, Encapsulation? Pin
Pravin Patil, Mumbai26-Jan-11 3:39
Pravin Patil, Mumbai26-Jan-11 3:39 
GeneralRe: Difference between Generalization, Abstraction, Encapsulation? Pin
Praveen Raghuvanshi26-Jan-11 5:01
professionalPraveen Raghuvanshi26-Jan-11 5:01 
QuestionHow to package the Factory into separate component assembly? Pin
Chesnokov Yuriy17-Jan-11 20:26
professionalChesnokov Yuriy17-Jan-11 20:26 
AnswerRe: How to package the Factory into separate component assembly? Pin
dasblinkenlight18-Jan-11 4:21
dasblinkenlight18-Jan-11 4:21 
QuestionVoting Functionality -- Incoming Traffic Pin
Civic0614-Jan-11 4:58
Civic0614-Jan-11 4:58 
AnswerRe: Voting Functionality -- Incoming Traffic Pin
Ray Cassick14-Jan-11 5:49
Ray Cassick14-Jan-11 5:49 
GeneralRe: Voting Functionality -- Incoming Traffic Pin
Civic0619-Jan-11 23:30
Civic0619-Jan-11 23:30 
GeneralRe: Voting Functionality -- Incoming Traffic Pin
Ray Cassick20-Jan-11 8:45
Ray Cassick20-Jan-11 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.