ATL Server
Written in | C++ |
---|---|
Type | Library or Framework |
ATL Server is a technology originally developed by
ATL Server first appeared with
A typical ATL server application consists of at least one ISAPI extension
SRF files
SRF files can contain a mix of HTML and script tags. SRF script tags are denoted by the {{ opening and }} closing braces.
A single SRF file may call code from a number of application DLLs. Similarly, a single application DLL may serve a number of SRF files.
The simplest SRF file must contain one or more references to application DLLs and one or more calls to a functions within those DLLs. A simple SRF file would look something like this:
{{handler ATLServerHelloWorld.dll/Default}} <html> <body> {{HelloWorld}} </body> </html>
The first line of the file:
{{handler ATLServerHelloWorld.dll/Default}}
is used to identify the DLL and the class that the SRF file will make calls to.
Within the file, function calls would look like this:
{{HelloWorld}}
In the above case, the ATLServerHelloWorld.dll DLL contains a definition of a "Default" class as shown below:
[request_handler("Default")]
class CDefault
{
...
[tag_name(name="HelloWorld")]
HTTP_CODE OnHelloWorld(void)
{
m_HttpResponse << "Hello World!";
return HTTP_SUCCESS;
}
};
Note the use of the request_handler attribute on the class to identify that this is the "Default" class and also note the use of tag_name attribute to identify the "HelloWorld" method.
References
- Hello, ATL Server: A Modern C++ Web Platform, InformIT, September 29, 2006.