使用MVVM模式和Web API的单页Web应用程序 [英] Single Page Web Application using MVVM pattern and Web API

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

问题描述





我们将使用WEb API作为服务开发一个使用MVVM框架的应用程序。

在所有层中(View,model和modelView)我们将使用java脚本。



ie用于从web api服务调用数据并在html页面中填充数据或触发验证我们只使用javascript。



我们的目的是提高应用程序的性能并支持单页Web应用程序。



请,任何人都可以提供您对我的方法的看法,请建议最好的方法。



注意:还使用KendoUI控件。

解决方案

这取决于你想要使用单页面应用程序来实现什么。例如,如果你想要一个具有多个视图和实时数据绑定的单页面应用程序,我强烈推荐Angular框架,因为它支持完整的MVC框架等等。



如果你只需要数据绑定来动态更新数据,Angular仍会支持,但我建议使用Knockout,因为它更容易学习。



如果SPA不需要任何这些功能,只需要验证和时间/事件驱动的UI更新,你可以使用jQuery和ajax实现这一点。


请参考链接以了解为什么MVVM可以适用于Web应用程序? http://devproconnections.com/net- framework / mvvm-dot-net-web-application-development#comment-11761 [ ^

Hi,

We are going to develop an application with MVVM framework by using WEb API as services.
In all the layers (View, model and modelView) we are going to use java script.

i.e. For calling data from web api service and to populate data in html page or firing for validations we are using only javascript.

Our intention is to improve the performance of an application and to support Single Page Web application.

Please, can any one provide your thoughts on my approach and please suggest the best ways to do it.

Note: Also using KendoUI controls.

解决方案

It depends on what you'd like to acheieve using the single page application. For example, if you'd like a single page application with multiple views and real-time data binding, I highly recommend the Angular framework as it supports the full MVC framework and more.

If you only need data-binding to dynamically update data, Angular would still support that, but I recommend Knockout as it is simpler to learn.

If the SPA does not need any of these features and only need validation and time/event driven UI updates, you can acheive that using jQuery and ajax.


Please refer the link for understanding why MVVM could be good for web applications?http://devproconnections.com/net-framework/mvvm-dot-net-web-application-development#comment-11761[^]


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

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