Separation of content and code for web (was Re: Python for web ?)
Richie Hindle
richie at entrian.com
Tue Dec 2 02:49:42 EST 2003
[Peter]
> By far the most rigorous separation that I've seen to date, and one
> we're experimenting with more right now, is to have a pure-HTML (or XHTML)
> web page with *no* code or funky little embedded crap of any kind at
> all, and rely exclusively on "id" attributes on the dynamic parts.
>
> The code is built to work on the appropriate ids, generally working with
> an in-memory model of the data, with serialization back to [X]HTML
> when the job is done.
>
> Web folks get their HTML page without code, programmers get nice
> code without embedded HMTL, and everyone is happy.
> [...]
> Anyone know of a Python-based approach using the same core concept?
You've just described PyMeld (www.entrian.com/PyMeld) better than I ever
have. May I replace my web page with your post? 8-)
(Note that PyMeld's performance can stink with large page, but there are
ways around that - mail me for more info if PyMeld looks like a good fit
for you. I'll probably create a wiki for it if there's the demand, and
put up some hints and tips there.)
--
Richie Hindle
richie at entrian.com
More information about the Python-list
mailing list