Chapter 2 Getting Started with PowerDynamo
Viewing template output in a browser
You can access a PowerDynamo Web site in several
ways:
- During development, you can access the site locally
(on the same machine) or across a client/server connection
(on the same machine) using Sybase Central.
- You can access the site locally using
a Web client and the PowerDynamo Personal Web Server.
- You can access the site across the
Internet or other network from any browser or Web client, using
the Personal Web Server as the Web server for the site.
- You can access the site across the
Internet or other network from a Web client, using a third party
Web server and a PowerDynamo Application server to link the PowerDynamo
Web site to the Web server.
In previous tutorials, we have been using Sybase
Central to access the site locally. In this tutorial we first use
a Web browser and the Personal Web Server to access the site locally,
and then use a Web browser and the Personal Web Server to access
the site across a local-area network.
Browser and TCP/IP required
You must have a Web browser or other Web client
to run this tutorial.
Web browsers require a TCP/IP protocol
stack to communicate with a Web server, even if the server is on
the same machine and there is no intervening network. You must have
TCP/IP installed to use PowerDynamo.
Accessing
the Web site locally
Web clients generally access data across the
Internet or other network. They exchange information with a Web
server, which relays the information in the addressed document to
the Web client. In this tutorial, the Web server is on the same
computer as the browser or other Web client.
To access data in the PowerDynamo sample Web site
from a browser or other Web client:
-
Start the Personal Web Server.
- Open the Utilities folder in the left pane of
Sybase Central.
- Double-click the Personal Web Server
icon in the right pane of Sybase Central.
- The Personal Web Server will be displayed
as a small "tray icon" at the opposite end of
the taskbar from the Start menu when it is running.
The software installation configures the Personal
Web Server to access the PowerDynamo sample Web site, so that no
further configuration is needed.
-
Start your browser or other Web client.
-
Type the following URL into the address
field of your browser or Web client:
http://localhost/Site/products.stm
The products template output, including the
results of a query, is processed by the Web server and displayed
in your browser.
Notes
- The http:// part
of the URL defines the protocol to use when exchanging information.
- The localhost part
of the URL directs the Web client to access data from a Web server
on the local machine. In our case, this Web server is the PowerDynamo
Personal Web Server.
If you are not connected to a network, localhost may
not be recognized. If this is the case, you can either:
- Substitute localhost with
your machine's IP address, or
- Modify your hosts file
to map the host name localhost to the 127.0.0.1 address.
127.0.0.1 localhost
- The Site part
of the URL directs the Personal Web Server to access data in a PowerDynamo
Web according to the information specified for the "Site" mapping.
For more information about mappings, see "Configuring
Web sites".
- products.stm directs
the Personal Web Server to access the products.stm template
from the Web site, process it, and return the output to the browser.
Accessing
the Web site over a network
Although the Personal Web Server is designed
primarily for testing and development work, and for same-machine
(local) access to Web data, it can be used as a normal Web server
and accessed from other machines on a local network or over the
Internet.
With its small footprint, and its simplicity,
the Personal Web Server is suited for use for an Intranet site server
for workgroups. Workgroups can use Intranet sites as a place to
share information. If the workgroup grows to the point that the
10 connection limit of the Personal Web Server is no longer sufficient,
a third party web server should be used.
This tutorial shows how to access Web information
on a Personal Web Server across a local-area TCP/IP network.
Required facilities: You require a local-area TCP/IP network
and a Web browser to follow this tutorial.
To access Web information on a Personal Web Server
across a network:
-
Ensure your Personal Web Server
is running (there should be a small "tray icon" at
the opposite end of the taskbar from the Start menu if the Personal Web
Server is running).
-
Take note of the IP address or the name
of the machine on which the Personal Web Server is running. A typical
IP address is of the following form: 123.45.67.220. If you are using
domain name services, you can use the machine name instead of the
TCP/IP address.
-
Start a Web browser on another machine
on the network.
-
Enter the following URL in the browser:
http://ip-number/Site/products.stm
or
http://machine name/Site/products.stm
The products template output, including the
results of a query, is processed by the Personal Web Server and
relayed across the network to be displayed in your browser.
Notes
- The ip-number part of the
URL directs the Web client to access data from a Web server on the
specified machine. If you are using network directory services,
you could use the machine name instead of the IP address.
- The Site part of the URL directs
the Personal Web Server to access data in a PowerDynamo Web site
according to the information specified for the "Site" mapping.
For more information about mappings, see "Configuring
Web sites".
products.stm directs
the Personal web Server to access the products.stm template
from the Web site, process it, and return the output across the network
to the browser.
Copyright © 1999 Sybase, Inc. All rights reserved.
|
|