简体   繁体   English

我可以使用Delphi 2010构建WCF服务器吗?

[英]Can I build WCF servers using Delphi 2010?

We would like to build new application as multi tiers, we can do it as web service, but we prefer to use more advanced features as WCF, which not found in datasnap too. 我们想将新的应用程序构建为多层,我们可以将其作为Web服务来实现,但是我们更喜欢使用更高级的功能(如WCF),该功能在datasnap中也找不到。

can we do that with Delphi 2010 win32? 我们可以用Delphi 2010 win32做到这一点吗?

the clients will be Delphi win32, Asp.Net (C#) and maybe windows mobile phones too. 客户将是Delphi win32,Asp.Net(C#),也许还有Windows手机。

使用Delphi Prism可以,请参阅http://www.drbob42.com/examines/examinB4.htm

Since WCF is a .NET only technology, you will need to bridge to cross from the unmanaged Win32 world to the managed .NET world. 由于WCF是仅.NET技术,因此您需要桥接以从非托管Win32世界过渡到托管.NET世界。

There are a few options to get started. 有一些开始的选择。
All of them feel kludge-like, so it might be better to ask yourself the question "what features of WCF are so compelling over web services?" 所有这些人都感觉很像鞭子,所以最好问自己一个问题:“ WCF的哪些功能对Web服务如此有吸引力?”

Here it goes: 它去了:

  • Write a .NET wrapper, export it as COM or ActiveX, then use it either as COM or ActiveX object from native Delphi Win32 编写一个.NET包装器,将其导出为COM或ActiveX,然后将其用作本机Delphi Win32中的COM或ActiveX对象
  • Use Delphi Prism with the UnmanagedExport attribute to create a .NET wrapper that you can call from native Delphi Win32 使用带有UnmanagedExport属性的 Delphi Prism创建一个.NET包装,您可以从本机Delphi Win32中调用该包装
  • Use Managed VCL to do .NET interop from native Delphi Win32 使用托管VCL从本地Delphi Win32执行.NET互操作
  • From another Stackoverflow question: create a C++ DLL crossing the bridge this used " mixed mode C++ " 从另一个Stackoverflow问题开始: 创建一个跨桥的C ++ DLL,该桥使用了“ 混合模式C ++
  • Use RemObjects Hydra on both the C# or Delphi Prism and native Delphi Win32 side (RemObjects wrote Delphi Prism, so this works like a charm) 在C#或Delphi Prism以及本机Delphi Win32方面都使用RemObjects Hydra (RemObjects编写了Delphi Prism,因此它就像一个魅力)

The last one might be the real one you are after: 最后一个可能是您所追求的真实对象:
it can do much more than web-services, but is not as platform limited as WCF is. 它可以做的比Web服务还多,但是它的平台限制不像WCF那样。

--jeroen --jeroen

WCF is a part of .NET , you need an .NET language to use it: No "Win32" language can do it. WCF是.NET的一部分 ,您需要使用.NET语言才能使用它:没有“ Win32”语言可以做到。 Delphi Prism can! 德尔福棱镜可以!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM