服务器端MVC +客户端的MVC [英] Server side MVC +Client side MVC

查看:142
本文介绍了服务器端MVC +客户端的MVC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前荫开发一个应用程序,它是既JS密集和有复杂的业务逻辑+庞大的数据流。我选择backboneJS构造Java脚本code和没有为服务器侧MVC还(在这种情况下,弹簧)的必需品。

Currently Iam developing an application which is both JS intensive and has a complex business logic +huge data flow. I opted for backboneJS to structure java script code and there is a necessity for the server side mvc also(spring in this case).


  1. 时,它与客户端的MVC(骨干)一起实现服务器端MVC(春季)一个好主意,它们之间有任何兼容性问题?

  1. Is it a good idea to implement server side MVC (spring ) along with client side MVC (backbone) and are there any compatibility issues between them?

在这两种情况下可以implemented.How我该怎么协调与骨干视图的春天景色

In case both can be implemented.How am i going to coordinate the spring views with the backbone view

3.How将客户端与MVC模板引擎使用Spring的查看合作。

3.How will client side MVC with template engine collaborate with 'View' of Spring.

尽管这个问题已经被问过,我无法找到这个合适的答案。有人可以帮我一个详细的解答..先谢谢了。

Though this question has been asked before, i could not find suitable answer for this . Can somebody help me with a detailed answer .. Thanks in advance.

推荐答案

Backbone.js的,主要是用来SPA的(单页应用程序)。您Backbone.js的段('意见')被渲染和重新渲染通过数据,即获取或更改。如果您的应用程序将是JavaScript的精耕细作,骨干是一个伟大的最小的框架,帮助组织应用程序。然而,当你的JavaScript应用变得相当的大型骨干并非如此简单。你必须有JavaScript的基本面的透彻了解,并有一种编程模式决定。否则,你的应用程序可以变得相当混乱,即使使用Backbone.js的的。

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.

无论如何,我离题。想你的客户端应用程序(驱动Backbone.js的)完全独立于你的服务器端应用程序(MVC驱动)。从您的服务器应用程序的所有客户端应用程序的需求是数据。这就是为什么Backbone.js的是围绕一个REST API构建的。如果您正在寻找开发大型JavaScript应用,我想看看使用MVC 4的Web API为您的REST API和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.

希望这有助于。

泰隆

这篇关于服务器端MVC +客户端的MVC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆