The new release 2.8 of the web application framework for Delphi and Free Pascal is available now. Changes include:
- FPCUnit test project
- validation of context names and mappings
- new tutorials with source code
- updated Flightplan demo for jQuery Mobile
- Log4D (logging framework) source code workarounds for Free Pascal
Flightplan Demo (using jQuery Mobile 1.4.2)
DUnit and FPCUnit Tests
Habari Web Components is a web application framework for small to medium size HTTP services, based on the popular open source TCP/IP library for Delphi and Free Pascal, Internet Direct (Indy). If you like to see it in action, download and run the off-line demo applications, or go to the on-line demo. Need more information? Browse the on-line API documentation, or read the Getting Started document.
- supports Delphi 2009 and Free Pascal 2.6.0 or newer with Internet Direct (Indy) 10.6
- full source code included, with DUnit/FPCUnit tests and example applications
- redistribution with your application does not require any additional fees
- free updates for one year
Example source code for Hello World web component
This web component answers HTTP GET requests with a hello world response (content type text/plain). The full tutorial project code is included in the demo download.
unit HelloWorldResource; interface uses djWebComponent, IdCustomHTTPServer; type THelloWorldResource = class(TdjWebComponent) public procedure OnGet( Request: TIdHTTPRequestInfo; Response: TIdHTTPResponseInfo); override; end; implementation procedure THelloWorldResource.OnGet( Request: TIdHTTPRequestInfo; Response: TIdHTTPResponseInfo); begin Response.ContentText := 'Hello world!'; Response.ContentType := 'text/plain'; end; end.