I\'m going to start a project using a Zend Framework MVC implementation.
How do I work with ajax? I mean, should I place all ajax code into controller? Or into view?
When i use ajax with codeigniter i output straight out of the controller.
I also use seperate controller for simple ajax requests like flagging, favorites, etc. For ajax requests like login, contact, etc i would add logic to the normal path(eg. domain.com/contact) do deal with an ajax request. I then output json and kill script execution.