Separation of content and code for web (was Re: Python for web ?)

Bengt Richter bokr at oz.net
Mon Dec 1 14:20:55 EST 2003


On Mon, 01 Dec 2003 13:15:17 -0500, Peter Hansen <peter at engcorp.com> wrote:

>Robert Brewer wrote:
>> 
>> Jay O'Connor wrote:
>> > Same here.  I do the backend programming and usually give the
>> > designer a
>> > page (See these marks?  Don't touch them, the rest of the page is
>> > yours)  Works well because I'm *not* a graphices designer and
>> > I get much
>> > better results when I make it work and I give it to a friend
>> > to make it look good.
>> 
>> Heh. I'm trying to move into the opposite situation: I do the design and
>> give a backend programmer a page (See these marks? Touch them and them
>> only; the rest of the page is mine). Works well because the design is
>> not then driven by someone who's not a designer. :)
>
>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.
>
>I think there's a Java system where this idea was implemented best
>but the name doesn't come to mind at the moment.
>
>Anyone know of a Python-based approach using the same core concept?
>
It's been on one of my burners for a long time. I have a C++ CGI-based
version that uses an embedded ad-hoc scripting language to script the HTML transformation.
I had intended just to change the embedded scripting part to Python, but I since have had
even grander ideas (;-) so it's not done yet ;-/

I'm wondering what the best way would be to assess the market for it and how to get
a fair return for my work on that, (assuming it's really useful and easy to use).

Regards,
Bengt Richter




More information about the Python-list mailing list