User Manual table of contents
 INDEX | GETTING STARTED | TASKS | LANGUAGE | LIBRARY | SYSTEM | SAMPLES

Static vs Server Operation: Overview

On this Page
Overview
Static Pages
Server Pages


Home
Products
*Tour
*Manual
Corporate
Support
Search



!
Quick Reference
Object Types
System Properties
System Methods
Command-Line
Binary Operators





Overview

There are two different pop!siteTM products: pop!site and pop!site desktop.

pop!site pop!site desktop
pop!site supports two kinds of web pages: static pages and server pages.

A static page is a page converted from pop!talkTM to HTML on your workstation. The HTML file is then placed on a web server. The contents of the static page (like most HTML pages) won't change until you change it. A server page is converted to HTML on the web server each time the page is requested. This allows the page to appear differently each time it's served to a browser. You can use any combination of static and server pages on your Web site.

pop!site desktop supports only one kind of web page: static pages.

A static page is a page converted from pop!talk to HTML on your workstation. The HTML file is then placed on a web server. The contents of the static page (like most HTML pages) won't change until you change it.

There are advantages and disadvantages to both the two types of pages (static and server). You'll want to pick carefully:

Advantages Disadvantages
Static Pages
  • Provides fastest operation for visitors because the HTML pages are pre-built.
  • Does not allow pages with dynamic content (e.g., a page that displays the current time)
  • Administration of a large site is somewhat more complex than when pages can be generated on the server. You must generate the HTML pages manually and put them in the right place for the Web server.
Server Pages
  • Simplicity of administration
  • Allows pages with dynamic content (e.g., a page that displays the current time)
  • On some machines, under some loads, can be too slow for visitors.

When first learning how to use pop!site, you should begin by coding your pop!talk in static pages. Once you feel comfortable with building static pop!site pages, you can begin to take advantage of pop!site's server-side capabilities with server pages.

The sections below give more information about each of these types of pages. If you're still not sure you get the basic difference, you'll first want to read our product overview.

Static Pages

Traditional development of web pages is done with a text editor. When the author finishes composing or changing a page, it is placed in the directory that the Web server uses to service requests. Sometimes the documents are simply edited in this directory.

When you build static pop!site web pages, this process work differently. Instead of editing the HTML document directly, you edit a pop!talk document and then use pop!site to convert it into HTML. The resulting HTML file is placed on the web server (if it's not already there).

The key thing to understand in the case of static content is that pop!site is run when you are authoring your pages, not when your web server is serving them.

Server Pages

Once your server has been configured to support server operation, creating and serving dynamic, server-based documents is a snap. pop!site automatically processes all files with the .ptx extension. There's no need to convert them to HTML by hand (as you must with static pages).

To illustrate, we'll create a server-based page that tells the current time. Using a text editor, create a new document which contains the following:

<html>
<head><title>Clock</title></head>
<body>
<p>The time is <timestamp.now.time>
</body>
</html>

Save this document as 'clock.ptx' into the document tree of your server (or copy it there). For this example, we'll assume that you placed the file into the server's root, so it's URL will be https://www.yourserver.com/clock.ptx. Start up your Web browser and load this URL. You should see a page which tells you the current time. (If you don't, your server may not be configured correctly.)

Now reload the document. You should see the time update to the current time. If you had built this page as a static document, the time shown would be the time at which you (the author) processed the document and placed the HTML on the server, not the time that you requested the page.

When running pop!site on your server, your page can access information about the request being made -- as you might in a CGI script. You can use the request object to alter the final page's contents based on such things as:

  • the type of browser being used by the requester
  • the name of the machine that the requester is coming from

Unlike a normal CGI-based design, however, pop!talk conveniently combines the logic and the HTML together in a single file.

Server pages can also be used for form processing. To have a form on a Web page without using pop!site, you must have a program (perhaps a PERL script) associated with the form. When the user fills in the form, the contents of the form are sent to this program. The program processes the data and then emits a new web page that the form submittor sees as the response to the form submission. With pop!site running on your server, the processing of the form and the output document are both handled by a pop!talk document. For more details about this, see Form Processing.

 


powered by pop!site Copyright 1995-1997. Pragmatica, Inc. All Rights reserved.
Pragmatica, pop!site and pop!talk are trademarks of Pragmatica, Inc.
Modified: 29 January, 1997 21:30:18

Page Feedback
Webmaster Contact