Next: , Previous: Interpreting and Compiling, Up: Features


3.3 Online Web Applications

What are they?

Online Web Applications are dynamic web site applications powered by a dedicated web server, such as Apache or Microsoft IIS. The source files in the project are compiled “pages” that are accessed by the end user through their web browser.

Roadsend PHP compiled web applications can interface to a wide range of web servers on many platforms through the standard CGI or FastCGI interface.

FastCGI provides a scalable, high performance alternative to standard CGI. Roadsend PHP can generate native FastCGI binaries.

When should I use them?

Build an Online Web Application when you want to create a PHP powered, dynamic web application that will run on a dedicated web server and handle a high volume of traffic. The compiled web application may be distributed without source code.

How are the project files organized?

Web Application projects may contain any number of source files, including files from multiple directories under the project root. All source files with the .php extension are considered pages and can be accessed publicly through a URL. The project may also contain source files that do not have the .php extension (such as .inc files) - these files will not be accessible publicly and so are suitable as private include files.

Any of the compiled PHP source files may contain embedded HTML.

Static files, such as images and static HTML files are not compiled into the web application binary. These files must exist on disk in the web document directory to be served by the web server in the normal fashion.

A typical source tree for a web application project may look like this:

     /web-app
       index.php
       about.php
       forum.php
       support.php
       library/
         functions.inc
         classes.inc

Because web applications generally make use of images and other files that are not PHP source code (and thus not compiled), they generally also have a corresponding web document tree:

     /web-app
       images/
         logo.gif
         header.gif
       flash/
         example.swf
       static/
         aboutus.html

During development, it is common to have the source files and the static files in the same directory tree.

After the project is compiled and the binary is installed, only the project's web document tree needs to be installed into the document root directory of the web server (e.g., /var/www). The source code files will exist in the binary in compiled form and need not also exist in the web document tree.

How do I create online web applications?

If you are compiling from the command line, see Building and Using Compiled Web Applications. If you are using the Roadsend Studio IDE, set the project type to “Compiled Web Application” in see Project Properties - Project Options.