vinipsmaker / tufao

An asynchronous web framework for C++ built on top of Qt
http://vinipsmaker.github.io/tufao/
GNU Lesser General Public License v2.1
591 stars 179 forks source link
c-plus-plus http http-server qt qt-network

!!! I can no longer maintain this project. If you're interessed, please contact me and I can move the projetct to you !!!

Tufão - an asynchronous web framework for C++ built on top of Qt

Join the chat at https://gitter.im/vinipsmaker/tufao

Tufão is a web framework for C++ that makes use of Qt's object communication system (signals & slots). It features:

You can generate documentation from the source code using Doxygen. The documentation will be put on the doc folder in the html and tex formats. There is also experimental support for Qt compressed help files.

LICENSE

The library is under the LGPLv2 and public header files, documentation and examples are under MIT license.

The Tufão logo is licensed under [Creative Commons Attribution 3.0 Unported] (http://creativecommons.org/licenses/by/3.0/).

The library is dynamic linked against Qt and include code from Boost.Http parser. Qt library is licensed under LGPL and Boost.Http is licensed under the Boost Software License.

So, you can create commercial applications (the only restriction is that if you do any modifications to Tufão, these modifications must be redistributed).

Getting dependencies

$ git submodule update --init

BUILD

Make sure you have Qt and CMake installed and with the PATH to its executables set, then create a folder for the build and, from there, run:

$ cmake OPTIONS path_to_source_dir
$ make MAKEOPTIONS

OPTIONS can be null or have a combination of the following values:

OPTIONS available on Windows:

MAKEOPTIONS can be null or have a combination of the following values:

Example:

$ cmake -DCMAKE_INSTALL_PREFIX=/usr
$ make DESTDIR=pkg install

NOTE: Qt 5.0 or later is required for 1.x series. Qt 4.7 or later is required to 0.x series.

NOTE: If you intend to create a CPack-based installer, just run:

# To create a binary distribution:
cpack -C CPackConfig.cmake

# To create a source distribution:
cpack -C CPackSourceConfig.cmake

# To create a Windows NSIS-based installer:
cpack -GNSIS

Documentation

To generate the documentation, just run doxygen using Doxyfile as configuration file and the documentation will be generated in the folder doc. The documentation is available in the following formats:

Tests

Tufão also have a lot of code to test its correctness. These codes are based on QTestLib and generate self-contained executables. There is also some CTest rules and integration with the CMake build. To run the tests, just execute:

make tests

Or, if you don't want to use Makefiles:

ctest

In Visual Studio, the target _RUNTESTS is created.

CTest integrates with CDash to allow developers to centralize the tests result. You can send the results to CDash running the Experimental target:

make Experimental

You can see the Tufão testing log at Tufao CDash project's page.

INSTALL

The default install prefix is /usr/local, if you don't intend to change it, just run, after build:

# make install

To install to a different prefix, run:

$ cmake -DCMAKE_INSTALL_PREFIX=${DESTDIR}
$ make install

NOTE: You may need to run ldconfig after installation depending on your system.

USAGE

To use Tufão in your Qt projects, just edit your .pro file and add the line:

CONFIG += C++11 TUFAO1

You can find some examples in the examples folder.

If you're planning to use OS X, then the following line is also required, as reported by some users:

QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7

Tufão has PKG-CONFIG support also. Its module name is 'tufao1'.

If you want use Tufão in other build system, just add the compiler option -ltufao1.

You can also see Tufão documentation integrated in QtAssistant.

NEWS

Version 1.4

Version 1.3

Version 1.2

Version 1.1

Version 1.0

Version 0.6:

Version 0.5:

Version 0.4:

Version 0.3

Version 0.2:

ROADMAP

Here is a small roadmap for Tufão:

1.4:

1.5: