What is Cloudgizer?

Cloudgizer is
a Free Open Source framework for C web development.

Cloudgizer (CLD) is licensed under Apache v2 license.

CLD's goal is to combine ease of use of scripting languages with high performance and small footprint of C, with emphasis on simpler and safer development.

Hello World

Here's a Hello World in CLD (read data from the database and display in the browser):

Code:
#include "cld.h"

void home()
{
   /*<

    output-http-header

    Hello World!

    run-query#get_db="select someColumn from someTable"

        query-result#get_db, someColumn as define some_column

        print-web some_column

        <br/>

   end-query
   <hr/>

   >*/
}
CLD code is within /*<and >*/ comments. Outputting HTML/CSS/Javascript... is as simple as writing it in plain text.

Common web development tasks are made easy. For example:

Code:
#include "cld.h

void cld_handle_request()
{
  /*<
  input-param page
  
  if-string page="stock"
     c stock ();
  else
     report-error "Unrecognized page %s",page
  end-if
  >*/
}
The above is a typical CLD request handler for a URL request such as:

Code:
server.com/app.go?page=stock
By using input-param markup,you obtain URL input data (GET or POST). Upload of files is handled automatically in a similar fashion. 'c' markup allows you to call C code from within a CLD block.

How it works

CLD works by generating C code for markups such as run-query, query-result, print-web etc. It also generates infrastructure code, such as the main function,integration with Apache, memory garbage collection etc. Your application is an Apache module in a pre-fork configuration.

The markups (such as run-query) do useful things such as web functionality, database programming, memory management,encoding/encryption, emails and files, executing programs, safe string manipulation etc.

Included is memory overwrite/underwrite detection, a memory garbage collection and a tracing system. You're likely not going to need to free memory most of the time in CLD. Program crash produces full source code stack that is emailed to you as it happens, which is handy in development,QA and production. You can lint your XHTML code at run-time. These,and other things built into CLD, help you avoid mistakes and make debugging easier.

Your application can run both as a web application or as a command line utility.

Also provided is application packaging,making deployment and testing easier and more reliable. To create installation file, use:

Code:
cldpackapp
and to install (create or upgrade) application, use:

Code:
cldgoapp
CLD works with Apache, MariaDB and RedHat/Centos Linux.

Get started

The Example application is included with CLD. It sets up the environment for your application project. It contains lots of example code that also serves as a smoke test.

If you'd like more real-world examples, check out Rentomy , a free open source software for Residential Rental Property Management. It's written entirely in CLD, with about 32,000 lines of code. Source code (git) is at zigguro / Rentomy — Bitbucket.

Source code for CLD and the Example application are at zigguro / cloudgizer — Bitbucket and zigguro / cloudgizer_example — Bitbucket

The web site with installation instructions, examples, documentation,downloads etc. is at

http://zigguro.org/cloudgizer/

-Sergio Mijares