Should I use MVC both on client and server?

后端 未结 3 1828
孤独总比滥情好
孤独总比滥情好 2021-02-10 21:08

I\'ve decided to use MVC Pattern on my site. So, now I use Backbone.js framework on my site. All actions on my site are ajaxy, so server only gets data from db, and

3条回答
  •  悲哀的现实
    2021-02-10 21:39

    If you are using any of the major PHP frameworks (CakePHP, Code Igniter, Symfony, etc.) then you ARE using MVC already. If your server side logic is more complex than just a few really simple scripts than you probably should be using one of those frameworks listed, using MVC on the server and the client.

    Many (most?) larger web apps being built today are moving towards using an MVC framework for both client-side and server-side application code. It's a fantastic pattern for separating concerns for many large applications, especially request/response server apps and event-driven browser apps.

提交回复
热议问题