From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA24990; Fri, 13 Jun 2003 15:06:33 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA24527 for ; Fri, 13 Jun 2003 15:06:32 +0200 (MET DST) Received: from iconnect5rc2.stwerff.xs4all.nl (stwerff.xs4all.nl [213.84.145.135]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h5DD6VH19585 for ; Fri, 13 Jun 2003 15:06:31 +0200 (MET DST) Received: by iconnect5rc2.stwerff.xs4all.nl (Postfix, from userid 501) id 4160559DA9; Fri, 13 Jun 2003 15:13:39 +0200 (CEST) Received: from jurjen.stwerff.xs4all.nl (unknown [192.168.99.10]) by iconnect5rc2.stwerff.xs4all.nl (Postfix) with ESMTP id 0161C59DA2 for ; Fri, 13 Jun 2003 15:13:35 +0200 (CEST) Subject: Re: [Caml-list] HTTP-server written in ocaml From: Jurjen Stellingwerff To: caml In-Reply-To: <3EE9B27B.1080709@socialtools.net> References: <3EE9B27B.1080709@socialtools.net> Message-Id: <1055509587.4444.20.camel@jurjen.stwerff.xs4all.nl> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.3.92 (Preview Release) Date: 13 Jun 2003 15:06:27 +0200 X-Securityscan: Advanced E-mailfilter on Iconnect-firewall. Contact fwsupport@jonkers.nl for more information. Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; caml-list:01 templating:01 expr:01 text-file:01 abstraction:01 charm:01 linked:01 ocaml:01 preprocessor:02 syntax:02 commands:97 wrote:03 converts:03 bunch:03 functions:05 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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 ... 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 will then become > 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