Yii and Knockout Together? [closed]

2019-07-06 22:17发布

问题:

I am trying to decide on a set of tools to use for a new web app I am going to build.

I want it to be really interactive and work using Ajax (i.e. no page refreshes etc). It will also have a UI for mobile devices like the iPhone

I want to implement it using PHP, MySQL and JavaScript, mainly because its what I know and I can easily host it somewhere

Does anyone have any views on what tools I should use?

At the moment I am thinking: - for PHP - Yii - for Javascript - Knockout.js and jQuery - for Mobile - jQuery for mobile

My only concern is using Yii and Knockout together, is it a bit overkill with two MVC frameworks?

Should I also be looking at HTML5 more?

回答1:

Knockout is client side, and it is MVVM - Model-View-View-Model. You could update Knockout models via AJAX json from Yii controller, and knockout will update user interface accordingly.