Chapter 1 Databases and the Internet
PowerDynamo includes Web-site management features and mobile Intranet capabilities.
With PowerDynamo, you can embed instructions into any Web page, and process these instructions when providing HTML to a Web client for viewing or interaction. PowerDynamo supports the following kinds of embedded instructions:
The Web-site management utility, Sybase Central, manages all aspects of dynamic Web content:
At the core of PowerDynamo is an interpreter which processes specially tagged instructions embedded in the HTML pages or other documents, and serves the resulting output together with static HTML to an application such as a Web server.
The PowerDynamo interpreter is built into several components:
PowerDynamo includes a Web site management tool for managing HTML templates and connections. PowerDynamo focuses on combining HTML documents with database data, and the Web-site management utility plugs in to the Sybase Central database management utility, bringing management of both technologies under the single roof of Sybase Central, using a consistent interface.
PowerDynamo provides tools for the following management tasks:
Sybase Central requires either the Windows 95 or the Windows NT operating system.
The Web-site management utility is a plug-in to the Sybase Central database management tool, so that you manage your data and your Web site from the same Sybase Central interface.
Dynamo can work with static Web documents and two types of dynamic Web pages: HTML templates and scripts.
Templates can include not only static HTML, but instructions that are interpreted when a document is requested by a Web client. The client then sees the results of those instructions.
The PowerDynamo executes SQL statements against a database, interprets scripts internally, and can use text replacement and host variables to provide client/server interactions.
Scripts are ECMAScript that generate HTML. ECMAScript is a standardized version of Javascript. JavaScript is a compact, object-based scripting language for developing client and server Internet applications.
For more flexibility over template content, PowerDynamo provides the DynaScript language. DynaScript is a JavaScript compatible language. You can embed DynaScripts in templates, but they can also be stored as standalone scripts, with no container HTML document.
For information about JavaScript, see the Netscape JavaScript Authoring Guide at the following URL:
http://home.netscape.com/eng/mozilla/3.0/handbook/
javascript/
Script language imposes no restrictions
on Web client
JavaScript was developed by Netscape
primarily for interpretation at the Web client, not at the Web server,
and consequently JavaScript has been tied to the Netscape Navigator
browser. In PowerDynamo, appropriately tagged DynaScript scripts
are interpreted at the server, and only the output HTML is sent
to the Web client. The PowerDynamo inclusion of a JavaScript-based language
as its scripting language places no restrictions on the Web clients
that can use the system.
With PowerDynamo, you can embed SQL queries in an HTML or XML template. This allows you to provide flexible and controlled intranet or Internet access to your organization's data.
For example, you might develop a template that contains a query for company products, product descriptions, pricing and availability. Users can then see up-to-the-minute information that is generated in response to the request for the page.
With support for text substitution and host variables, you are not limited to static SQL statements. Instead, SQL statements can be built in response to input from a Web client.
For example, you could provide a Web template with a list box containing categories of products. When the user selects one of these categories and clicks a button, the Web client sends a request containing the selected category in the URL. In response, the application server constructs a query limited to the selected category and sends back a table of company products in that category.
To enable real interaction between a Web client and the Web server, an action at the client (clicking on a button after filling out a form, for example) must send information to the Web server, and this information must be used by the application server in formulating its response. PowerDynamo supports this function using: text substitution macros and host variables. Both are sent to the Web server as part of the address when a link or button in the client is clicked.
You can include a macro in an HTML template. This macro is expanded by the interpreter when the template is processed, being replaced by its value.
The value of a macro is defined in the URL when the page is accessed. The following example shows how text substitution works.
http://www.organization.com/template-name?firstname=Jane&lastname=Smith
Dear Jane Smith,
Thank you for your registration. Your registration number is 123-456.
For more information about text substitution, see "Passing variables from one document to another".
For more information about text substitution with DynaScript, see "value property" in PowerDynamo Reference.
While text substitution macros are ideal for general-purpose substitution, there are some circumstances where a similar but alternative method has performance advantages. Host variables can be specified in a SQL statement and the statement could be executed repeatedly without being reparsed, providing significant performance improvements.
Queries embedded in a template are executed against a database. This can be any single data source, and the SQL statement must conform to the SQL supported by the database. The queries are executed against one and only one data source, and this may be the same or a different database than the one in which the templates themselves are stored.
The PowerDynamo application server allows templates to be held in a data source that can process Transact-SQL queries or in the file system. The two supported databases for template storage are Sybase Adaptive Server Anywhere and Sybase Adaptive Server Enterprise. PowerDynamo can use an ODBC connection for each of these database management systems or an Open Client connection for the Adaptive Server Enterprise database management system. The database need not be the same one as the one holding the data referenced in SQL statements embedded in the templates.
Although it is held in a relational database, a database-based template repository is organized according to a folder-based motif, which mimics a file system organization. This structure allows easy import and export of Web sites between the database and a file system, so that you can continue to use tools geared to managing and working with file-based Web sites and information, and yet gain the benefits of a database-hosted Web site.
The application server takes an HTML template from the template repository, processes script instructions embedded in this template, fetches data as required from the data store, and passes a finished HTML document to the Web server for relaying to the Web client.
Copyright © 1999 Sybase, Inc. All rights reserved. |