Should I use MVC both on client and server?

后端 未结 3 1824
孤独总比滥情好
孤独总比滥情好 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:31

    Backbone.js connects your application over a RESTful JSON interface. I honestly find that it works wonderfully in conjunction with the MVC framework. If you build a RESTful API, you can let you server manage CRUD updates quite easily. All your server side code will be responsible is saving and sending back JSON objects to Backbone.js. Then let most of your logic and magic happen within the Backbone.js framework.

提交回复
热议问题