5

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

0

2 Answers 2

12

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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.
1

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.

1 Comment

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.