Following my blog post on the compiler and the one on the RTL, this third post covers the focus of our Linux solution, building database web applications and web services. This blog post covers the feature we are expecting to release for the coming Delphi version including support for the server-side applications on the Linux platform
Database Access via FireDAC
Given Delphi's database access support has been a key tenet of the product since day one, the fact that the core database RTL is fully supported and available on Linux should not be surprising. TDataSet, the TFields hierarchy, and all of the remaining core DB technologies will be available.
In terms of actual database access, it will be provided by the FireDAC framework, available along with most of the database drivers we ship on Windows. There will be a few exceptions, including Windows-specific databases like Microsoft Access. Our support will start with MySQL -- almost the standard on Linux -- but include also Interbase, FireBird, ProgressSQL, and many others. Enterprise-grade databases like Oracle and Microsoft SQL Server will also be covered.
The solution is going to include also local tables access via FDMemTable and mapping of database data to XML and JSON, something often handy when building web services and web solutions.
The Web Technologies
The focus of the Delphi support for Linux is in building server side applications, which mostly ends up being HTTP-based solutions -- although via Indy we support also the development of non-HTTP Internet servers. All of the web technologies in active development on Windows will come to Linux, including:
1. WebBroker core foundations, with the direct support for building stand-alone console apps and Apache modules. All of the core elements of WebBroker -- mapping of request and response, actions, etc -- are going to be supported, along with some of the old-school HTML producer components
2. DataSnap servers, again deployed via Apache WebBroker or standalone. You should be able to migrate recent DataSnap servers to Linux.
3. The development of EMS modules for RAD Server, our newest REST service development technology. In fact, RAD Server itself is going to support Windows and Linux deployment.
Apache Demo and Conclusion
This is overall what we are expecting to deliver, but some details are still in flux, so don't take anything from this blog post as a promise. To conclude, I wanted to share this screenshot of a running Apache module, its source code, and its configuration -- detailed images added below.
In this image you can see on the left -- or the first detailed image -- the source code of the WebBroker Apache project file (generated by the wizard) and the module with a very simple action returning a string, on the right -- or the second detailed image -- above the configuration for Apache on Linux, with the module loading lines and the configuration (mapping the handler to a path), while below it you can see a browser running on Windows and pointing to the given URL. End result is you can see the simple one line of HTML text in Chrome.
While the actual result of this project -- one line of HTML -- is not terribly thrilling, the ability of creating Linux Apache modules with Delphi certainly is. Looking forward to deploy my server side code on Linux.
PS. I know that is not even legal HTML, but keeping the code as simple as possible was the goal here. I'll soon show you some real dynamic web pages deployed on Linux via Delphi. Stay tuned.