ATL Server
Encyclopedia
ATL Server is a technology originally developed by Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

 for developing web based applications
Web application
A web application is an application that is accessed over a network such as the Internet or an intranet. The term may also mean a computer software application that is coded in a browser-supported language and reliant on a common web browser to render the application executable.Web applications are...

. It uses a tag replacement engine written in C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

 to render
Layout engine
A web browser engine, , is a software component that takes marked up content and formatting information and displays the formatted content on the screen. It "paints" on the content area of a window, which is displayed on a monitor or a printer...

 web pages. It draws on the existing technologies like ISAPI
ISAPI
The Internet Server Application Programming Interface is an N-tier API of Internet Information Services , Microsoft's collection of Windows-based web server services...

 and the Active Template Library
Active Template Library
The Active Template Library is a set of template-based C++ classes developed by Microsoft, intended to simplify the programming of Component Object Model objects. The COM support in Microsoft Visual C++ allows developers to create a variety of COM objects, OLE Automation servers, and ActiveX...

, and includes a template library which is dedicated for use with developing Web-based applications.

ATL Server first appeared with Visual Studio .NET 2003. It was included in Visual Studio 2005 but is no longer supported since the release of Visual Studio 2008. Most of the ATL Server code base has been released as a shared source project on CodePlex, a Microsoft-run code sharing web site.

A typical ATL server application consists of at least one ISAPI extension DLL along with one or a number of Server Response Files (.srf) and their associated application DLL files which provide the application functionality.

SRF Files

SRF files can contain a mix of HTML
HTML
HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....

and script tags. SRF script tags are denoted by the 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:








The first line of the file:

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:


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.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK