I need to combine
- a ajax-driven RIA frontend, using for example JQuery layout plugin (http://layout.jquery-dev.net/demos/complex.html) or ExtJs (http://www.extjs.com/deploy/dev/examples/layout/complex.html), with...
- a php mvc backend, using for example Zend MVC, CodeIgniter or Kohana
Where can I find info on how to set up the application structure/logic? What to pu开发者_Python百科t on the client/javascript side, and what on the server side? Maybe the traditional mvc framework paradigm with templates/views isn't the right thing here?
Links to examples, tutorials, blogs are very welcome!
quick response -- MVC can work great for ajax/RIA apps. Just remember that a "view" doesn't necessarily mean displaying something to the user or rendering in the browser. The view is the output of the program. In this case, your view would likely be JSON data that is received and interpreted by jQuery.
hope that helps! --Mark
I'm working on incorporating Backbone JS (javascript mvc framework) with Yii. My understanding is that the ajax-driven front-end would "talk" with a Yii controller. The Yii Controller would serve as a RESTfull API, handling all interactions with the server-side database, and returning just the information that the client-side needs for its views (eg. as a json-encoded array).
Having said that, I am still figuring out how well this is going to work for complex web applications. I found a helpful tutorial on integrating Yii and Backbone JS in this fashion.
I'm interested to hear how this works for you.
精彩评论