Question

We want to create a single page application with php as backend language. Which javascript framework would be a suitable one to develop this?

Was it helpful?

Solution

This question is too subjective and probably going to get flagged. Based on my recent experience trying to convert a yii app to angular frontend, this is my two cents..

Yii is great framework but as soon as you start adding intermediate to advanced Javascript and ajax functionality things start breaking down in unexpected ways, especially with IE and other older browsers, it becomes more even complicated if you are using lot of Yii extensions for popular jquery/js plugins. This is perhaps because Yii's internal JS functions are not really configurable especially with widgets both Yii's and third party.

A single page app using AngularJS/Yii does not really require Yii. If you are using angularJS then almost all data is passed via JSON. Essentially Yii becomes an API engine. Yii is bit heavy for an API only scenario. There are much simpler frameworks which are built specifically for APIs .

Having said that you should perhaps consider using this combination if you are comfortable with Yii do not really want to learn a new backend framework, or have an existing project in Yii which you want to convert to AngularJS.

There is project template for using along with BackboneJS for single page applications you can check it out here https://github.com/clevertech/YiiBackboneBoilerplate

It will give you some idea on how to integrate a Javascript framework with Yii

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top