Online documentation - Websydian v6.1 |
Introduction Implementing Other Uses Valuespace Access Background
Server-side scripting is a popular approach to web application development and as described below, web application development with server-side scripting is fully implemented in Websydian.
In server-side scripting, the HTML pages of a web application are stored on a Script Server and each HTML page may contain a number of script expressions. Each script expression specifies a piece of code generating HTML code and/or controlling the generation of HTML code on the page.
The script expressions are enclosed between <% and %> markers, which makes it possible for the Script Server to recognize and evaluate the script code.
An HTML page is requested from the web Script Server. The Script Server evaluates any script expressions on the page, and the resulting HTML page is returned as response to the web browser.
Server-side scripting can be used to access data and/or procedures on a database server and in this way data from a database can be displayed in the resulting HTML page. Script code being evaluated at the web server also provides a powerful way to control the visual appearance of generated HTML pages, e.g. by setting layout attributes or by including or omitting pieces of HTML code based on specified decisions.
Server-side scripting is supported by an increasing number of web servers, and programming languages that can be used for specifying scripting code include ASP (Active Server Pages), JSP (Java Server Pages), and PHP.
Websydian is a tool aimed at development of stable and secure database-integrated web application using only a single set of skills. With this in mind, the Websydian approach is slightly different from traditional scripting when accessing database data in a script environment.
In Websydian scripting, the Script Server will not directly access the database server. Now, the script code no longer retrieves data directly from the database server - instead data is accessed from a Valuespace object generated by the Websydian application.
A Valuespace object is generated by the Websydian application and posted to the Script Server. The Script Server then evaluates a script page template by accessing and inserting values from the Valuespace object, and the resulting HTML page is returned to the web user.
The Websydian application may be located on the same physical machine as the Script Server or on another machine.
The generated Valuespace contains the total set of data values to be included in the generated HTML page and after the Valuespace has been generated by the Websydian application, it is sent (by an HTTP POST) to the Script Server.
The functions used for generating Valuespace objects are plain Page Generator functions. Instead of generating an HTML page, a Page Generator now generates and posts a Valuespace object to the Script Server.
By specifying a single option, a Page Generator in this way will turn into a 'Valuespace Generator'. The action diagram coding will be exactly the same as in a standard Websydian development (using the WsyDetails and WsyGrid variables).
In the same way, the Document Template Generator function will now generate Script Page Templates which correctly will access the received Valuespace object.
The Websydian server-side scripting architecture gives a number of advantages:
The following limitations apply to the current Websydian Scripting architecture: