php - Zend RestController > Get data using model or controller? -
iam building zend rest controller, , iam unsure data from. need output database data xml format view.
do employ model controller data exchange,
or query database , data in controller itself, without need of model?
i see, of people employing latter scenario
in additional using full mvc approach, have read people using zend_rest_server, argument being don't need incur overhead of full mvc stack in order handle such request.
however, if choose go handling request via mvc, can use context-switch change view rendered.
however, in both cases, believe preferable have service/model access data. makes access code more re-usable in other situations.
Comments
Post a Comment