1

I need help setting and argument between me and me team members We are arguing about the function and purpose of each component of the Yii Framworks specially the "model" and "controller",and where to handle database access and query execution in the model or the controller?.

As i know from the basic mvc framework the model is the database access layer and the controller is the bridge between the model and the view, but in Yii Framework the controllers is where the data is accessed and the query are executed.

So which is the best way to deal with such issue? and way?, also what are the pros ans cons of each approach?.

thanx in advance for you all.

tereško
  • 58,060
  • 25
  • 98
  • 150
Ahmed0h
  • 193
  • 2
  • 7
  • I see you statement no true, can you show an example, where Yii controllers are different from the standard MVC – Royal Bg May 02 '14 at 12:17
  • A distinction needs to be made between the `CModel` and its descendant classes in Yii Framework and the *Model* concept in MVC. Read through [this answer](http://stackoverflow.com/a/5864000/1233508). – DCoder May 02 '14 at 12:20

1 Answers1

0

I think we can say the model is the business logic. We use the view to show (calculated) data.

You need a controller to work with data, transform them.

Yii controllers are not different...