Yii And Javascript Frameworks?

Hi,

Have you used any javascript framework (ember.js, angular.js,backbone.js, etc…) with Yii?

If yes, what was the reason to apply a js framework with Yii?

Are there real benefits to use them, if yes what are these?

Used backbone because of the app was too complex to handle it with just jQuery.

Why Backbone and not the others? Which one would you choose if you were just starting to use/know a js framework?

I use knockout heavily.

Also used angular and JSRender/JSViews.

I have had to start using js frameworks because of complex client-side logic.

voidcontext

Choice that time was quite random and it worked well. Not sure which one I’d choose today. There are many new frameworks out there.

I like Knockout for its views and Backbone for its models - and can’t make up my mind as for which to use - but today I stumbled upon Knockback which seems to bring these two together. :D

I think the general idea is to create rest application using Yii and then a separate client application using a js framework ?

FWIW, I’m reading this article right now: http://blog.stevensanderson.com/2012/08/01/rich-javascript-applications-the-seven-frameworks-throne-of-js-2012/

I can’t say how accurate it is, but it sure seems to discuss things in a structured and relevant way. Probably worth reading.

Thanks for everyone!

After reading some blog posts about this subject, I’ve decided to use KnockoutJS. I think that was a good choice, this framework/library has amazing features, the JS code can be clean and clear (unlike plain jQuery), and the documentation is good.

Now I’m thinking to implement Yii’s CGridView with Knockout as a Yii extension.

Hi voidcontext,

If you do create an extension can you update this thread so I’m notified. I’d love to try it.

Hi,

There were performance issues on large lists, and I didn’t have enough time for it, so I’ve dropped this idea… Sorry…

Nobody uses ExtJS here?

What do you mean ‘nobody uses it’ ?

There is an extension for it.

I am not using it, though, because of the license.

ExtJS is probably great if you are after a desktop like development environment for the web.

And have a load of money to throw after it.

If I wanted a fuller js api, then I’d probably go with Angular or Ember.

But, nowadays, I’d probably use Backbone - or rather: Chaplin.

Thorax is also a great option.

For me.

There’s just too many choices out there. :)

Hi every one.

         Before came to this topic i did some research about good js Framework where i selected AngularJs after check all the pros and cons. But now as you guys are talked lot about knockout JS.so again i did another research on comparing "Knockout js" and "AngularJs" I found AngularJs to use for yii.

AS I am new to yii and you guys are experienced in yii.I need your response

Thanks :)

Well, Angular is no doubt impressive. The only thing that worries me is that it’s not easy to understand how exactly all this magic works :)

That doesn’t mean you can’t successfully use it ;)

I just had a look at the presentation videos they have and it does look impressive. I’ve only used Backbone.js and used it for mobile development project. It provides good model and collection structure.

One more point angular is Google. With this in mind the knife has two edges. They are very good at making a technology a standard and very good at dumping technologies with no obvious reason for the users!

So what i got from your point of view is its better to avoid AngularJs?

:)

Very good thread, I was looking for some javascript MVC, MVVM, framework and the better options for me (not really using them by now) are Knockout and Backbone. In summary Knockout let you do clean and easy code using html attributes (html5 style) and separating javascript code from html with an orentation to ModelViewModel, and on the other hand backbone let you write code with more flexibility but less cleaner code, with more orentation to ModelViewController philosophy, you have to incorporate some 3rd plugin to bind data using html5 style coding.

Good thread here: http://stackoverflow.com/questions/5112899/knockout-js-vs-backbone-js[size=2] [/size]

[size=2]

[/size]

[size=2]Otherwise I would like to see some kind of integration with yii in an extension or module or even in core. :D[/size]