What's your opinion on where models are executed: controllers or views? |
[eluser]n0xie[/eluser]
[quote author="Clever Mind" date="1270025169"]hello guys... Definetely, Data should pass to view through the controller and also model will be called by controller for any database releted works . Its a theory of MVC architecture. Thanks[/quote] [nitpicking mode] Actually MVC states that the View 'talks' to the Model. The implementation of CI is not 'true' MVC since the Model has no interaction (or at least it's highly discouraged) with the View part. In proper MVC the flow of an application is as follows: Quote: This doesn't mean that CI (or any of the PHP-MVC frameworks for that matter) got it wrong, but originally the MVC pattern was used in 'desktop'-applications. The port towards web-application is a recent one and the translation is not flawless. What most PHP-MVC frameworks actually use is PAC. [/nitpicking mode] |
Welcome Guest, Not a member yet? Register Sign In |