Web服务或DLL? [英] Web Service or DLL?

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

问题描述

我创建一个应用程序,需要由两个Web前端访问结束托管的内部网络上,也可以作为计划任务运行。没有什么需要是我们的内部系统外,一旦应用程序启动和运行,我们没有设想任何改变一段时间访问。

I'm creating an app that needs to be accessed by both a web front end hosted on an internal network and also run as a scheduled task. Nothing will need to be accessed outside of our internal systems and once the app is up and running we don't envision anything changing for some time.

我最初的想法是创建一个DLL封装了大部分所需的功能,然后通过两个Web窗体界面手动执行,并运行作为自动(每天)计划的任务一个控制台应用程序调用它。

My initial thought is to create a DLL encapsulating the bulk of the necessary functionality and then call it via both a Web Forms interface for manual execution, and a console app running as an automated (daily) scheduled task.

另一项建议已经公开Web服务为核心功能,而不是,而是因为该应用程序将永远不需要通过外部资源,我认为在实现Web服务可能不值得冒这个险所需的额外的努力来调用。该DLL溶液还应当基本上更快(?)。

Another suggestion has been to expose a Web Service for the core functionality instead, but as the app will never need to be called by an external resource I think the extra effort required in implementing a Web Service might not be worth the hassle. The DLL solution should also be substantially faster(?).

我的问题是,你会选择哪条路线?有没有,我还没有涵盖的任何优点/缺点?任何明显的疏漏?

My question is which route would you choose? Are there any pros/cons that I haven't covered? Any glaring omissions?

免责声明:我是新来的.Net,但被卷入一场恶性事故,我被要求加紧对板块由于我们的一个开发人员

Disclaimer: I'm new to .Net but due to one of our developers being involved in a serious accident I've been asked to step up to the plate.

推荐答案

就个人而言,我说去的DLL。这将是快速而简单。

Personally, I say go with the DLL. It will be fast and simple.

通过一个Web服务,你需要考虑你的网络,防火墙,性能等,也使得它更难调试,因为你将不能够踏进从客户端的Web服务,你将有要在通话两侧设置断点。

With a web service, you will need to think about your network, firewalls, performance, etc. It also makes it harder to debug since you won't be able to step into the web service from your clients, you will have to set breakpoints on both sides of the calls.

另一个问题与您的Web服务是,你需要更强大的处理故障。有了一个DLL,你知道调用的方法会成功,但有一个Web服务,您将需要ppared该呼叫失败或超时每当你做任何通话跨$ P $。

The other problem with web services for you is that you need to be much more robust handling failures. With a DLL, you know a call to a method is going to succeed, but with a web service, you will need to be prepared for that call to fail or time out whenever you make any call across.

最后,如果你发现需要在以后的Web服务,你应该能够很容易转换成DLL以最小的改造Web服务。

Lastly, if you find a need for a web service at a later date, you should be able to fairly easily convert the DLL into a web service with minimal retrofitting.

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

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