Server side MVC +Client side MVC

前端 未结 2 1981
暖寄归人
暖寄归人 2021-02-20 14:49

An application is both JS intensive and has a complex business logic +huge data flow that uses backboneJS to structure JavaScript code and there is a necessity for the server si

相关标签:
2条回答
  • 2021-02-20 15:30

    This article describes how to make an application architecture with both server side MVC and JS MVC , respecting the MVC pattern. http://blog.javascriptmvc.com/?p=68

    0 讨论(0)
  • 2021-02-20 15:42

    Backbone.js is primarily used for SPA's (Single Page Applications). Your backbone.js segments ('views') are rendered and re-rendered by data, that is fetched or changed. If your application is going to be javascript intensive, backbone is a great minimal framework that will help organize your application. However, backbone is not so simple when your javascript application becomes quite large. You have to have a thorough understanding of the fundamentals of javascript and have a programming decided pattern. Otherwise you application can become quite a mess even with the use of backbone.js.

    Anyhow I digress. Think of you client side application (backbone.js driven) completely separate from your server side application (MVC driven). All your client application needs from your server application is the data. That is why backbone.js is built around a REST API. If you are looking to develop a large javascript application, I would look at using MVC 4's Web API for your REST API, and backbone.js to help organize and standardize your client application.

    0 讨论(0)
提交回复
热议问题