Web Application Server Overview
Web Application Server
Alpha Five Version 6 introduced the Web Application Server. The Web Application Server extends Alpha Five from the desktop and Intranet to the Internet. The Web Application Server now makes it extremely easy for you to build data-driven web applications.
Overview
The Web Application Server responds to client requests for web pages containing Xbasic code. This Xbasic code can do anything that a global script can do, including: [Picture]
use the entire range of Xbasic functions and methods
read data from and write data to tables and sets
format and display data in layouts that look like forms or browses
support record scrolling and record paging
accept input from users

Architecture
Normally, to provide web access to a database requires at least three components, typically from different vendors.
A web server (such as Microsoft’s IIS, IBM's WebSphere, or BEA’s WebLogic) interacts with the client over the Internet. It interprets incoming transactions (pages) and routes them to the appropriate applications.
A web application server (created with development tools like Java, Cold Fusion, and .ASP) generates dynamic web pages that may include data from a database.
A database server.
To implement such an architecture often requires licenses from three different vendors and results in complex integration tasks. The Alpha Software solution provides these components in a single easy-to-manage and inexpensive package.
Developing Applications for the Web Application Server
Web Application Server applications are composed of HTML pages with embedded Xbasic code. The Web Application Server translates and interprets the Xbasic code, retrieves data from the Alpha Five database or external databases (by using ADO), and serves up HTML pages to the clients. Embedded forms on the pages allow the client to send data back to the Web Application Server, allowing your application to edit or enter records into a database.
The contents of a typical page might look like this. The embedded Xbasic code is surrounded by the <%A5 and %> character sequences.
|
<HTML> <HEAD><TITLE>Hello World</TITLE></HEAD> <BODY> <H3>Hello World</H3> The time is <%A5 ? time("h:m am") %> </BODY> </HTML> |
There are several important features illustrated here.
The <%A5 and %> character sequences can enclose any type of Xbasic code, including comments. You can build functions inside a page or call previously created functions stored in your database.
Generating output is as simple as Prefacing the data with the question mark "?" character.
The result is the ability to create interactive pages that present the client user with HTML pages that can interact with the Alpha Five database, as if they were local forms or browses.
Starting and stopping the Web Application Server is as easy as Clicking a button on the Control Panel Toolbar.