aspose file tools*
The moose likes OO, Patterns, UML and Refactoring and the fly likes MVC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Reply locked New topic
Author

MVC

Jean Rodrigues
Greenhorn

Joined: Apr 30, 2003
Posts: 6
Hi, guys.
Well I've been in a discussion recently about MVC:
- I believe MVC architecture composes the presentation tier, correct?
- People are telling me MVC is composed of 3 tiers: Model - View - Controller. I think that's wrong. MVC is a whole architecture for the presentation layer.(Correct me if I'm wrong). I believe Model - View - Controller are just patterns that compose the whole architecture, not a layer itself.
- And therefore, MVC is just one tier.
What can you say about this?
Thanks in advance.


Jean Rodrigues<br />SCJP / SCWCD / SCBCD / SCEA I / SCJD (Finishing)
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61437
    
  67

Jean, please do not cross-post the same question to multiple forums. It just wastes peoples' time with redundant threads.
Please continue discussion here as there are already responses there.
thanks,
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Eric Fletcher
Ranch Hand

Joined: Oct 26, 2000
Posts: 188
Originally posted by Jean Rodrigues:
Well I've been in a discussion recently about MVC:
- I believe MVC architecture composes the presentation tier, correct?

Well, the View part of MVC composes the presentation layer
Originally posted by Jean Rodrigues:

- People are telling me MVC is composed of 3 tiers: Model - View - Controller.

They are correct, that is exactly what MVC is.
Originally posted by Jean Rodrigues:

I think that's wrong. MVC is a whole architecture for the presentation layer.(Correct me if I'm wrong). I believe Model - View - Controller are just patterns that compose the whole architecture, not a layer itself.
- And therefore, MVC is just one tier.

Well, you could be getting caught up in semantics here, you are correct that MVC is an architecture pattern that describes an entire app, but it is generally thought of in terms of the different layers. MVC stresses division of labor, with each layer of the architecture fulfilling a specific purpose.
Model layer - generally contains business logic and some interface to persistent data, like a database.
View layer - in it's ideal form, contains nothing but presentation logic. The data transmitted to the View layer is in a format such that the View merely renders it.
Controller layer - generally contains control logic for the app, it's like a liason between the Model and the View. Again, in it's purest form, it should only accept requests, retreive information from the model based on those requests, format the info in a way that is compatible with the view, and send the data to the appropriate part of the View layer.
HTH
E


My theory of evolution is that Darwin was adopted. - Steven Wright
Eric Fletcher
Ranch Hand

Joined: Oct 26, 2000
Posts: 188
Oops, sorry Bear, I guess I just missed your post while replying.
E
Jean Rodrigues
Greenhorn

Joined: Apr 30, 2003
Posts: 6
Sorry.
Well, please reply in other post.
Thanks.
 
Consider Paul's rocket mass heater.
 
subject: MVC