wpf作为webapp后端? [英] wpf as a webapp backend?

查看:259
本文介绍了wpf作为webapp后端?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我想知道在使用wpf应用程序作为Web后端时有什么可能性,因为我不清楚这是怎么可能的,因为wpf afaik是一个桌面开发框架。

Hello I would like to know what are the possibilities when using a wpf app as a web backend, since it's unclear to me how would that be possible since the wpf afaik is a desktop development framework.

我问这个是因为我被分配制作类似wpf后端的东西,并将其连接到javascript ui。

I ask this because I got assigned to make something like a wpf backend, and connect it to a javascript ui.

最重要的是这种方式是一种好的做法,还是应该转移到asp.net甚至是核心?

And most important of that is this way a good practice at all or should one move to asp.net or even core?

推荐答案

在Web应用程序中使用基于Windows的UI是没有意义的。对于这样的架构,您无法做任何事情,以至于您无法在Web应用程序中进行此操作。此外,网络应用程序旨在让许多人同时访问。对于所有这些用户而言,尝试使用相同的桌面应用程序并不是
,因为他们会同时执行不同的操作。为每个连接的用户创建桌面应用程序的单独实例也不可扩展。这样的架构有太多
的问题,甚至认为它是一个选项。

It wouldn't make sense to use a Windows-based UI in a web app. There is nothing you could do with such an architecture that you can't already do in a web app to begin with. Furthermore web apps are designed to be access by many people at once. It wouldn't make sense for all those users to try to use the same desktop app since they would be doing different things at the same time. It also wouldn't be scaleable to create a separate instance of the desktop app for each connected user. There are simply too many issues with such an architecture to even consider it an option.

如果架构是可靠的,那么你的(桌面)用户界面只是一个业务视图/您应用的数据层。因此,使用Web前端替换UI应该非常简单。桌面应用程序中当前需要在其他地方使用的任何逻辑
只需要移动到业务层。 UI项目中只应包含特定于UI的内容。

If the architecture is solid then your (desktop) UI is just a view into the business/data layers of your app. Therefore replacing the UI with a web frontend should be pretty easy. Any logic that is currently in the desktop app that needs to be useable elsewhere simply needs to be moved into the business layer. Only UI-specific stuff should be in the UI project.

请在ASP.NET
论坛。此论坛仅适用于C#特定问题。

Please post further questions related to building web applications in the ASP.NET forums. This forum is for C#-specific questions only.


这篇关于wpf作为webapp后端?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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