Delphi 中的 Web 应用程序

发布于 2024-07-27 15:19:03 字数 206 浏览 1 评论 0原文

我正在评估使用 Delphi (ISAPI/CGI/...) 编写 Web 应用程序的可能性。 我仍然看不出有足够的理由使用 Delphi 而不是“经典”的 Web 开发框架。

如果您在该特定领域有经验,请分享您的评论。 您会推荐 Delphi 而不是 PHP/Rails/ASP/...? 您知道用 Delphi 编写的 Web 应用程序吗? (不是网络服务)

I'm evaluating the possibility to write a web application using Delphi (ISAPI/CGI/...). I still cannot see enough reasons to use Delphi instead of a "classic" web development framework.

If you have experience in this specific area please share your remarks. Would you recommend Delphi instead of PHP/Rails/ASP/...? Do you know any web applications written in Delphi? (not web services)

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

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

发布评论

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

评论(5

§普罗旺斯的薰衣草 2024-08-03 15:19:03

如果您使用 Delphi 进行 Web 应用程序,您将获得以下好处:

  1. 与其他脚本语言相比的性能。
  2. 重用您的 Delphi 代码。
  3. 在出色的 IDE 中工作。
  4. 使用您最喜欢的语言(Delphi)。
  5. 如果您使用 Intraweb,您可以获得内置的 Ajax 支持并提高生产力,而无需深入了解 Web 或 JavaScript。

但缺点是:

  1. 部署并不容易,您需要使用 ISAPI 和 ISAPI。 IIS,您很少会找到为您提供 ISAPI 的托管公司。
  2. 仅Windows平台,(如果您使用freePascal,您可能会得到其他平台)。
  3. 没有框架,没有库可以在这方面为您提供帮助。
  4. 这方面的文档非常差,而且大多数文章都是旧的。
  5. 与 Asp.Net 等其他解决方案相比,使用 Webbroker 的工作效率并不高。
  6. 即使您使用 Intraweb,它也比其他解决方案更有效率,但不够灵活,因为它隐藏了 Web 端。

顺便说一句,Shareit 已将基于 PHP 的旧 Web 应用程序替换为使用 Delphi 和 Intraweb 构建的新应用程序。

If you use Delphi for web application, you will get these benefits:

  1. Performance compared to other scripts languages.
  2. Reusing of your Delphi code.
  3. Working in great IDE.
  4. Use your favorite language (Delphi).
  5. If you use Intraweb, you can get built in Ajax support and producative without requiring to have deep knowledge in web or JavaScript.

but the disadvange:

  1. Deployment isn't easy, you need to work with ISAPI & IIS, and you rarely find Hosting copmany that offer ISAPI for you.
  2. Only windows platform, (If you use freePascal you may get others).
  3. No frameworks, No libraries for helping you on this side.
  4. Very poor documentation on this side, and most of articles are old.
  5. Working with Webbroker isn't productive compared to other solutions like Asp.Net.
  6. Even if you use Intraweb, it's more productive than other solutions, but isn't flexible, because it's hide the web side on you.

BTW, Shareit has replaced their old web applicatoin that was based on PHP with newer one built with Delphi and Intraweb.

挽心 2024-08-03 15:19:03

原因可能是您的模型、业务逻辑或数据访问层是用 Delphi 编写的,并且您需要在 Web 应用程序中使用它们。 不过,您可以通过 dll 调用、COM、REST 或 SOAP 等方式使用来自其他编程语言的模型、业务逻辑或数据访问层。 那么这就不再是使用 Delphi 开发 Web 应用程序的理由了。

另一个原因可能是开发人员对 Delphi 非常擅长,而对其他语言则不太擅长。

与 php、rails 和 asp 等解释语言相比,使用编译语言还具有性能优势。

A reason could be that your model, business logic or data access layer is written in Delphi and you need to use that in your webapplication. Al tough, you could use your model, business logic or data access layer from other programming languages through things like dll calls, COM, REST or SOAP. Then this is not a reason to use Delphi to develop webapplications anymore.

Another reason could be that the developers are very good in Delphi and less good with the other languages.

Using a compiled language also gives you a performance benefit over interpreted languages like php, rails and asp.

等风也等你 2024-08-03 15:19:03

Delphi 有很多优点,但在我看来,它的 Web 应用程序功能并不在其中。 这正是因为它生成的本机编译代码。 其中:

  1. 如果您不控制服务器(假设它由您的 ISP 托管),则可能几乎不可能安装本机编译的代码。 脚本语言几乎被我能想到的所有网络主机所接受。
  2. 有一些与使用 ISAPI 应用程序中的 DLL 相关的特性。 例如,当您使用 LoadLibrary 加载库时,当前文件夹是 C:\Windows\System32,如果您调用期望 DLL 驻留在当前文件夹中的现有代码,这会很方便。
  3. 较新版本的 IIS 还具有一些不方便的安全功能。 有一个“应用程序保护”设置必须设置为最低设置,并且必须单独启用所有批准的 ISAPI 扩展。 在与他人共享的服务器上,很可能会发生灾难。

Delphi Prism 可以提供更多功能,因为它可以对 .NET 相关技术(包括 MVC 和 Silverlight)进行全面补充。 我已经用 C# 完成所有 Web 服务,如果我必须启动一个新的 Web 项目,Delphi Prism 或 Visual C# 将是我的选择。

Delphi has many strong points, but its web application capabilities don't count among those IMO. This is exactly because of the natively-compiled code it generates. Among others:

  1. If you don't control the server (say it's hosted by your ISP) it may be near-impossible to get natively-compiled code installed. Scripted languages are accepted by nearly all the web hosts I can think of.
  2. There are some idiosyncrasies that relate to using DLLs from your ISAPI apps. For example when you load a library using LoadLibrary, the current folder is C:\Windows\System32 which could convenient if you're calling existing code that expected DLLs to reside in the current folder.
  3. Newer versions of IIS also has some security features that make them inconvenient. There is an "Application Protection" setting that must be set to its lowest setting and all approved ISAPI extentions must be separately enabled. On a server you share with others there is a lot of potential for disaster.

Delphi Prism has more to offer since it can do the full compement of .NET-related technologies, including MVC and Silverlight. I do all my web services in C# already and if I had to start a new web project, Delphi Prism or Visual C# would be my choice.

能否归途做我良人 2024-08-03 15:19:03

多年来,我使用 Delphi 成功部署了多个商业应用程序来创建 ISAPI dll。 我选择 Delphi 的理由很简单。 我们是一家 Delphi 商店,通过选择 Delphi 作为我们的引擎,并在浏览器端使用一些客户端 Javascript,大大减少了编码时间。 所需的大部分功能是处理对后端数据库的调用,该数据库需要保持加密状态,以减少对机器人的可能暴露。

如果您确实决定走这条路,我强烈建议使用 idDebugger 工具来协助调试。 它确实可以减轻痛苦。

I successfully deployed several commercial applications over the years using Delphi to create ISAPI dll's. The reasoning I used for selecting Delphi was simple. We were a Delphi shop, and the amount of time spent coding was greatly reduced by selecting Delphi as our engine, with some client side Javascript on the browser side. Most of the functionality required was dealing with calls to a back end database which needed to remain encrypted to reduce the possible exposure to robots.

If you do decide to go this route, I strongly recommend using the idDebugger tool to assist in debugging. It really takes the pain out of it.

烟火散人牵绊 2024-08-03 15:19:03

各种各样的工具和创建丰富 Web 应用程序的方法。 它还支持所有当前技术。 因此,您可以推出您能想到的任何类型的应用程序/网络应用程序。 我有很多很多的例子。

Wonderful assortment of tools, and methods of creating rich web applications. Also it supports all of the current technologies. Thus you can roll any type of application / web app that you can think of. I have lots and lots of examples.

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