Recent

Author Topic: Looking for recommendation on template engine  (Read 1015 times)

snorkel

  • Hero Member
  • *****
  • Posts: 817
Looking for recommendation on template engine
« on: November 25, 2019, 04:46:11 pm »
I am building a https server app with Indy TidHTTPServer and I am at the point I need a template engine.

I looked at the Mustache one from Synopse but it does not run on the current version of FPC (3.04) so that one is out for now.

I have used python ones before while building stuff with Flask(Jinga templates) and cherrypy(mako templates)

***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

mr-highball

  • Full Member
  • ***
  • Posts: 233
    • Highball Github
Re: Looking for recommendation on template engine
« Reply #1 on: November 25, 2019, 05:56:58 pm »
perhaps this thread may be of use? (includes code attached as zip)
https://forum.lazarus.freepascal.org/index.php/topic,41134.msg284957.html

Also, that thread mentioned this repo,
https://github.com/michalgw/SimpleTpl

Thaddy

  • Hero Member
  • *****
  • Posts: 14367
  • Sensorship about opinions does not belong here.
Re: Looking for recommendation on template engine
« Reply #2 on: November 25, 2019, 07:31:22 pm »
There is a template engine as standard in fpc. It is in the fcl-base package and called fptemplate.pp
It is very basic, but powerful.
« Last Edit: November 25, 2019, 07:34:47 pm by Thaddy »
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

 

TinyPortal © 2005-2018