Jump to content


Popular Content

Showing content with the highest reputation on 07/18/21 in all areas

  1. For my new project I need a template engine for generating web pages, while I have concluded which suited my needs the best and I'm quite confident about my conclusion, your opinions and comments might help me to make my final decision. Since mORMot is my go-to framework for server-side web development, the first candidate to consider is obviously DMustache, which is a fast Delphi/FPC implementation of the popular logic-less Mustache template engine. Actually I've used it in several of my projects and it's great. But sometimes I need more features, but as you know, logic-less means no "if", "while", and so on. And fortunately I found Sempare Template Engine, which is the only feature-rich template engine for Delphi ( Yes, I meant it, because we all know Delphi was/is mostly focused on GUI development but not web development...) Pros === - Very very feature-rich, "if", "for and while loop", "include", "JSON", "custom methods", and so on. Basically, the feature set it's very close to template engines you can find in web-focused languages such as Java. No other Delphi template engine is even comparable (sorry, I love DMustache, but I also need "if" and "while"...). - Very well designed! You can tell by just looking at the unit namespaces and the source! - Documented, and with examples. - Well-tested (with DUnitX tests) Cons: While It's also open source, but for commercial uses you need to buy a license key with a very reasonable price. There are other template engines too, but IMHO, only DMustache and Sempare Template are serious, so I won't list them here... Your comments are welcomed!
  2. A.M. Hoornweg

    Convert Double to Real

    I believe the old Turbo Pascal "Real" type is now called Real48 and exists only for compatibility purposes (i.e. if you need to read or write files with data in that format). It is much slower than either Double or Single because it's not a native FPU format.
  3. I have now got googletest framework up and running with a Windows VCL clang64 project. I've posted two blogs about this here: https://cigolblog.wordpress.com/2021/07/16/tips-for-using-googletests-with-embarcadero-clang64-for-windows-vcl-projects/