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

发布于 2024-09-10 14:24:11 字数 183 浏览 2 评论 0原文

我们希望构建多层新应用程序,我们可以将其作为 Web 服务来完成,但我们更喜欢使用 WCF 等更高级的功能,这在 datasnap 中也找不到。

我们可以用 Delphi 2010 win32 做到这一点吗?

客户端将是 Delphi win32、Asp.Net (C#),也许还有 Windows Mobile 手机。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

任性一次 2024-09-17 14:24:11

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

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

梨涡少年 2024-09-17 14:24:11

由于 WCF 是一种仅限 .NET 的技术,因此您需要从非托管 Win32 世界到托管 .NET 世界的桥梁。

有几个选项可以开始。
所有这些都感觉像是拼凑而成,因此最好问自己一个问题:“WCF 的哪些功能比 Web 服务如此引人注目?”

代码如下:

  • 编写一个 .NET 包装器,将其导出为 COM 或 ActiveX,然后将其用作本机 Delphi Win32 中的 COM 或 ActiveX 对象
  • 将 Delphi Prism 与 UnmanagedExport 属性 创建可从本机 Delphi Win32 调用的 .NET 包装器
  • 使用 托管 VCL 从本机 Delphi Win32 进行 .NET 互操作
  • 来自另一个 Stackoverflow 问题:创建一个过桥的 C++ DLL,这使用了“混合模式 C++"
  • 使用 RemObjects Hydra 在 C# 或 Delphi Prism 和本机 Delphi Win32 端(RemObjects 编写了 Delphi Prism,所以这就像一个魅力)

最后一个可能是您真正想要的:
它可以做的事情比 Web 服务多得多,但不像 WCF 那样受到平台限制。

——杰罗恩

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

长不大的小祸害 2024-09-17 14:24:11

WCF 是 .NET 的一部分,您需要 .NET 语言使用它:没有“Win32”语言可以做到这一点。德尔福棱镜可以!

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文