caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Alain Frisch <frisch@clipper.ens.fr>
To: Tom Hirschowitz <Tom.Hirschowitz@inria.fr>
Cc: Jimmie Houchin <jhouchin@texoma.net>, caml-list@inria.fr
Subject: Re: [Caml-list] Web Development with OCaml
Date: Tue, 10 Jul 2001 11:38:27 +0200 (MET DST)	[thread overview]
Message-ID: <Pine.GSO.4.04.10107100957200.23057-100000@clipper.ens.fr> (raw)
In-Reply-To: <15178.43908.65157.635940@paille.inria.fr>

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


  parent reply	other threads:[~2001-07-10  9:38 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-10  0:01 Jimmie Houchin
2001-07-10  7:10 ` Jean-Christophe Filliatre
2001-07-10  7:15 ` Tom Hirschowitz
2001-07-10  8:19   ` David Mentre
2001-07-10  9:38   ` Alain Frisch [this message]
2001-07-11  5:49     ` Jimmie Houchin
2001-07-11  6:03       ` Alexander V. Voinov
2001-07-11 14:47         ` Jimmie Houchin
2001-07-12  1:58           ` John Max Skaller
2001-07-11  6:19       ` Alain Frisch
2001-07-11  9:09         ` Samuel Heriard Dubreuil
2001-07-11 14:11           ` Jimmie Houchin
2001-07-11 15:35       ` Francois Rouaix
2001-07-11 20:44         ` Gerd Stolpmann
2001-07-12  2:32         ` Jimmie Houchin
2001-07-13  5:37       ` William Chesters
2001-07-13 10:29         ` Alain Frisch
2001-07-13 11:16           ` Vitaly Lugovsky
2001-07-13 14:04             ` Xavier Leroy
2001-07-13 17:08               ` [web-caml] " Vitaly Lugovsky
2001-07-15 18:03               ` Ari Heitner
2001-07-15 20:19                 ` Gerd Stolpmann
2001-07-16  8:23                 ` wakita
2001-07-17 16:18                 ` John Max Skaller
2001-07-17 18:50                   ` Ari Heitner
2001-07-18 22:24                     ` John Max Skaller
2001-07-13 16:12           ` Lyn A Headley
2001-07-13 17:50             ` William Chesters
2001-07-13 16:51           ` Miles Egan
2001-07-13 18:12           ` Jimmie Houchin

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=Pine.GSO.4.04.10107100957200.23057-100000@clipper.ens.fr \
    --to=frisch@clipper.ens.fr \
    --cc=Tom.Hirschowitz@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=jhouchin@texoma.net \
    /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).