Technologies for creating server parts of Web-applications

The possibilities associated with code execution in Web clients can be significantly limited both technologically and through administration and user settings. This is generally consistent with reasonable security requirements. That is why, along with the development of tools to extend the functionality of browsers, technology related to the execution of application code is developed not in browsers, but on Web-servers themselves. Below we will very briefly consider the most common of them.

CGI
Common Gateway Interface (CGI) is a standard interface allowing to execute server applications called via URL. Input for such applications is the content of the HTTP header or the request body, depending on the protocol used. CGI applications generate HTML code which is returned to the browser. Note that at one time the term “CGI-script” was widely used, the origin of which is explained by the fact that such applications were written in scripting languages such as Perl, executed nevertheless not in the browser, and on the server. CGI applications can be created with almost any development tool that generates console applications for the operating system running the Web server.

The main problem with all CGI applications is that for each client request, the server loads the application in a separate address space, and then initiates its execution and unloading. This peculiarity limits the application performance and possibility of simultaneous processing of large number of client requests.

ISAPI and Apache DSO
The limited performance of Web applications, which run in a separate address space, can be overcome by creating an application in the form of a library, which is loaded into the address space of the Web server and, if necessary, remains there to process subsequent requests from other clients; in this case, the Web server must support the loading of such libraries. Such applications for Microsoft Internet Information Servise are called ISAPI (Internet Server Application Program Interface), and for the very popular Web-server Apache such libraries are called Apache DSO (Dynamic Shared Objects). Note, however, that when creating both CGI- and ISAPI-based applications it was difficult to separate Web design from application functionality and logic, since these applications generate complete Web pages, so all of the design information should, in general, be contained within the executable file.

ASP, JSP, PHP
The next step in the development of technologies for creating Internet applications is the appearance of tools to separate the tasks of Web design from those related to the implementation of the functionality of applications. The first of these technologies was Active Server Pages (ASP), based on ISAPI-filter. The basic idea of ASP is to create Web pages with embedded fragments of code in scripting languages. However, unlike the above mentioned means of using scripting languages to extend the functionality of browsers, these code fragments are interpreted not by the browser, but by the server (more exactly, by the ISAPI-library designed for it), and the result of these code fragments execution replaces the code fragment itself in the version of the page, which is passed to the user browser. Soon after ASP there were other technologies that implement the idea of placing the code executed by the Web-server inside the Web-page. The best known of them is JSP (Java Server Pages) technology the main idea of which is a one-time compilation of Java-code (servlet) during the first reference to it, execution of this servlet methods and placing the results of these methods execution into the set of data sent to the browser. Another popular technology of this type is PHP (Personal Home Pages) which uses CGI applications that interpret HTML code embedded in a scripting language.

ASP .NET
The latest version of the Active Server Pages technology is ASP .NET, the key to the Microsoft .NET Framework architecture. The main difference between this technology and ASP in terms of application architecture is that the code present in the Web page is not interpreted, and compiled and cached, which naturally contributes to improving the performance of applications.

In general, the client Web-server can be not only a personal computer equipped with conventional Web-clients (eg, Web-browser), but also mobile devices, characterized by limited screen size, small memory size, and often the inability to display graphics. For these devices have their own protocols for data transfer (Wireless Access Protocol, WAP) and the corresponding markup languages (WML, Wireless MarkupLanguage, CHTML, Compact HTML, etc.).