Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

Many good ones are mentioned here but I'd like to know which one stacks better with Symfony 2.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

I used jQuery and jQuery UI, but there is no special integration with Symfony. However, because jQuery is the mainstream library you'll have much more chance to have later integration coming with it.

That's what happened with Grails. It started with Prototype, but now it uses jQuery by default.

share|improve this answer
3  
jquery/jquery UI are not javascript MVC frameworks, just libraries. I am looking for an answer mentioning something like Backbone/AngularJS/Spine/Knockout...the list is infinite. –  mppfiles Sep 28 '12 at 16:10

Symfony is a server-side MVC framework and solves a lot of the same domain problems that Backbone.js, et al… are interested in. In this sense no Javascript based MVC framework really integrates better or worse with Symfony.

From the perspective of MVC it may be best to focus on either a server-side (PHP/Symfony) or client-side (Javascript/various) solution and use the other to augment/support that solution. Although you could certainly blend the two I'd think that if you're starting out your time is better spent leveraging one MVC framework instead of juggling two.

One nice thing about Symfony is that it can build Coffeescript. That's kind of neat, but that's just an aside. Another thing to consider is that Node.js allows you to write server-side and client-side code in Javascript, so keep an eye out for tighter integration there.

If you're going to use Symfony as your MVC solution you'll probably want to focus on a lightweight Javascript framework that is good at DOM manipulation and asynchronous calls, like jQuery or Prototype and let Symfony do the majority of the view rendering and data CRUD.

share|improve this answer
    
excellent answer. –  George Katsanos Feb 9 '13 at 10:14
    
You can limit JS Controllers & Views to handling in-page stuff without duplicating code in PHP Controllers & Views. JS Models would be proxies to their PHP counterparts et. voila, cleaner more structured code in your JS. –  Mihai Stancu Feb 4 at 15:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.