Back to TF Net

From: Rusty Tucker <Rusty_Tucker@spid
To: Jim DeHaven
Subject: Re: documentation
Date:Mon, January 11, 1999 12:12 PM


On 1/10/99 12:22 PM, Jim DeHaven wrote:

>In your documentation, rather than giving the absolutely simplest and
>most trivial example, why not show a real example, one that refers to a
>real directory.


The point of doing it that way is to isolate the subject at hand. When I want to know how something in MacOS or Windows works, I want to see a small example, not the source code to Finder or Word.


"Real-life" samples are also provided with TeleFinder in addition to the documentation. The "samples" directory includes the following SPML programs:

8ball
as-is
click-thru
gbook
hitcount
jump
log
mail-forms
set
wisdom


Then there are the core SPML programs that run the web bbs.

dir.spml
topic.spml
reg


Individual commands are not compared to Apache commands point by point because it is assumed that the reader has no experience with Apache XSSI. I still consider that a valid assumption, and believe that a detailed comparison as part of the documentation would be very confusing to the reader.


>lets you explicitly refer to a defined directory in apache is (again
>apparently--because there is no way to

I'm not sure how you came up with this. Apache does not have a dir_list command or equivalent.


>\When you say things like a variable lives for the life of a
>request--What is a request? how long does it live? How can anyone
>understand that kind of writing

The term "Request" is fundamental to web serving. Lifetime and scope issues are not so trivial, and your question is a good one.

Each item served is the result of a request from the client. Each request appears as separate line item in the Web Server log. That's a request.

Variables are not persistent, variables live only from the time they are created by the #set command until the end of the page or request. If the page is requested again, the variable does not exist until it is #set on the page.

Variables have a limited scope. They are not global. When you set a variable on one page they cannot be used on other pages, unless they are set there as well. So their scope is the page.

Does that help, or hurt? :)


>
>"If the path is empty ("") the requested directory is indexed."
>
>What in the world does this mean?

It seems like you've figured this out on your own. But here goes:

If the URL is

http::www.spiderisland.com/

Then the requested directory is the root of www.spiderisland.com.


If the URL is

http::www.spiderisland.com/~rusty/

Then the requested directory is the root of rusty's web space.


If the URL is

http::www.spiderisland.com/product/

Then the requested directory is the product folder in the root of www.spiderisland.com.


Also if the URL is

http::www.spiderisland.com/product/somepage.spml

Then the requested directory is still the product folder in the root of www.spiderisland.com.


Note that the first 3 requests above could be served by the dir.spml Template file. So if I were to say "the directory where the spml page I am using is located" would be imprecise. That would lead me to believe that the Templates folder would be indexed rather than the directory that was requested.


>I have spent 2 hours trying varioius methods to get TF to list the
>contents of a directory of my choosing rahter than the "requested
>directory" and I can think of thirty or more permutations of URL's and
>or directory delimeters that I could use--but to what end/ And there are
>questions like "does the dir list" command


#dir_list is not "virtual", you can list directories only within your virtual directory tree.


>Why not just let people put a URL in there--in the #dir_list
>command--period--what is the problem with that? Is that too difficult a
>thing to ask of a web server, that it understand URL's??? List the files
>in the directory given by a URL. Duh--that would be too easy. Probably
>too hard to write code that recognizes a URL and then sends you to
>that--Probably has never been done.

Difficult to do correctly, has been done, yet substantially different than #dir_list.

>you never tested this to see if it worked, or, if you did, you did so
>under such limited condirions that there was minimal probablility that
>it would be useful in the outside world.

It has been tested and used over the past 3 years without any reported problems, until now.


>Why am I upset? Because all this is a big waste of time, that's why. I
>only have (if I am lucky) 20-25 years left to live--I would like to
>accomplish something

Wouldn't it have been easier to simply post your question to the topic early on? You know that I am very accessible and that there are other sysops willing to help too!

Yet, here I am, a full hour into this reply, and I still do not know what the actual problem you encountered was, or what it is that you are trying to accomplish using dir_list!

Please let me know so that we can work it out.


Rusty Tucker
Spider Island


102


Running TeleFinder Server v5.7.
© Copyright Spider Island Software