From: Fred Yankowski <fred@ontosys.com>
Cc: "'Liste CAML'" <caml-list@inria.fr>
Subject: Re: mixing different languages (was: RE: [Caml-list] dynamic HTML pages)
Date: Wed, 9 Apr 2003 12:03:09 -0500 [thread overview]
Message-ID: <20030409170309.GA30017@ontosoft.com> (raw)
In-Reply-To: <Pine.GSO.4.03.10304081419350.18287-100000@basilic.ens.fr>
On Tue, Apr 08, 2003 at 02:28:50PM +0200, David Monniaux wrote:
> Are there any text editors that are aware of such mixed programs?
Emacs has an available MMM package -- Multiple Major Modes -- that
applies different modes to different sections of any given file based
on patterns that define the different language regions. It works
fairly well with, for example, PHP code embedded in HTML, presenting
the PHP code with php-mode and the HTML code with an html mode, using
the font-coloring and other mode-specific view and behavior specific
to each mode in the particular regions.
That said, I now try for a strict separation of imperative code and
HTML code, so that my HTML template files have no language specific
code and contain only formal parameters and markings of optional and
repeated blocks of HTML content. I haven't used OCaml to generate
HTML pages, but that's the approach I would want there too.
The "Zope Page Templates" used in the Zope/python webserver framework
are particularly elegant implementation of this approach, doing all
templating in a slightly enhanced version of XHTML. But they are slow
(absent caching) because of the XML parsing required.
--
Fred Yankowski fred@ontosys.com tel: +1.630.879.1312
OntoSys, Inc PGP keyID: 7B449345 fax: +1.630.879.1370
www.ontosys.com 38W242 Deerpath Rd, Batavia, IL 60510-9461, USA
-------------------
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
next prev parent reply other threads:[~2003-04-09 17:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-08 7:27 [Caml-list] dynamic HTML pages David Monniaux
2003-04-08 9:19 ` Maxence Guesdon
2003-04-08 11:59 ` Mattias Waldau
2003-04-08 12:28 ` mixing different languages (was: RE: [Caml-list] dynamic HTML pages) David Monniaux
2003-04-09 17:03 ` Fred Yankowski [this message]
2003-04-09 17:24 ` Brian Skahan
2003-04-10 7:20 ` Christian Lindig
2003-04-13 14:01 ` Pierre Weis
2003-04-09 18:12 ` Miles Egan
2003-04-09 23:00 ` Jeff Henrikson
2003-04-10 0:19 ` Miles Egan
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=20030409170309.GA30017@ontosoft.com \
--to=fred@ontosys.com \
--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