桌面项目到网站的转换 [英] desktop project to website conversion

查看:59
本文介绍了桌面项目到网站的转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以将c#桌面项目转换为asp.net网站吗?

can we convert a c# desktop project to a asp.net website.

推荐答案

没有这种转换.希望您可以重用一些代码,但前提是您必须将有价值的代码部分与UI完全隔离.许多其他技术不适用于Web应用程序,例如线程.

由于HTTP的限制,Web应用程序模型非常有限.流程的所有生命周期都在单个HTTP请求和HTTP响应之间.这样的执行之间没有共享任何对象;您将需要使用状态管理. HTTP协议本身是完全无状态的.您现在到了,这与普通的桌面编程有何距离?

—SA
There is no such conversion. Hopefully you can reuse some pieces of code, but only if you have valuable parts of code fully isolated from UI. Many other techniques won''t work for a Web application, such as threading.

Web application model is very limited due to limitations of HTTP. All the life cycle of your process goes between a single HTTP request and HTTP response. No objects are shared between such executions; you will need to use state management. HTTP protocol itself is totally stateless. Are you getting now, how far all this is from the normal desktop programming?

—SA


这篇关于桌面项目到网站的转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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