Click here to Skip to main content
15,904,346 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I understand the concepts of MVVM by background is in Java and uses the similar concept of MVC. Now it has always been drummed into me use MVC, if it is not in MVC then it isn't good coding.

My question is does this apply to MVVM? To be good code in C# does it need to adhere to the MVVM architecture?

Cheers for the replies
Posted

1 solution

No, not always.

It depends on the application very much, in particular, on its complexity, functional requirements to UI, need in inversion of control (http://en.wikipedia.org/wiki/Inversion_of_control[^]) and other factors.

In many cases you would prefer you own home-baked approach. Such cases can be either very simple cases, or on rare occasion, extremely complex ones, where you might use the ideas of the well-known architectural patterns or some combination and add something else. However, I would think in majority of cases one of the well-know architectural patterns (http://en.wikipedia.org/wiki/Architectural_pattern[^]) will be the best.

Anyway, it's good to have good understanding of the following architectural patterns:
MVVM — Model View View Model,
http://en.wikipedia.org/wiki/Model_View_ViewModel[^],

MVC — Model-View-Controller,
http://en.wikipedia.org/wiki/Model-view-controller[^]),

MVA — Model-View-Adapter,
http://en.wikipedia.org/wiki/Model–view–adapter[^],

MVP — Model-View-Presenter,
http://en.wikipedia.org/wiki/Model-view-presenter[^].
—SA
 
Share this answer
 
v2
Comments
thatraja 8-Jun-11 22:30pm    
Well said, 5!
Sergey Alexandrovich Kryukov 8-Jun-11 22:39pm    
Thank you, Raja.
--SA
RakeshMeena 8-Jun-11 23:00pm    
My 5!
Sergey Alexandrovich Kryukov 8-Jun-11 23:09pm    
Thank you, Rakesh.
--SA
DanHodgson88 9-Jun-11 3:45am    
cheers that's brilliant appreciate the reply :) 5+

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900