caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jurjen Stellingwerff <jurjen@stwerff.xs4all.nl>
To: caml <caml-list@inria.fr>
Subject: Re: [Caml-list] HTTP-server written in ocaml
Date: 13 Jun 2003 15:06:27 +0200	[thread overview]
Message-ID: <1055509587.4444.20.camel@jurjen.stwerff.xs4all.nl> (raw)
In-Reply-To: <3EE9B27B.1080709@socialtools.net>

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...

Jurjen


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2003-06-13 13:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-13 11:16 Benjamin Geer
2003-06-13 13:06 ` Jurjen Stellingwerff [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-06-13 13:45 Benjamin Geer
2003-06-11 10:02 Jurjen Stellingwerff
2003-06-11 15:07 ` Ken Rose
2003-06-11 16:02   ` Jurjen Stellingwerff
2003-06-11 16:07   ` Jurjen Stellingwerff
2003-06-11 16:54   ` Owen Gunden
2003-06-11 18:28     ` Ken Rose

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1055509587.4444.20.camel@jurjen.stwerff.xs4all.nl \
    --to=jurjen@stwerff.xs4all.nl \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).