Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: [Caml-list] HTTP-server written in ocaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-06-13 (13:06)
From: Jurjen Stellingwerff <jurjen@s...>
Subject: Re: [Caml-list] HTTP-server written in ocaml
On Fri, 2003-06-13 at 13:16, Benjamin Geer wrote:
> 1. A templating system can be useful for generating many things besides 
> HTML.  For example, I've used templating systems to generate email 
> (automated replies), SQL, other sorts of program source code, 
> configuration files, etc.  Therefore, if you want to provide a 
> templating system, I'd recommend making it a general-purpose one, not 
> tied to the HTTP server or to HTML.

I totally agree with this.. I have already wrote code that used
functions to automatically create script-files to convert photo's and
one to ftp a whole bunch of files.

The result of a <function name...> ... </function> can be wrote into a
file for general use. It may contain tags but doesn't have to.

>      #if ($user_is_logged_in)
>         ...
>      #else
>         ...
>      #end
To prevent people complaining about RSI I will write a internal
preprocessor that accepts this style of commands and converts them to my
tag language:
#if <expr>    will then become   <when test="<expr>">

> 3. I notice that you have some syntax for connecting to a database.  It 
> appears to be very MySQL-specific.  Also, your mechanism allows people 
> to include SQL in their templates.  This is generally considered to be 
> poor design.

When there is need I can easily write other database connections (ODBC,
postgress etc). Everything that accepts SQL code could be linked (also
those text-file SQL tools). My own favorite (MySQL) just was the first
one. And I will write others only on request, not out of boredom.

I know there are no inherent abstraction layers in my system but that is
also the charm of it. Everything is there... nothing is hidden away.
Internally this language is really quite simple and it works. I don't
need abstraction myself, and I don't want to compete with bigger
projects... it should just be an easy and fast tool.

> Hope this helps,
> Benjamin

Thank you for the remarks...


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: