【问题标题】:What is the "current" Delphi web app framework?什么是“当前”的 Delphi Web 应用程序框架?
【发布时间】:2012-02-28 11:15:10
【问题描述】:

我正在查看 Delphi Web 服务器应用程序,当我进入 New Items 对话框时,我首先注意到的是有几个不同的框架。

从概念的角度来看,WebBroker 看起来最好,但在文档中,它的 DB 和会话管理代码似乎与 BDE 相关联,这使得它在今天不太有用。

WebSnap 看起来非常相似,但文档说它已被弃用,应该改用 IW(“VCL for the Web”)。

所以我查看了 IW,但我无法确定它应该如何工作。示例代码充满了看起来像是属于桌面应用程序的内容,例如单击按钮以触发事件处理程序以更改表单元素的标题。 (如果我们正在创建网页,那不是必须在 JavaScript 中在客户端完成吗?)

那么目前在 Delphi 中构建 Web 服务器的标准框架是什么?

【问题讨论】:

  • +1 非常好的问题,如果我没记错的话,IW 会自动将 delphi 代码转换为 javascript 并将其添加到 html 的 部分,但是,我强烈建议采用不同的方法,也许使用 IdHTTPServer(不确定它的可扩展性如何......)也许使用 DWScript 作为您的服务器端脚本语言?我已经多次使用这种方法并且效果很好。为了让您了解我在说什么,请查看一篇非常古老的博文 delphigeist.com/2010/12/…
  • 有趣,但该示例仅适用于提供页面。当您需要从用户那里获取数据并进行处理时会发生什么?
  • 在 GET/POST 请求上处理数据、连接到数据库(如果需要)和所有这些好东西。例如,如果您需要为表用户处理数据,您可以有一个名为 users.html 的页面,该单元中的代码将负责插入/更新/删除/检索/等。在那篇文章中,我没有添加这个作为示例,但是您应该很快就会开始在 DWScript 中定义函数,这些函数将建立数据库连接和帮助您运行查询的类。
  • 因此,如果您定义了一个名为 TQuery 的自定义类,它具有 Execute|ExecSQL 和 Open 方法以及某种检索字段值和遍历行等的方法,您还可以使其“独立于数据库”,如果工作量太大(我估计大约需要 7-8 小时进行测试),那么你应该看看不同的替代 web2py、ror、django 等,但后期的学习曲线很长......我的想法很简单,你一路写delphi代码!
  • P.S. users.html 是浏览器发布/请求数据的页面,这是 DWScript 代码,没有 html。

标签: delphi


【解决方案1】:

老问题,但仍应得到最新答案。

目前的“定居”解决方案是:

内网:

https://www.atozed.com/intraweb/

uniGUI:

http://unigui.com/

Introduction
uniGUI Web Application Framework extends Web application development experience to a new dimension. uniGUI enables Delphi developers to create, design and debug web applications in IDE using a unique set of visual components. Each component is designed to provide same functionality of its counterpart visual component in Delphi VCL. This provides a very comfortable development environment very close to native VCL application development with an easy learning curve.  uniGUI Web applications can be deployed to a server using one of the available deployment options such as Windows Service, Standalone Server or ISAPI Module.

Product Highlights:

Based on industry's most advanced JavaScript library Sencha Ext JS.
Includes OEM license for Sencha Ext JS. (Please see licensing for details).
A unique platform to create stateful web applications.
Complete IDE support for creating projects, designing forms, frames and handling data modules.
Advanced support for scripting client side JavaScript events.
Library core is fully optimized to achieve highest level of scalability.
Including advanced Stress Test Tool utility.
Comes with various deployment options: ISAPI Module, Standalone Server and Windows Service.
Supported Delphi versions: Turbo Delphi Pro, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, XE2, XE3, XE4, X5, XE6, XE7, XE8, Delphi 10 Seattle, 10.1 Berlin, 10.2.3 Tokyo and 10.3.3 Rio (Win32 & Win64 platforms). (Linux support is in the roadmap)
C++ Builder supported.
Supported Browsers: IE 9+, Microsoft Edge, FireFox, Chrome, Safari and Opera
New state-of-the-art uniGUI HyperServer technology.

TMS 网络核心:

https://www.tmssoftware.com/site/tmswebcore.asp

RADical Web
Modern SPA web application model
Pure HTML5/CSS3/Javascript based applications
Standard component framework for common UI controls and access to browser features
Debugging in Pascal code via the browser
Backed by a solid & proven Delphi Pascal to Javascript compiler that was years in development

Reuse skills and components Component based RAD development integrated
in the Delphi IDE A truly revolutionary & innovative TMS FNC component
framework that is now also web enabled, allowing to create UI controls
that can be used on VCL, FMX, LCL and WEB! Open to consume other
existing Javascript frameworks & libraries Open to use HTML/CSS for
design Open to use other jQuery controls or even other Javascript
frameworks Offers Pascal class wrappers for jQuery controls from the
jQWidgets library Easy interfacing to REST cloud services including to
TMS XData for database

Easy Deployment Application consists of HTML & Javascript files only
that can be easily deployed on any light or heavyweight webservers Use
any existing load-balancing software and/or techniques for highest
performance Small and convenient debug webserver is included for fast
RAD development

【讨论】:

    【解决方案2】:

    https://github.com/relativ/pascalweb

    PascalWeb 使用 pascalscript 编译器,您可以创建 web 应用程序,如 php 或 python

    【讨论】:

      【解决方案3】:

      虽然有多种商业选项可用于使用 Delphi 编写 Web 应用程序,但在我看来,Delphi 不再附带作为软件包一部分包含的现代 Web 开发解决方案。

      如果我必须回答您的问题,但我会说当前的开箱即用 Delphi Web 框架是 WebBroker。 WebBroker 是 Delphi 中唯一一个功能没有被弃用或限制的 Web 框架。

      WebBroker 可能早在 Delphi 4 就被引入了。它是一匹诚实的好工作马,但自从首次引入以来,它并没有真正得到太大的改进。它让您完成大部分繁重的工作,但也不会妨碍您。 WebSnap 和 IntraWeb 是使用 WebBroker 作为基础构建的,可让您了解其提供的服务水平。

      完整版 IntraWeb 已与 Delphi Enterprise 捆绑多年,但从 Delphi XE 开始,它现在有一些限制(无 SSL、无 ISAPI 部署、20 分钟空闲超时),这很可能意味着您需要buy a license from AtoZed认真使用。

      与 Delphi Pro 捆绑在一起的 IntraWeb 版本一直非常有限,不能被视为评估版本以外的任何其他版本。

      【讨论】:

        【解决方案4】:

        http://docwiki.embarcadero.com/RADStudio/en/DataSnap_Overview_and_Architecture

        DataSnap 已经存在很长时间了,最​​新版本是无 DCOM 的。您可以利用它来构建服务器端部分(C/S 和 B/S 中的 S)。它目前的角色几乎就像 .NET 世界中的 WCF。

        然后,如果您正在构建网站前端,则可以使用 IW。但是 DataSnap 甚至可以使用 PHP 或其他 Web 技术构建前端。

        【讨论】:

        猜你喜欢
        • 2022-07-28
        • 2014-08-02
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2010-10-30
        • 1970-01-01
        • 2011-04-08
        相关资源
        最近更新 更多