Home
About
Agents
CGIs
Mac
Macros
Misc
Stories
Suites
Websites
Outline
Frontier
Scripting

Scripting News Website

I'm trawling around my hard disk looking for websites that would be interesting to people who are learning Frontier or who want to learn more about Frontier.

People approach it from all points of view, some are web developers learning about programming, other people are programmers learning about websites.

Scripting News

The best example I have of a website that uses much of the programming power in Frontier's web content management system is the Scripting News site. It's evolved over the last eleven months, and it's kind of in a groove. It's a good example for people who are serious about using Frontier to manage a quickly evolving site. I couldn't do Scripting News if I had to do it by hand. Here's how I do it.

Reviewing the source code I see Daveisms all over the place, things I'd like to clean up, but decided not to do it. This is a working website, a work in progress. You're familiar with the user interface presumably, if you watch Scripting News regularly. Now, if you know Frontier, or you're learning Frontier, you can see what it looks like from my side of the interface.

The installation of this website is a little complex because it is so large.

export.importFolder

For small things, like a simple verb or a suite, or even a moderate sized website, a single fat page is a sensible way to go. But some things are so large that they can't be installed thru thru a single fat page. If I released the full source to the Scripting News website as a single fat page, it would require many megabytes of RAM to load it. We're addressing these problems in 5.0.1 and in future versions. In the meantime, we solved the problem another way, with export.importFolder.

This is a fat page containing a single script, export.importFolder. If you've been in the root updates process, you already have a new version of this script. If not, please install it from this page.

How to install the Scripting News website

  1. Install the current version of export.importFolder from this page.

  2. Download the Scripting News archive in either WinZip or StuffIt form.

  3. Open the About Frontier window. (On Windows it's the first item in the Help menu, on the Mac it's the first item in the Apple menu.)

  4. Choose Quick Script from Frontier's Main menu.

  5. Type a one line script into the Quick Script window.

    Call export.importFolder, providing the full path to the folder that contains the archive downloaded in step 2. Here's an example:

    export.importFolder ("Macintosh HD:scriptingNews:")

    For Windows:

    export.importFolder ("D:\\scriptingNews\\")

  6. Run the script, by clicking on the Run button in the Quick Script window. It may take a minute or more to load the website. As it runs, you'll see the addresses of the objects in the About window. When it's finished, you'll have an exact copy of the Scripting News website in your database. Hopefully that's a sufficient incentive for all this work!

Poking around

The website loads into root.dweb.home. It's got many of the features of a typical Frontier-based website. Some unusual things:

  • In dweb.home.["#filters"].finalFilter, if it's running on a Mac, we send a message to WebSTAR to flush its cache. If we're building the home page, we send a message to Vignette's server to flush its cache. (We worked out a deal with their sysop, so that they wouldn't have to hit our server every time someone came into Scripting News thru their site.)

  • The home page, dweb.home.default is a complex script, that calls many other support scripts in dweb.home table.

  • Most of the content is in two tables, 97 and 98. Most of them are outlines. I have a command in my Custom menu that opens the current day's outline. One other command builds the default page, which assembles the bits from the last seven days of outlines.

  • Many of the constant elements of the website are defined in dweb.home.config.

  • dweb.home.config.cache makes things faster. If an outline hasn't changed since the last time the home page was rendered, it just takes the text from the cache instead of re-generating it.

  • The colors for the home page come from dweb.home.colors. Right now I have it set up as just plain gainsboro for every day. If I'm feeling more festive, I use dweb.home.colorsBright.

  • Want to see how the XML version of Scripting News is generated?

    Check out dweb.home.tools.scriptingNewsToXML.

    It's called from dweb.home.getDayText which is called from dweb.home.default, which is the home page. It uses the same caching scheme as the HTML version, the XML for a page doesn't get generated unless the outline for the day changed.

Questions?

Send questions to dave@scripting.com in the next few days.

I'll try to answer them on this page.

Dave Winer
2/26/98


This is a fat web page containing export.importFolder. More info on fat pages here.

© copyright 1997-98 UserLand Software. This page was originally posted on 2/26/98; 8:12:31 AM and it was last built on 9/11/98; 9:23:51 AM. Webmaster: dave@userland.com.