Resuming the DelphiRazor Library Project


Given I’ve updated the library for 10.1 Berlin for a personal project, and also added a few new features, I decided to make my Delphi Razor HTML scripting library public again.
DelphiRazor is a limited clone of ASP.NET Razor notation by Microsoft. In short, you can use spacial tags in your HTML files invoking server side processing for them, and get placeholders replaced by actual data from the server application (or a database, of course). With some logic, you can repeat HTML blocks (for each record in a dataset) of use conditional elements. In practice, there is a PageProducer type of component to hook individual pages to a WebBroker application, or you can sue the Engine component and automatically process an entire directory (or more complex folder structure).
The interesting element of this approach is you can easily embed this DelphiRazor tags into any modern HTML app. I recently worked on a Boostrap + JQuery site and adding dynamic database data to it ended up being as simple as using traditional web scripting languages. See this page I created for my wife activity with dynamic image filters and other nice JS tricks, with the data provided by DelphiRazor:

The core library, a demo, some preliminary unit tests are now on:

I’m also cleaning up and updating the rather detailed documentation, and plan moving it to the GitHub project wiki format for easier collaboration (I’ve started it here: More than willing to get help (but notice that I licensed this also to Embarcadero, so contributions can possibly also end up in the product — it is already in use internally).
Near terms plans are to finish doc migration and write tests along side, next re-enable some of the features like sessions and permissions with a general architecture, third re-connect it to DataSnap — as in the original version — but also to EMS / RAD Server. Could be also hook into other third party libraries, of course.

Comments are closed.