How does SiteFusion work?

The user runs the SiteFusion client, which consists of XULRunner software (by Mozilla) and a very small set of JavaScript client code. The client can be customized and branded, and can include binary components in order to enable heavy client-side operations like file manipulations and image editing or video playback. This thin client connects to a webserver running a set of PHP scripts that handle the communication to the SiteFusion daemon. For every connecting client, the daemon forks off a new application process. The daemon can also autonomously start Jobs and Services to handle recurring operations within a SiteFusion context, or to offer certain features to other processes.

SiteFusion applications reside in the app folder inside the SiteFusion base directory. When connecting, the client includes the application path in the request. This path is formed like 'sitefusion/admin', in which 'sitefusion' is the application group and 'admin' is a reference to the startup file named Every application is part of an application group, the directory inside the app directory. They can have multiple entry points through the use of multiple files within the application group.

In a running application, the server generates JavaScript commands that result in a GUI built from rich, operating-system native UI elements and fine-grained control over application behavior and reaction to user actions. The communication from the client to the server consists of events packed in JSON format. When a user clicks a button or otherwise generates an event, the client sends this event to the server triggering a reaction. Because the client always keeps a second connection to the server open, it allows server code to initiate action as well, by setting serverbased timeouts and intervals, or by responding to global events fired by other applications and services. All of this is abstracted by the API layer, offering a seemingly local native application to the user and an integrated pure-PHP programming interface to the developer.