You are not logged in.
Pages: 1
if you saw this diagram in Wikipedia about the MVC
http://en.wikipedia.org/wiki/Model%E2%8 … controller
you would see a relation between the view and the model
for me i hadn't remembered any Zend Framework component has done this relation
can any one explain to me how this relation is done
and example will be nice
note :to exclude the dashed relation its out of the question scope
Offline
Hey Tawfek, ZF doesn't do MVC is this manner, with the implicit lines working through an observer. However, when you do something like
[code=php]
$this->view->user = User::findByName("jon");
[/code]
and then in your view:
[code=php]
<?php echo $this->user->name; ?>
[/code]
you're still decoupling the view from the model. MVC came out of smalltalk / lisp as a way of maintaining integrity across 3 layers. In a desktop (or AJAX) app, MVC closer resembles this because every action doesn't result in a postback. The postback makes the whole MVC thing a little different on the web.
here's a great essay on MVC and it's development:
http://www.ctrl-shift-b.com/2007/08/int … cture.html
I also found this, that I think answers your question (Microsoft's MVC implementation is a reflection of Zend / Rails' MVC implementation):
Offline
thanks Jon ,
the second article helped me alot
Offline
Pages: 1