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