sgcHTML, a Modern Delphi IntraWeb Alternative
sgcHTML is a Delphi web framework that keeps the server-side model and builds every page from modern HTML components, in the Object Pascal you already use.
sgcHTML is a Delphi web framework that keeps the server-side model and builds every page from modern HTML components, in the Object Pascal you already use.
Delphi IntraWeb applications are built from VCL-style forms designed in the IDE and rendered server-side as HTML. sgcHTML is a Delphi web framework that keeps that server-side model and builds every page from modern HTML components: Bootstrap 5 markup, htmx partial updates and real-time push, written in the Object Pascal and the RAD Studio IDE you already use.
IntraWeb is a mature, long-established Delphi web framework, and a limited edition ships with RAD Studio. This page is for developers who run an IntraWeb application, or evaluate one for a new project, and want to see how the same ideas look in sgcHTML.
Both frameworks render on the server, so the way you think about a Delphi web application stays the same. Four ideas carry over, each in a slightly different shape.
A form becomes a page. You can still design it on a VCL form: drop sgcHTML components on it and TsgcHTMLDesignServer builds the page from the form and serves it at its PagePath. Or compose the page in code with TsgcHTMLComponent_Site and read its HTML property.
Clicks and submits run Delphi code. An action of TsgcHTMLDesignSurface has a Source, a Target and an OnExecute event, which is the server-side OnClick. When it returns, the target is rendered again and swapped into the page without a reload.
There is no mandatory per-user UI object tree in server RAM. Pages render statelessly and you decide what session state to keep. TsgcHTMLAuth adds cookie sessions, remember-me, CSRF tokens and login throttling on top of a session store.
110 components, from grids, charts and forms to dashboards, chat and a scheduler, render clean, responsive Bootstrap 5 HTML. 28 data-aware components bind straight to a TDataSet, so your data modules plug in unchanged.
Reporting and BI dashboard.
Warehouse (WMS) dashboard.
Field service Gantt planner.
Touch point of sale.
Where each familiar building block of a Delphi IntraWeb application lands in sgcHTML. The IntraWeb migration guide turns this table into a screen by screen plan.
| IntraWeb concept | sgcHTML equivalent |
|---|---|
| IWForm designed in the IDE | A page designed on a VCL form with TsgcHTMLDesignSurface and TsgcHTMLDesignServer, assembled with TsgcHTMLPageBuilder and its design-time editor, or composed in code with TsgcHTMLComponent_Site |
| IW controls (TIWEdit, TIWGrid, TIWButton) | TsgcHTMLComponent_Form, TsgcHTMLComponent_Grid, TsgcHTMLComponent_ButtonGroup and the rest of the 110 component catalog |
| DB-aware IW controls | 28 data-aware components, such as TsgcHTMLComponent_Grid, TsgcHTMLComponent_DataTable and TsgcHTMLComponent_Chart, bound to a TDataSet through LoadFromDataSet or DataSource |
| OnAsyncClick callbacks | The OnExecute event of a surface action, or htmx fragment routes that return component HTML |
| Per-user session objects | Stateless pages plus the session policy you choose: TsgcHTMLAuth with TsgcHTMLSessionStore_Memory, or TsgcHTMLSessionStore_File so sessions survive a restart |
| ServerController deployment | A single executable with the bundled TsgcHTTPServer, or a WebBroker, DataSnap or RAD Server host |
| Custom templates and CSS | TsgcHTMLTemplate_Bootstrap and TsgcHTMLThemeController, with light and dark themes built in |
| Timers and polling for live data | Server push of HTML fragments with PushFragment and BroadcastFragment, over server-sent events or WebSocket |
On a VCL form, drop a TsgcHTTPServer, a TsgcHTMLDesignServer and a TsgcHTMLDesignSurface, then a TsgcHTMLComponent_ButtonGroup and a TsgcHTMLComponent_Panel on a panel that holds the page. Add an action to the surface, set its Source and Target in the Object Inspector and double-click OnExecute.
object Surface: TsgcHTMLDesignSurface
Title = 'sgcHTML QuickStart: Events'
Actions = <
item
ActionName = 'SayHello'
Source = HelloButton
Target = ResultPanel
OnExecute = HelloActionExecute
end>
end
uses
// sgc
sgcHTTP_Server, sgcHTMLDesign_Server_Indy, sgcHTMLDesign_Surface,
sgcHTMLDesign_Controls, sgcHTMLDesign_Actions,
sgcHTML_Component_ButtonGroup, sgcHTML_Component_Panel;
procedure TFrmEvents.FormCreate(Sender: TObject);
begin
{ read the sgcHTML components on pnlPage into the page }
sgcHTMLDesignBuildFromControls(Surface, pnlPage);
HTTPServer.Active := True;
end;
{ OnExecute is the server-side OnClick of HelloButton. When it returns,
ResultPanel (the Target) is rendered again and swapped in place. }
procedure TFrmEvents.HelloActionExecute(Sender: TObject;
aAction: TsgcHTMLDesignAction; var aResponse: string);
begin
ResultPanel.Body := 'Hello from Delphi! The server time is ' +
TimeToStr(Now) + '.';
end;
The code comes from the 03.Events QuickStart demo. Leaving aResponse empty re-renders the target, which is what most actions want. The handler runs on a server thread, so it changes sgcHTML components, not the controls of the desktop window. The sgcHTML quick start shows the same page built in code from a console program.
sgcHTML serves standard HTTP from your own Delphi executable. Bootstrap 5 and htmx are embedded, so no CDN is required at runtime. Windows, macOS and Linux are all supported.
The standalone product bundles the sgcWebSockets Core runtime, which serves your pages with TsgcHTTPServer. The ERP demo is one Delphi executable with no DLLs beside it.
The download includes demos that host an sgcHTML application inside a Windows Service and as a Linux daemon, started by the operating system like any other server.
Serve the same pages from a standalone TIdHTTPWebBrokerBridge, an ISAPI module, an Apache module, a CGI executable or an HTTP.sys bridge server. See WebBroker and DataSnap hosting.
With sgcWebSockets Professional, Enterprise or All-Access, the engine runs on TsgcWebSocketHTTPServer and pushes over WebSocket, and a DataSnap server can serve pages with live push on the same port as its REST endpoints.
Since sgcHTML serves standard HTTP, the IntraWeb server and the sgcHTML server can run side by side behind the same reverse proxy while you move one screen at a time.
You license the components, and you can also hand the eSeGeCe team the work.
Describe your IntraWeb application in the migration form: framework version, IDE, the size of the application and what it does.
The team reviews your description, proposes a mapping from your current screens to sgcHTML components and recommends a package that fits the project.
Through sgcCustomization HTML, one-time packages from €149, the eSeGeCe team rebuilds the application from your written description and delivers a complete project.
sgcHTML includes full source code, is licensed per developer from €299 and ships as a standalone component pack with the sgcWebSockets Core runtime bundled in. See sgcHTML pricing.
Yes. sgcHTML is a Delphi web framework with the same server-side model: you write Object Pascal in RAD Studio and the server renders the HTML. Moving an application means rebuilding each screen with sgcHTML components, page by page, using the concept mapping on this page.
Yes. Drop sgcHTML components on a VCL form, set their properties in the Object Inspector, and TsgcHTMLDesignServer builds the page from the form. TsgcHTMLPageBuilder also has a design-time editor to assemble pages in the IDE.
Through the OnExecute event of an action on TsgcHTMLDesignSurface. The browser posts the click with htmx, your handler runs on the server, and the action's Target component is rendered again and swapped into the page in place, without a reload.
Only if you want one. Pages render statelessly, with no mandatory per-user UI object tree in server RAM. For logins and user state, TsgcHTMLAuth adds cookie sessions, CSRF tokens and login throttling on top of TsgcHTMLSessionStore_Memory or TsgcHTMLSessionStore_File.
Delphi 7 to 13, with C++ Builder in matching versions, and servers on Windows, macOS and Linux. A .NET implementation targets .NET 8, .NET 9, .NET 10 and .NET Standard 2.0. Android and iOS are not build targets, because the phone receives HTML over the network.
Yes. sgcHTML serves standard HTTP, so both servers can run side by side behind the same reverse proxy while you move one screen at a time. There is no need for a big-bang rewrite.
Yes. Describe the application in the migration assistance form and the team proposes a component mapping and a package. Through sgcCustomization HTML the team can also rebuild the application for you, one-time packages from €149.