Browse thread
[Caml-list] dynamic HTML pages
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Fred Yankowski <fred@o...> |
| Subject: | Re: mixing different languages (was: RE: [Caml-list] dynamic HTML pages) |
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