Web服务VS DLL;优点和缺点? [英] Web Service vs DLL; Pros and Cons?

查看:210
本文介绍了Web服务VS DLL;优点和缺点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我实现了我们的网站上的Web服务,它要求并通过互联网从第三方接收数据。我也被要求创建一个DLL复制Web服务的功能,为内部的Windows应用程序。

I am implementing a web service for our website which requests and receives data from a third party via the internet. I have also been asked to create a DLL duplicating the functionality of the web service for an internal windows application.

我的问题是;有什么优势/ NOT创建DLL和使用Web服务内部和Web应用程序的缺点是什么?

My question is; what are the advantages/disadvantages of NOT creating the DLL and using the WEB Service for both internal and web applications?

从来看我preFER支持单一服务维修点。想法或意见?

From a maintenance point of view I would prefer to support a single service. Thoughts or ideas?

推荐答案

在我看来,你应该创建这个逻辑有点像WCF的服务,能够以多种格式主持。接口优先发展战略将仍然允许你通过直接实例化使用的服务不外乎一个内存类,但你也可以使用共享内存端点代理,以轻松地在消费服务之间移动网络边界与共享内存与TCP / IP。

In my opinion you should create this logic as something like a WCF-Service which can be hosted in a variety of formats. The interface-first development strategy would still allow you to use the service as nothing more than an in-memory class by directly instantiating it, but you could also use the "shared memory" endpoint with a proxy to easily move between consuming the service across a web boundary versus shared memory versus TCP/IP.

在托管模式可能是IIS和使用basicHttp结合的外观和行为非常像一个传统的web服务,但也可以Windows服务中托管,或Windows窗体应用程序,甚至是ConsoleHost应用程序。

The hosting model could be IIS and use the basicHttp binding to look and act very much like a traditional WebService, but could also be hosted within Windows Service, or Windows Forms application or even a ConsoleHost application..

这篇关于Web服务VS DLL;优点和缺点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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