Is MVC just a three-tier model?

Just started exploring mvc, and I'm not sure I understand it. From what I'm compiling, it looks like implementing a three-tier solution, i.e. The model corresponds to the DAL level, Controller to business logic and presentation as Presentation.

Am I from here from here?

+5
source share
4 answers

I do not recommend considering the model as just a level of data access. This simplifies, and it leads to the fact that you add too much code to the controller layer. It’s better if you put more code in the model and make database persistence just part of the model’s internal code. I like to think about MVC as follows:

  • : , ,
  • :
  • : , , , DAL

.

: , - , , . ? , . , , .

, Model, View Controller , , . , , , , , . .

antipattern Domain Driven , .

. 2008 , , Active Record. .

+8

. :

alt text

:

Database -> DAL -> BLL -> Controller -> View Model -> UI

DAL == Data Access Layer (aka ORM, Object-Relational mapper)
BLL == Business Logic Layer

, . , BLL View Model , .

NerdDinner. .

+3
+1

, , , ( ) -, - .

( ), , , / .

0

All Articles