简体   繁体   English

ASP.NET MVC 4和SignalR可能性

[英]ASP.NET MVC 4 and SignalR posibilites

I have two MVC 4 web applications that can be considered as client and server apps. 我有两个可以视为客户端和服务器应用程序的MVC 4 Web应用程序。

Client app is classic shopping cart web application where registered users select products from various stores and order them online. 客户端应用程序是经典的购物车Web应用程序,注册用户可以在其中从各个商店中选择产品并在线订购。

Server app is a store web application where store employees receive orders from registered users and accept or decline their orders. 服务器应用程序是商店Web应用程序,商店员工可以在其中从注册用户那里接收订单,并接受或拒绝他们的订单。

So basically, each store has its account on server web app, and each customer has its account on client web app. 因此,基本上,每个商店在服务器Web应用程序上都有其帐户,每个客户在客户端Web应用程序上都有其帐户。

All orders should be made real-time so that store employees receive them in real time, without refreshing their website. 所有订单都应实时进行,以便商店员工可以实时接收订单,而无需刷新其网站。 On the other hand, each customer should get a real time response from the store after his order has been accepted or declined. 另一方面,每个客户在接受或拒绝订单后都应从商店获得实时响应。

Do you suggest using SignalR to implement this functionality? 您是否建议使用SignalR来实现此功能? Is it possible to have users (clients) send orders to specific stores (servers) and for stores to send response to the order customer (client)? 是否可以让用户(客户)将订单发送到特定的商店(服务器),并使商店将响应发送到订单客户(客户)?

If not, what's your suggestion for the technology? 如果没有,您对这项技术有何建议?

Thanks! 谢谢!

SignalR will work in both cases, but requires the user to be logged in and have their browser open to receive notifications. SignalR在这两种情况下都可以使用,但是要求用户登录并打开浏览器才能接收通知。 You will still have to have some other form of notification (email, status page, etc) in case the browser window is closed. 万一关闭浏览器窗口,您仍然必须具有其他形式的通知(电子邮件,状态页面等)。

Here's a cool tutorial of a Shopping Cart implementation with SignalR and Knockout. 这是一个使用SignalR和Knockout 实现购物车实现的酷教程

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM