Tntnet users guide Tntnet users guide Authors Tommi M? kitalo Andreas Welchlin Tntnet users guide CTable of contents Concept Installing Tntnet Create a simple application with Tntnet C -content processing expressions conditional expressions Query-argument
Tntnet users guide Authors Tommi M? kitalo Andreas Welchlin Tntnet users guide CTable of contents Concept Installing Tntnet Create a simple application with Tntnet C -content processing expressions conditional expressions Query-arguments scalar vector untyped typed default-value Components Component- parameters Returning from components Calling components dynamic static Calling components from c Include ecpp- ?les Declaring subcomponents Passing parameters to components De ?ning scoped variables Lifetime Scope Cookies Component attributes Con ?guration Accessing con ?guration variables Logging Exception handling Savepoints Binary content Upload HTTP- Auth Using c - classes Creating stand alone web applications Some notes about multi threading Tntnet users guide C Concept Tntnet is a application server for web applications written in c A web application in tntnet is written with a template-language which embeds c processing-instructions in html-pages You can use external classes or libraries in these pages That way programmers can concentrate on the htmlresult when creating content and put processing in c -classes Applications written with the template-language called ecpp are compiled into c -classes and linked into a dynamically loaded shared library This is done at compile-time ?? not at runtime like other template-systems often do On runtime there is no compiler needed Installing Tntnet Tntnet runs on Linux Unix You need a c -compiler to compile Tntnet and also to compile your web applications As a prerequisite cxxtools which is available through the Tntnet-homepage http www tntnet org is needed Cxxtools is a collection of useful c -classes To install tntnet you have to install cxxtools unpack the sources with ??tar xzf tntnet-version tar gz ? cd to the source-directory ??cd tntnet-version tar gz ? run ?? con ?gure ? run ??make ? run ??make install ? This installs The application server and tools for tntnet ?? the web application server ecppc ?? the ecpp-compiler ecppl ?? the ecpp-language-extractor for internationalization ecppll ?? the ecpp-language-linker for internationalization some shared libraries tntnet-con ?g ?? a script which gives you information about the installed Tntnet and helps you setting up a simple project Create a simple application with Tntnet The simplest way to create a tntnet-application is to use the tntnet-con ?gscript Just run ??tntnet-con ?g ?? project projectname ? This creates a directory with the name of the project and projectname ecpp ?? your ?rst ecpp- ?le Make ?le ?? a simple make ?le to build the application tntnet conf ?? a basic con ?guration ?le for tntnet Tntnet users guide C tntnet properties ?? a basic con ?guration ?le for logging-con ?guration It used to be necessary to use a valid C -class name as a project name since it was used as a class name internally This is not true for tntnet any more To build the project change to the directory and run ??make ? This runs the necessary steps to create a running application You get a shared library projectname so which contains the web application To run it enter ??tntnet tntnet conf ? and navigate your browser to http localhost projectname
Documents similaires










-
62
-
0
-
0
Licence et utilisation
Gratuit pour un usage personnel Aucune attribution requise- Détails
- Publié le Aoû 17, 2021
- Catégorie Philosophy / Philo...
- Langue French
- Taille du fichier 105.7kB