Create dynamic html

in order to export some data, I want to be able to generate html output.

I have some persistent content for output, such as html headers and footers.

My question is how to deal with this? Should I embed some template (in the resource file) and parse it to make it dynamic? Do I save static content in some constant (is there a 255 char limit?) And add them when creating dynamic content?

Do you have any tips, useful links or best practices for sharing?

thanks

+4
source share
2 answers

Use Delphi TPageProducer. It generates HTML from the "close to HTML" template, which contains a special tage. You respond to this tag in the event and replace it with your own data. It works with pleasure.

+10
source

I created a Delphi project that also handles this problem. I wanted to create a web platform that uses Delphi code in the same source files as HTML, just like other web scripting platforms, but still compiles the library to run. (and automatically compiles upon change)

http://xxm.sf.net/

In its basic form, it compiles into a library that can be run by a handler for IIS (ISAPI extension), InternetExplorer (IInternetProtocol as its own URL scheme), or a stand-alone HTTP process. (Apache module and FireFix plugin are on the way).

+2
source

Source: https://habr.com/ru/post/1305548/


All Articles