fatPage picture
Home
About
FAQ
Developing
Outline
Frontier
News

Importing Large Objects

For small things, like a simple verb or a suite, or even a moderate sized website, a single fat page is a very sensible way to go. It may use a lot of memory to load it (that's getting better in 5.0.1, by the way) but it's easy, both for the publisher and for the user.

But some things are so large that they can't be installed thru thru a single fat page. For example, I want to release the full source to the Scripting News website, but if I released it as a single fat page, it would require many megabytes of RAM to read it.

So we solved the problem another way, with export.importFolder.

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, install it from this page.

The Scripting News website

This is a large object!

It contains all the back issues of the Scripting News home page, the Mail site, all the articles, the System site, and the scripts that build the site.

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 zip or binhex 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 names of the files 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!

Changes

It needed an update to work with Frontier 5. It was strictly Mac-only, couldn't read fat pages files, and had calls to verbs that were moved in version 5. Further, there was a flaw in its design.

The design flaw: It was relying on the folder names to build the structure of tables, but there are limits on folder names that don't apply to table names, so you couldn't fully represent an odb structure if we depended on the folder names. Luckily the full address of the object is stored in the fat pages format, so the new version of export.importFolder just reads every file in and imports it.

It's a verb

You can call it from the Quick Script window, or from an installer script, or from a menu item or an agent, where ever it makes sense.

It takes one parameter, the folder you want to import.

The other side

export.sendFolder creates folders that can be read by export.importFolder.

It's included in the latest root update. Please use this verb to create folders to be imported by export.importFolder.


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 2/26/98; 10:18:48 AM. dave@scripting.com.