渲染Ui并从远程计算机执行 [英] Rendering Ui and execution from remote machine

查看:99
本文介绍了渲染Ui并从远程计算机执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要呈现位于远程计算机,本地计算机中的UI控件. UI上的任何操作/单击都应在远程计算机上执行业务逻辑.我知道像ASP这样的网络技术可以在这方面有所帮助,但是我想知道是否还有其他方法也可以.

I have a requirement to render UI control located in remote machine, in local machine. Any action/click on UI shall execute the business logic on remote machine. I know web technologies like ASP would help in this regard but I want to know if any other way is also possible.

推荐答案

这个问题没有太大的意义,因为使用ASP .NET,您不呈现UI.它仅由浏览器(即客户端)完成.服务器端仅在HTTP请求上生成一些资源,并在HTTP响应中返回它们.对于UI,这通常是HTML.原则上,对于这种纯客户端-服务器模型,在实际接收到HTTP请求并运行HTTP服务器的主机上或间接在其他计算机上实际计算和生成HTML的位置并不是很重要. HTML仅仅是文本.因此,问题看起来是人为的.

FTP没有多大意义,但是您可以使用它,因为您可以在一台主机上运行FTP服务器并使用FtpWebRequest类来使用它.不清楚为什么.

本质上,您应该只考虑两个主机(和两个层次):客户端主机和运行HTTP服务器的服务器主机.对于客户端主机,没有别的了.因此,您只能将其他主机连接到HTTP服务的主机,这些机器可以是任何机器.如果它们在同一个本地网络和HTTP服务器的主机上,则它们可以运行任何内容,不仅可以在Windows上运行(您可以在许多平台上的Mono上运行CLR,使用套接字网络,远程处理,自托管(尤其是如果您不想要IIS)WCF,FTP,甚至其他任何东西).

—SA
The question makes no much sense because with ASP.NET, you don''t render the UI. It is done only by the browser, that is, a client side. Server side only generates some resources on HTTP request, returns them in HTTP response. As to UI, this is normally HTML. In principle, for this pure client-server model, it is not very important where the HTML is actually calculated and generated, on the host receiving HTTP request and running the HTTP server, or on some other machine, indirectly. HTML is merely the text. So, the problem looks artificial.

FTP makes no much sense, but of course you can use it as you can run FTP server on one host and utilize it using FtpWebRequest class. Not clear why though.

Essentially, you should think only in terms of just two hosts (and two tiers): a client host and the server host running the HTTP server. For the client host, there is nothing else. So, you only can connect other hosts to the host of HTTP service, and these machines can be anything. If they are on the same local network and the HTTP server''s host, they can run anything, and not only on Windows (you can run CLR on Mono, on many platforms, using socket networking, remoting, self-hosted (especially if you don''t want IIS) WCF, FTP, really anything).

—SA


您应该查看WCF之类的东西,以便从另一台计算机运行远程业务逻辑.最简单的方法是创建一个Web服务来运行业务逻辑并将结果返回到您的UI.
You should be looking at things like WCF to run remote business logic from another machine. The simplest way is to create a web service to run the business logic and return the results to your UI.


这篇关于渲染Ui并从远程计算机执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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