The clearsilver model currently lacks a "top level" idea of how to accept
and dispatch different types of requests.
The closest we've come to releasing something like that is for python in
the examples directory: python/examples/base/CSPage.py, but even that is
actually just an example base class for a single page, which doesn't
include the "how do I route a request to a page".
One of the reasons for this is that there are a lot of ways to do
things, and a lot of the early adopters for Clearsilver did things in
wildly different ways. Some used C and had a separate CGI for each
page, some used python with a separate python script in mod_python, some
routed all requests through a single python wrapper, some weren't using
the LAMP stack at all but were compiling the code directly into their
own webserver.
The imd example is probably a pretty poor example of how one would
actually want to organize a large web app in C. I should probably work
on a better example. I had a slightly better one in C which implemented
a simple blog service, but it was for a customer and quickly became more
specific and less general than would be useful, and it depended on code
that couldn't be open sourced.
Maybe someone else on the list has a good and simple example that is
available?
Brandon
On 11/12/08 David Jeske uttered the following other thing:
> You can see an example image-server CGI written in C in the "imd" directory.
>
> The API is mostly the same in each language, so the brief tutorial written for
> the Python API should be fairly easy to mentally translate into C. Make sure
> you've checked out these pages first...
>
> http://www.clearsilver.net/docs/template_basics.hdf
> http://www.clearsilver.net/docs/intro_clearsilver.hdf
> http://www.clearsilver.net/docs/c_api.hdf
>
> Then take a look at the code in imd/imd.c. It provides a basic layout for a
> c-CGI.
>
>
> -- Liran Tal wrote:
> > The website documentation doesn't cover in great detail the C
> > programming logic to create a CGI.
> >
> > I have looked at the examples in the the cgi/ directory provided with
> > the tar.gz package although these
> >
> > are the final product and there are no examples with documented usage on
> > how to utilize the provided
> >
> > C API.
> >
> > Are there any C-specific tutorials out there one can follow?
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
--
"When life hands you lemons, ask for a bottle of Tequila and salt!"
http://www.tequilalove.com/