SIMPOL Documentation

Chapter 9. Web Server Programs

Introducing World Wide Web Server Programming

SIMPOL's earliest interactive program capabilities were as a web server application. This was done because it was the easiest way to build programs that were able to interact with the user, since we didn't need to worry about building user interface components. As part of the implementation, we decided to support the CGI standard, ISAPI (Microsoft's proprietary interface for IIS) and something called Fast-CGI, which is a high-performance version of CGI that can handle larger loads. It does this by allowing the program code to remain loaded for a certain amount of time, so that subsequent calls to the same program do not need to also go through initialization.

There are typically two approaches to web application programming, page-centered and program-centered. Examples of page-centered programming are typically found in PHP and ASP programs. The page is the focus of the development. This works well for people who are mainly graphics designers and who want to add a little bit of code to their pages. The other approach tends to be much more about the application code, which will, based on the current state, display any of a number of pages. Both are valid methods of working, though application programmers may find the page-centric approach difficult to follow.

SIMPOL supports to some degree both styles. The IDE has support for a file format called *.smz which is a form of HTML with embedded SIMPOL code. During the compilation phase these files are converted to program code with embedded HTML. In the standard versions used in ASP and PHP, these pages are processed by the server when they are requested, whereas in SIMPOL they are already compiled to byte code.

The hardest part about web server programming is debugging something like this, which runs in the server, since you can't control the execution. We solved this problem way back in 2003, by building a special program to act as the loader for the CGI program, and which then connects to the SIMPOL IDE to debug the program. This works extremely well and makes debugging the program quite easy. This loader program is called sbngidecaller.exe.