Click here to Skip to main content
15,890,186 members
Please Sign up or sign in to vote.
2.33/5 (5 votes)
See more:
Hi Experts
Can you explain me what is difference between 3-tiers and MVVM architecture?
which one when and where use and why.

thank u
dinesh sharma
Posted
Comments
Sergey Alexandrovich Kryukov 20-Oct-11 0:40am    
Can you explain me the difference between apple and Apple? Same thing.
--SA

Where this false believe that everything can compare comes from? Makes no sense, really.

Just learn about both:

http://en.wikipedia.org/wiki/3-tier_architecture[^],
http://en.wikipedia.org/wiki/MVVM[^].

—SA
 
Share this answer
 
 
Share this answer
 
3-Tier Architecture
----------------------------
In 3- tier architecture, the UI layer, the Business Logic layer and the DataBase layer is there.
In UI layer, the UI is mixed up with Presentation code and Application logic, this violates SRP(Single Responsibility Principle) rules.

SRP: In object-oriented programming, the single responsibility principle states that every object should have a single responsibility, and that responsibility should be entirely encapsulated by the class. All its services should be narrowly aligned with that responsibility.


MVVM architecture:
--------------------
Model- View- ViewModel pattern

In MVVM the UI Layer is separated into two layers. the ViewModel, which is in charge of the Application Logic, and the View, which is in charge solely on presentations.
This allows you three very important things:
1.Better Code Maintainability.

2.Easier to work with VS designer.(this is arguably the strongest feature of MVVM. It really boosts up productivity)

3.Allows for testing of the ViewModel with automated tests, whereas up until now we had to test the UI itself, and doing automated tests on UI is complex. This is called Testability

WPPF follows this patterns because of these reasons.
 
Share this answer
 
MVVM is A 3-Tier architecture.
Other 3 tier architectures are the MVP and MVC
 
Share this answer
 

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