There are several approaches that can be used to create web applications – either to program a separate file for each web address, or to use a single file to manage all requests by calling in a file for each part of a request. Elements is built up on the grounds of the second principle, because it allows a centralized management of requests, verification of access rights, connection to the database and is able to fulfill a number of other tasks for each request or web page.
The Application class is the main point of entry to the server code. It manages all requests and allocates the tasks according to the type of requests issued to other objects. It includes the necessary minimum of main files according to the type of requests (e.g. a user interface will appear or it may be a strictly non-interface related request), conducts an initial check of access rights (additional verification is conducted at a later stage while the request is being executed) and brings the necessary class that will actually process the request. Technically the request is directed towards the index.php file, which is tailored to the application and acts as a configuration file with parameters that specify the relation to the database and also have other types of specifications.
After the query has been initially processed, the Application class calls the necessary class to which it is directed. This is accomplished through the unique identificators allocated to all interface classes. Each request includes both this identificator and additional properties, which are usually directed to and synchronized with the platform. In addition to these identificators, there are also a few service IDs that are internal to the platform and administer some specific requests – calling AJAX methods, Web services, saving profiles and other tasks, which are automatically completed by the platform.
The Application class is responsible for the administration of the system cache, which is composed mainly of paths to objects, information about the activities of objects etc. It also provides the means of loading objects, controls and actions, making it needless for the developer to know where the object is and even if it does actually exist.