单页应用程序(SPA) [英] Single Page Application (SPA)

查看:85
本文介绍了单页应用程序(SPA)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我是SPA的新手,我想知道对于我的新项目,我是否应该这样做.造成混淆的原因是,当我浏览并发现由于某些兼容性问题而在MVC 4 RC SPA模板中将其删除时,尽管它存在于BETA版本中,但另一方面,我还发现SPA的最佳示例是GMAIL .
因此,从这两点来看,我感到困惑.请分享一些有关SPA阐述其优点和缺点的链接或文章.还请分享我如何将其与MVC 4 RC一起使用.


谢谢.

Hi,
I am new to SPA and I want to know that whether for my new project should I go for this or not. The confusion is because when I Goggled about it and found that in the MVC 4 RC SPA template is removed because of some compatibilities issues although it was present in the BETA version but on the other hand I also found that the best example of SPA is GMAIL.
So looking on both the points I got confused. Please share some links or articles about SPA elaborating its Pros & Cons. Also please share that how can I use it with MVC 4 RC.


Thanks.

推荐答案

首先要求您,即您在应用程序中到底想要什么.因为Web和MVC应用程序都具有其优点和优点.缺点,因此取决于您的要求和知识,您会选择什么.

对于MVC的大量访问:
http://www. asp.net/mvc/tutorials/mvc-4/getting-started-with-aspnet-mvc4/intro-to-aspnet-mvc-4 [ http://www.asp.net/mvc/tutorials/mvc-4 [ ^ ]


谢谢,
Ambesha
Firstly make you requirment, that what exactly you want in your application. because both Web and MVC application has their Pros & Cons, so it is upto your requirement and knowledge that what will you chose.

for MVC plese visit:
http://www.asp.net/mvc/tutorials/mvc-4/getting-started-with-aspnet-mvc4/intro-to-aspnet-mvc-4[^]
http://www.asp.net/mvc/tutorials/mvc-4[^]


Thanks,
Ambesha


想到 SPA [ ^ ]更像是旧的winapi桌面应用程序,但是可以在Web上运行.
主要概念是,客户端和服务器端之间的每个通信都是通过ajax调用完成的. MVC是一个很好的平台,但是有很多可能的实现.最优雅的方法是在服务器端呈现html代码,并仅使用ajax来显示它并捕获事件-另一端是将每个表示层功能移至客户端,并使用DOM来构建和处理GUI. br/> 模板只是一个模板,但我不确定,它已被删除: http://nuget.org/packages/SinglePageApplication [^ ]
Think of an SPA[^] more like of an old winapi desktop application, but running on web.
The main concept is, that EVERY communication between the client side and the server side is done via ajax calls. MVC is a good platform for that, but there is a wide range of possible implementations. The most inelegant way is to render the html code on server side, and use ajax only to display it and catch events - the other end is to move every presentation layer function to client side, and use DOM to build and handle the GUI.
A template is just a template, but I am not sure, it was removed: http://nuget.org/packages/SinglePageApplication[^]


这篇关于单页应用程序(SPA)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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