Help Regarding Yii And Backbone.

Yii is awesome, and backbone too? i want to use both in my next project. but i never want to heavily dependent on javascript, can’t loose seo etc.?

So how i can make a app where i declare all url rules in one place, all same template, same models? and make its effect automatic in backbone?

so website can work without js (Not all functionality but almost every page)?

i search a lot for good php and backbone related libs and stuffs? but cat’t find much?

i just want to know what do use in this kind of apps and want know your experiences and suggestions and if any good stuffs related to this?

You can’t use Backbone with JavaScript turned off. Sorry. :)

I mean: Backbone is JavaScript…

And the best approach is to use Yii as a REST backend for the Backbone frontend.

Which leads to a possible solution to users turning off JavaScript: you simply need to code a separate, non-REST, non-JavaScript Yii application in a different sub-domain. If you need it.

There are already a lot of high profile sites which requires JavaScript. So you shouldn’t feel bad about require that your users turn it on.

If you need a good resource for Yii and Backbone together, read this:

http://www.yiiframework.com/wiki/390/yiibackboneboilerplate-project-setup-for-your-yii-backbonejs-applications/

Thanks jacmoe, i want at least solution for auto genrating backbone models from yii, i will do it myself, if there is nothing stuffs like, i really don’t like to reinvent wheels

sorry to jump on your thread and it may be useful for me to start a new one but…

Why?

What is the reason to use a frontend JS framework instead of views rendered by the server, either in whole or in part(ajax)? I understand at a high level how the architecture works, just looking for a use case.

Go to Codeschool.com and try their free Backbone course, and become convinced that Backbone rocks if you want to create highly interactive applications in the browser. -> Codeshool - Anatomy of Backbone

If you want to do the same thing - JavaScript applications - without Backbone, and using Yii for the back-end, you will quickly end up with a total mess! And it might not even be totally JS driven.

Try it. :)

Once we get around the SEO implications of a JavaScript rendered page (touched on here), Javascript will become the king of web development. imho :)