wendzel.de

Postings in "Software-Projekte":


Tutorial: Notebook Battery State in Fluxbox
WendzelNNTPd-1.4.6 released!
WendzelNNTPd MySQL support
WendzelNNTPd RBAC (Role Based Access Control)
WendzelNNTPd Development
WendzelNNTPd-1.4.5 released!
WendzelNNTPd-1.4.4 released!
WendzelNNTPd-1.4.3 released!
Erstes Fitness-Center für inmolibre :)
Convert old WendzelNNTPd databases to the new format
WendzelNNTPd-1.4.2 released!
Premiere für Onlefant.com -- die einfache Haustier-Community!
Webgallerien mit create_gallery und der Shell erstellen
Creating web mirrors for newsgroups and mailing lists
WendzelNNTPd-1.4.1 released!
AstroCam-2.7.5 released!
WendzelNNTPd-1.4.0 released
WendzelNNTPd-1.3.0 released
WendzelNNTPd-1.2.1 released, 2.0.0-dev started
New Project: Korallenriff
xyriadnsd-0.8.0pre3
Hardened Linux Project: EOL
AstroCam-2.7.4 released!
AstroCam-2.7.3 and WendzelNNTPd-1.2.0 released!
C Web API (cwa) (update)
News: C Web API (cwa)
C-Web-Development: Part Two
Back from death: XyriaDNSd
Current OSS-Project: C Web Development System
C(++) Web Application Framework?
AstroCam-2.7.2 released


RSS Feed



Follow cdp_xe on Twitter
 
News: C Web API (cwa)

I still work on this cool new C web development API.

Autor/Author: Steffen Wendzel Dipl.-Inform. (FH) Steffen Wendzel (Date/Datum: 080411-15:36, Hits: 1213)

Yup, I still work on it and here is what is already implemented: The most important thing you should know is that the whole idea is different from everything I posted before. I think this way is simply better ...

In the old system my own self-written webserver software was needed to execute "C code modules". Now I use FastCGI what runs with Apache, IIS, lighttpd, MyServer and many more. FastCGI is a high performance interface similar to CGI but much faster since it executes applications only once (instead of calling the app for every request).

It will be easy!

The problem is: Programming C applications using FastCGI is difficult (you have to parse the query string to get your parameters and the like). My API currently only provides a minimal set of functions similar to PHP what makes the web development in C MUCH easier. (But more functions will follow!)

For example: In PHP you can receive a variable using

$var = $_GET['var'];
if (isset($var))
   ...

With the C Web API you can do something similar:

char *var = cwa_get_var("var");
if (isset(var))
    ...

Cool, isn't it?

C embedded in HTML

But there is not only the API, there is also a tool what makes it possibly to write a PHP-like HTML-C-Mix. This tool is named cwahtml. Here is an example website based on my C Web API (cwa) I wrote:

To generate a normal C code, one has to run cwahtml first:

cwahtml input.c output.c

And then simply compiling it to a fcgi executable:

gcc -o sample.fcgi output.c -lfcgi

And yes, you need a webserver that is configured to serve FastCGI (e.g. mod_fastcgi for Apache).

Here is the output of the script:

I think I can put the first snapshot version online within the next weeks ...

PS. It would be cool to receive ideas and wishes from you!

-----------------------------
EDIT (Apr-13-2008 00:49)

I just added HTTP URL decoding:


____________
Tags: C | Web |
Bookmark and Share


____

Kommentar verfassen / Post a comment:

Name:
Enter this Security Code:


 
Current Books


Einstieg in Linux



Linux. Das umfassende Handbuch