From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <3EDB7782.9020708@proweb.co.uk> From: matt User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3) Gecko/20030425 MIME-Version: 1.0 To: 9fans@cse.psu.edu Subject: Re: [9fans] httpd scripting References: <3EDB4C63.5080902@proweb.co.uk> <20030602163818.316ebbf5.spam@broster.co.uk> In-Reply-To: <20030602163818.316ebbf5.spam@broster.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 2 Jun 2003 17:12:50 +0100 Topicbox-Message-UUID: c2ba976c-eacb-11e9-9e20-41e7f4b1d025 > > >My thought is to try to raise the abstraction higher. >Here's how I'd like to code a server generated page. > >int some_data[5][5]; /*eg*/ >create_my data(some_data); >... >{ > new_web_page(template); > add(some_data, how_to_add_intgers); > add(sometext, how_to_add_text); > ... > done(); /* composes the page and writes it out*/ >} > > that's kind of how I do it add_head_item(''); $this->add_head_item(''); $this->add_h1('useful links'); $this->add_anchor('plan 9 homepage', array('href'=>'http://plan9.bell-labs.com/plan9', 'target'=>'_blank'); echo $this->get(); ?> and out pops a valid, well formatted html document I've added a few things to it over that last 6 months such that this site http://www.bigchoicemobilephones.com took about a week to build from scratch the body content sits in a directory tree outside of the webspace & the php pulls it all together