afc_champs_2007_colts
New Member
I am using MVC in PHP based Zend Framework. This is more of a design question. I have a controller that has a couple of actions. These actions are accessed via AJAX from the controller's view. The controller's actions, perform Business logic by accessing data from functions inside a model, and construct or echo HTML. This HTML is spit back to view in the AJAX response. My understanding of controllers is they are not supposed to contain any HTML at all. But given the AJAX in the views, I feel I don't have a choice except to generate HTML on the fly in the controller. Is this a good design? How can I improve it?