Joe Beda's EightyPercent.net

Sun, 26 Jan 2003

1:05:05 PM

More details:

Each day's worth of entries will be stored in an XML file.  Schema TBD right now.

There will be a configure option for the root of the working directory of the site.  This will default to {My Documents}JoeBlogger.  Call this {Root}.  Things will look like this:

{Root}
    Config
    Site1
        Data
            EveryPage
                Bloglist.xml
                FavoriteSong.xml
                ...
            2003
                01
                    23.xml
                    26.xml
                    ...
        Templates
            RSS.xsl
            Homepage.xsl
            Day.xsl
            ...
        OtherStuff
            foo.jpg
            otherpage.htm           
        Archive
            2003
                01
                    23.html
                    26.html
        index.htm
        rss.xml
    Site2
        ...

Everything under the site dir will be uploaded.  This means that the Data, templates and anything else anyone puts in this folder will be uploaded.

The Archive, index.htm file and rss.xml file will all be generated automatically.  Every time the page generator runs, it will generate a source XML data document.  This will include the relevant days along with the all of the xml files in the EveryPage directory.  This will then be fed through the appropriate XSL sheet to generate the page. Note that this will always be an in memory XmlDocument and will probably never be persisted, except for debugging purposes.  Here is what a source doc might look like:

<JoeBloggerData>
    <EveryPage>
        <File name="Bloglist.xml">
            ... verbatim paste of bloglist.xml here
        </File>
        ... same for every file in the EveryPage dir
    </EveryDay>
    <Days>
        <Day date="Sun, 26 Jan 2003">
            ... verbatim paste of 2003/01/26.xml here
        </Day>
        ... every day relevant to this page.
    </Days>
</JoeBloggerData>

Generating a page is now the simple matter of writting an XSL stylesheet that takes this source document and produces the correct output doc.

12:32:14 PM

Here is a screen shot of what I'm currently thinking:

12:03:25 PM

Okay, here is the deal.  My weblogging software will be similar to Radio in the breakdown of client server, at least to start with.  The client will do all of the page generation and formatting and then upload the result to the server. 

However, there is still the problem where you then have one and only one computer that can produce entries.  I say we solve this by uploading the raw data and templates up to the server too.  Hell, it is just xml, right?  It will take a little more room on the server but you get these advantages:

I think this will work out nicely.  Here is my plan of attack:

  1. Write a simple XML->HTML templating engine.  I'll probably just base this on XSLT.  The input document will have all of the interesting stuff in it.  I'll make that source XML tree extensible (via enumerating the file system) so that you can create XML in any way you want (current favorite song, blog roll, etc) and have that included in any interesting page.  RSS will be a part of this from the start.
  2. Write a simple GUI to generate XML for various entries.  This will have one button generation of the site.
  3. Integrate FTP support.  I've been looking at how to do this and I don't think it will be too hard.  I think that I'm only going to support passive mode.  It would be nice if the .Net framework provide some FTP libraries out of the box.
  4. Make the FTP support smarter so that it only uploads as needed.
  5. Add more features like the calandar that Radio produces.  I'm sure I'll have a ton ideas once I get started.

I have 13 days left on my Radio free trial so I have this weekend and next weekend to get it to a stage where I can stop using radio.  I'll also have to write a importer from Radio for the few entries that I have so far.

 

Write to Eightypercent AT Bedafamily DOT com - All opinions expressed are those of Joe Beda and not of his employer, wife or guinea pig - Copyright © 2003-2004 Joe Beda, all rights reserved