Website framework

William Park opengeometry-FFYn/CNdgSA at public.gmane.org
Tue Apr 27 05:36:03 UTC 2004


On Mon, Apr 26, 2004 at 10:49:53PM -0400, Sidney Shapiro wrote:
> > There isn't that much at johnkerry.com.  So, you would be better off
> > to do it manually.  Lots of <h2>, <blockquote>, <ul>, ... :-)
> 
> While its true John Kerry does have a very minimalistic site with
> little in the way of framework and tons of content, he seems to have a
> legion of supporters populating the site. We have perhaps five percent
> of the content he does, so we will be filling the site with media,
> video clips, press releases, etc. When things start warming up
> regarding the election, we will be running a blog, schedule, photo
> slide show, etc.


By "manual", I mean manual writing of individual HTML sections, but
automatic generation of final format using scripts.  Untold number of
manhour have gone into filesystem.  So, it's not a bad place to store
data and implement data structure.


For example, 2nd section in left column of <johnkerry.com> is
    GET INFORMED
	About John
	About Teresa
	On the Issues
	...
which are links to sub-directories,
    <a href="about/">About John</a>
    <a href="about_teresa/">About Teresa</a>
    <a href="issues/">On the Issues</a>
    ...
And, if you click 'On_the_Issues', you get bunch of subsections
    John Kerry on the Issues
	...
    Restoring Jobs and Rebuilding Our Economy
	...
    Winning the Peace in Iraq
	...
in the centre column, and list of links
    100 Days to Change America
    Agriculture
    AIDS
    ...
in the right column.  This kind of nested web content can be effectively
modelled by filesystem, ie.
    GET_INFORMED/
    GET_INFORMED/On_the_Issues/
    GET_INFORMED/On_the_Issues/Restoring_Jobs_and_Rebuilding_Our_Economy/
    ...


This way, you don't need to install anything or learn any new language,
because you already have filesystem and already know shell/editor.  For
example, to generate HTML code for GET_INFORMED section,
    cd GET_INFORMED
    printf '<h2>%s</h2>\n' `basename $PWD`
    for i in */; do
	i=${i//_/ }
	printf '<a href="%s">%s</a>\n' "$i" "${i%/}"
    done
This script can be located locally under GET_INFORMED directory, because
it's responsible for only GET_INFORMED directory.  This is reminicent of
OO-like object.method() of Python or Ruby, except you use
directory/script instead.  You would generate 'index.html' for each
directory by calling 'script' in that directory, because only that
directory "knows" what kind of data are contained there.


No disrespect to PHP guys... :-)

-- 
William Park, Open Geometry Consulting, <opengeometry-FFYn/CNdgSA at public.gmane.org>
Linux solution/training/migration, Thin-client
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list