C++ HTML Template Framework, Templatizing Library, HTML Generator Library

C++ HTML template framework, templatizing library, HTML generator library

A quick review of the mentioned project.

http://rgrz.tumblr.com/post/13808947359/review-of-html-template-engines-in-c-language

ClearSilver

  • Site: http://www.clearsilver.net
  • Project: https://code.google.com/p/clearsilver/
  • Group: http://tech.groups.yahoo.com/group/ClearSilver
  • License: New BSD License
  • Language: C
  • Last Update: Nov 28, 2011
  • Last Release: 0.10.5 on July 12, 2007
  • Document: Rich
  • Community: Medium (<10 discussion per month)

Teng

  • Site: http://teng.sourceforge.net
  • Code: http://teng.svn.sourceforge.net/teng/
  • Group: http://sourceforge.net/projects/teng/
  • License: New BSD License
  • Language: C++
  • Binding: php, python
  • Last Update: Mar 8, 2011
  • Last Release: 2.1.1 on Mar 8, 2011
  • Document: Rich
  • Community: Low (rare discussion since 2010)

Templatizer

  • Site: http://www.lazarusid.com/libtemplate.shtml
  • Project: download only
  • Group: none
  • License: free to use
  • Language: C (low level)/C++ (interface) mixed
  • Last Update: unknown
  • Last Release: unknown
  • Document: none
  • Community: none

HTML Template C++

  • Site: http://nulidex.com/code/docs/html_template/
  • Project: http://sourceforge.net/projects/htmltemplatec
  • Group: http://sourceforge.net/projects/htmltemplatec
  • License: GPL
  • Language: C++
  • Last Update: Mar 27, 2011
  • Last Release: Beta 0.7.4, Mar 27, 2011
  • Document: Medium
  • Community: none

ctpp

  • Site: http://ctpp.havoc.ru/en/
  • Project: download only
  • Group: none
  • License: BSD License
  • Language: C++ with C API
  • Last Update: Oct 5, 2011
  • Last Release: Version 2.7.2 on Oct 5, 2011
  • Document: Rich
  • Community: none

Wt

  • Site: http://www.webtoolkit.eu/wt/
  • Project: http://www.webtoolkit.eu/wt/
  • Group: http://www.webtoolkit.eu/wt/community
  • License: GPL and Commercial
  • Language: C++
  • Last Update: Nov 29, 2011
  • Last Release: 3.2.0 on Nov 29, 2011
  • Document: Rich
  • Community: Low (rare activity)

Flate

  • Site: http://flate.dead-inside.org/
  • Project: none
  • Group: none
  • License: LGPL v2.1
  • Language: C
  • Last Update: Sep 4, 2010
  • Last Release: 2.0 on Sep 4, 2010
  • Document: Poor
  • Community: none

Jinja2C++

  • Site: https://jinja2cpp.dev
  • Project: https://github.com/jinja2cpp
  • Group: https://gitter.im/Jinja2Cpp/Lobby
  • Conan packages: https://bintray.com/beta/#/flexferrum/conan-packages/jinja2cpp:flexferrum?tab=overview
  • License: MPL-2.0
  • Language: C++14/17
  • Last Update: Oct 01, 2019
  • Last Release: 1.0.0 on Oct 01, 2019
  • Document: Moderate
  • Community: none

What's a good HTML template engine for C++?

Wt (pronounced 'witty') is a C++ library and application server for developing and deploying web applications. It is not a 'framework', which enforces a way of programming, but a library.

Out of the box HTML templates for Qt 5

Its not out of the box but i choose to use QCTemplate form http://code.google.com/p/qctemplate/

I made it with "qt-mustache" http://kdemonkey.blogspot.com/2012/08/qt-mustache-templating-library.html

Create HTML reports using C++

A quick way to do it is simply writing the html tags as strings.
Here's an example

    ofstream myfile;
myfile.open ("C:\\report.html");
myfile << "<!DOCTYPE html><html><head></head><body>"; //starting html

//add some html content
//as an example: if you have array of objects featuring the properties name & value, you can print out a new line for each property pairs like this:
for (int i=0; i< reportData.length(); i++)
myfile << "<p><span style='font-weight: bold'>" << reportData[i].name << "</span><span>" << reportData[i].value << "</span></p>";

//ending html
myfile << "</body></html>";
myfile.close();

Edit: updated code

Are there any web frameworks for compiled languages like C++?

If I were you, I would give Wt a try. I don't think you will find another solution as complete and easy to use as Wt with similar performance. The mailinglist are active, and has regular posts of people who use it on embedded devices. The Wiki (here) of the project mentions some numbers for embedded deployment and performance on ARM.

How do I Parse an HTML file in CGI application and modify its contents? C++

What you're asking for is generally called a templating engine - read the almost-HTML with special tags in it, interpret the tags. Frameworks like PHP were invented specifically for this kind of thing. Ditch C++, use PHP.



Related Topics



Leave a reply



Submit