| Programming concept |
| HTTP Front-End Engine |
| JAVA Content Engine and API |
| Database Engine |
| Data Presentation Engine |
|
Programming concept
1. Client/Server architecture
Applications are based on Client/Server architecture, where the client is Internet Browser
and the server is Passage Server.
Structurally the server has four modules that work together:
- HTTP Front-End Engine
- JAVA Content Engine
- Database Engine
- Data Presentation Engine
2. Programming concept requires the following steps:
- Creating applications
- Writing and compiling JAVA servlets
- Writing SQL statements
- Creating HTML pages
3. Application
Application is a collection of
- JAVA servlets (.java and .class) [i.e. JAVA Request]
- SQL statements (.sql) [i.e. SQL Request]
- HTML pages (.html)
- data files (.txt, .pdf, .doc, .mp3, .mov, ...)
- image files (.jpg, .gif, .swf, ...)
- data sources (ODBC)
- databases (MS Access, SQL Server, ...)
- users and passwords
4. Request
Request is a server-side executable code that generates HTML page. It can be JAVA servlet or SQL statement.
JAVA Request can call other JAVA or SQL requests.
5. Application Upload/Download
In addition to standard FTP, Passage Server introduces Application and
Request transfer functionality. It is used for transfering Applications and Requests from one server to another.
Request components (i.e. JAVA servlet, SQL statment and HTML page) are stored in [requestname].req file.
Application components (i.e. Requests, DataSources, Users, Passwords) are stored in [applicationname].app file.
Files *.app and *.req are used for upload/download by Passage Studio.
6. Software
Typically you would use the following software
- Passage Studio for application development
- JAVA IDE or Notepad for writing JAVA requests
- Passage Studio for writing SQL requests
- JAVA IDE or command line for JAVA request compilation
- FrontPage, Contribute, Dreamweaver or Notepad for wrinting HTML pages
- Internet browser for running applications
|
|
HTTP Front-End Engine
HTML link:
<a href="http://127.0.0.1/AppName/HelloWorld(param1,param2)">Hello World!</a>
HTML form:
<form method="post">
<input type="hidden" name="server_request" value="HelloWorld(param1,param2)">
<input type="submit" value="Hello World!">
</form>
ENCTYPE="multipart/form-data" is supported.
|
|
JAVA Content Engine and API
Request can be either JAVA servlet or SQL statement.
Typical JAVA Request
- takes parameters
- calls other JAVA or SQL Requests
- gets data from database and text files
- processes data
- creates output table(s)
- puts processed data into output table(s)
- sets output HTML page
Typical SQL Request
- takes parameters
- gets/puts data from/to database
The following features make Passage Server Request code compact, fast, simple and easy to develop:
- Request is a compiled JAVA servlet
- Request does not generate HTML page, data presentation is done by the server outside of Request
- Request does not deal with JAVA exceptions, exceptions are handled by the server outside of Request
- Request does not deal with SQL language, instead it calls Requests written in SQL
For application development you use Passage Studio. For JAVA Request (servlet) compilation you use any JAVA IDE or command line
javac -d . -classpath .;c:\...\ws.jar; *.java
HelloWorld.java
HelloWorldSql.sql
Passage Server Java API
|
|
Database Engine
For database access you create
- ODBC Data Source
- Passage Server Data Source with the same name
- SQL Request (SQL statement, data source and parameters)
Then JAVA Request calls SQL Request and processes data.
|
|
Data Presentation Engine
Request creates output table(s) and returns HTML page. In order to put data from output table(s) to HTML page
the special tags are used. The server replaces the tags with actual data and sends HTML page to a browser.
| SERVER_TABLE(tbl) |
| Parameters: |
| tbl | - the output table number (0,1,2,...) |
| Returns: |
| HTML table rows <tr><td>...</td><td>...</td></tr> |
| Example: |
| SERVER_TABLE(0) |
| SERVER_CELL(tbl,row,col) |
| Parameters: |
| tbl | - the output table number |
| row | - the output row number |
| col | - the output column number |
| Returns: |
| a content of table cell |
| Example: |
| SERVER_CELL(2,5,10) |
| SERVER_SELECT(tbl, col_value, col_show) |
| Parameters: |
| tbl | - the output table number |
| col_value | - the output column number to be used as value <option value='...'> |
| col_show | - the output column number to be shown <option value='...'>...</option> |
| Returns: |
| a HTML SELECT options |
| Example: |
| SERVER_SELECT(0,0,1) |
|
|