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 LAA20923; Tue, 10 Jul 2001 11:38:29 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA20918 for ; Tue, 10 Jul 2001 11:38:29 +0200 (MET DST) Received: from nef.ens.fr (nef.ens.fr [129.199.96.32]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f6A9cSX21149; Tue, 10 Jul 2001 11:38:28 +0200 (MET DST) Received: from clipper.ens.fr (clipper-gw.ens.fr [129.199.1.22]) by nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id f6A9cRm93300 ; Tue, 10 Jul 2001 11:38:27 +0200 (CEST) Received: from localhost (frisch@localhost) by clipper.ens.fr (8.9.2/jb-1.1) id LAA11505 ; Tue, 10 Jul 2001 11:38:27 +0200 (MET DST) Date: Tue, 10 Jul 2001 11:38:27 +0200 (MET DST) From: Alain Frisch To: Tom Hirschowitz cc: Jimmie Houchin , caml-list@inria.fr Subject: Re: [Caml-list] Web Development with OCaml In-Reply-To: <15178.43908.65157.635940@paille.inria.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, 10 Jul 2001, Tom Hirschowitz wrote: > > Hi. You may have a look at the "making of" Alain Frisch's page. > > http://www.eleves.ens.fr:8080/home/frisch/realis.html Well, this is largely out-dated, and is only about producing static html pages. The method also works for dynamic content, but the issues are quite different (Jimmie asked anout "web development", which involves issues as data persistency, query to databases, application structure to handle connections; html layout of produced pages is not a central problem). I've used several different system to build my homepage. The idea was always to factor out from the documents what can be factorized (design of the site, automatic generation of indexes). Now I use my HereDoc preprocessor (http://www.eleves.ens.fr:8080/home/frisch/soft), which has system of templates (documents with holes that can be filled with the result of Caml expressions); HereDoc has nothing specific to html. The source for my homepage can be found there: http://www.eleves.ens.fr:8080/home/frisch/source As I said above, web development is more than producing html pages. OCaml has already most of the library needed: - to process CGI arguments: Netstring's Cgi module does the job - to handle connection to databases, there are several bindings to access PostgreSQL, MySQL, Oracle,.. databases - XML parser: Pxp - string manipulation and regular expressions à la Perl: Str, Pcre - this may be useful too: http://www.eleves.ens.fr:8080/home/mine/ocamlhtml - the OCaml Link Database is a good example of web application written is OCaml In addition to my static homepage, I use OCaml for almost all the dynamic content (and automatic generation of indexes) for the web server I administrate (www.eleves.ens.fr:8080). I also used OCaml to prototype quickly a semi-industrial web site which featured, among other things, many different CGI forms, cookies, connections, upload and validation of XML document, dynamic html generation from templates. It was a real pleasure to use OCaml, and made it possible to develop all these things in a few hours (the main, actually the only, problem was the lack of OCaml developpers to maintain the code). So yes, I believe that OCaml is a great tool for web development. It would be great to have some integration between Cgi, regexp manipulation, document generation, and a general application framework dealing with persistency and database connections. With Camlp4, it should be possible to define a comfortable semi-specialized syntax. Does anyone have the experience to design such a framework, and want to launch a project ? > Jimmie Houchin writes: > > Hello, > > > > I am new to OCaml and Functional programming in general. I am building a > > website and would like to know if OCaml is being used for web development. Alain Frisch ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr