Recent

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

snorkel

  • Hero Member
  • *****
  • Posts: 810
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 2.06 and FPC 3.0.4
OS: Windows 10 64 bit

mr-highball

  • Full Member
  • ***
  • Posts: 179
    • 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: 10271
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 »
I am more like donkey than shrek

 

TinyPortal © 2005-2018