Search the web
Sign In
New User? Sign Up
ClearSilver
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
ClearSilver for C CGI bindings   Message List  
Reply | Forward Message #1226 of 1347 |
Re: ClearSilver for C CGI bindings

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/




Wed Nov 12, 2008 11:19 pm

blong42
Offline Offline
Send Email Send Email

Forward
Message #1226 of 1347 |
Expand Messages Author Sort by Date

Hey everyone, 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/...
Liran Tal
L.Tal@...
Send Email
Nov 12, 2008
4:18 pm

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...
David Jeske
jeskeca
Offline Send Email
Nov 12, 2008
4:37 pm

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...
Brandon Long
blong42
Offline Send Email
Nov 12, 2008
11:19 pm

I would love to hear about other "live" examples implemented in C for ClearSilver usage as it's what we are going for. In regards to the model, we're talking...
Liran Tal
L.Tal@...
Send Email
Nov 13, 2008
12:31 pm

... Well, we're using it exactly for such purpose. Currently our web-interface has over a hundred pages and we use it almost to its full potential. Despite a...
Nikolai Kondrashov
nikolai.kond...
Offline Send Email
Nov 13, 2008
12:47 pm

Hey Nikolai, Our permissions and authentications are controlled via the htpasswd/htaccess utility which is very common to Apache-style web servers. Could you...
Liran Tal
L.Tal@...
Send Email
Nov 13, 2008
2:33 pm

... Yes, it is great unless you need session control and complex authentication and access control logic. ... No, we're using clean URL's and receiving paths...
Nikolai Kondrashov
nikolai.kond...
Offline Send Email
Nov 13, 2008
2:42 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help