开发者

Which javascript MVC framework stacks better with Symfony 2?

Many good ones are mentioned here but I'd li开发者_开发问答ke to know which one stacks better with Symfony 2.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜