|
Active Page Generator Documentation |
|
See Also: |
Active Page Generator ships with a number of examples. These examples illustrate different uses for APGen, and are valuable learning tools.
These examples are included with APGen 2.1:
| Adventure Works Equipment This example includes a simple, ASP-based e-commerce application. An unoptimized (standard ASP) version is included - /awe_asp/, along with an optimized version - /awe_apg/. The optimized version uses APGen and ASPCache to yield a site that can handle 9 times the user load that the non-optimized version can handle. |
| ASPToAPG This example automates the conversion of ASP files to equivalent APG scripts. A single ASP file can be converted, or an entire directory of ASP files can be converted. This is useful for jump-starting optimization of existing ASP applications. |
| Discussion Board This example demonstrates a very rich newsgroup-style web interface with outstanding performance. The navigation frame and article frames are static HTML files, which are generated when their information changes. Experienced ASP developers will recognize that database driven pages with this level of UI richness, and this level of information density on individual pages, would perform poorly using conventional ASP technology. |
| Hello World This is the "Hello World" of APG scripts. It is a very simple example that demonstrates a couple of the features of APGen. |
| Outlook Contact List This example reads contacts from Microsoft Outlook and displays them in a static HTML page. DHTML is used to make the page richer and more functional. This example shows how APGen can be used to generate high-performance, highly-functional, information-dense pages. Experienced ASP developers will recognize that an equivalent ASP page would perform and scale very poorly. |
| SrcToHTML This example displays the source code of one or more HTML, ASP, or APG files in a web page. This is a useful utility for converting your source code so it can be viewed in web pages. It is best to do this conversion once when the source file changes, as opposed to doing the conversion for every page view. |
| Web Authoring Examples This example demonstrates how to automate web page authoring tasks to reduce the work of writing and maintaining web pages. These are tasks that are not normally performed in Active Server Pages due to the overhead involved. The tasks include merging page templates with content, generating navbars and menus, rebuilding the whole site, generating new pages, and developing a content management system for handling content in different formats, and using multiple templates in a site. |
| SQL Trigger Example This example updates static product pages when the product database changes. Stored procedures are supplied that run an APG script when the products table changes. |
| MSMQ Example This example demonstrates how to create an asynchronous and distributed content rendering system for a large-scale site using SQL Server, MSMQ, and Active Page Generator. This system allows content to be generated on a separate APGen server, if this level of isolation is desired. Content update messages are sent from ASP pages and from SQL triggers. |
All APGen examples have readme.htm files and commented source code. Most of the examples included with APGen are not discussed in this documentation - we recommend referring to the source code, and optionally debugging the examples, to become familiar with how they work.
Two examples are discussed here for instructional purposes. They are: