Can I build WCF servers using Delphi 2010?

人盡茶涼 提交于 2019-12-24 09:58:06

问题


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.

can we do that with Delphi 2010 win32?

the clients will be Delphi win32, Asp.Net (C#) and maybe windows mobile phones too.


回答1:


Using Delphi Prism you can, see http://www.drbob42.com/examines/examinB4.htm




回答2:


Since WCF is a .NET only technology, you will need to bridge to cross from the unmanaged Win32 world to the managed .NET world.

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?"

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
  • Use Delphi Prism with the UnmanagedExport attribute to create a .NET wrapper that you can call from native Delphi Win32
  • Use Managed VCL to do .NET interop from native Delphi Win32
  • From another Stackoverflow question: create a C++ DLL crossing the bridge this used "mixed mode 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)

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.

--jeroen




回答3:


WCF is a part of .NET, you need an .NET language to use it: No "Win32" language can do it. Delphi Prism can!



来源:https://stackoverflow.com/questions/3279925/can-i-build-wcf-servers-using-delphi-2010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!