|
APGen Examples |
|
See Also: |
These examples demonstrate the principals discussed in Automating Web Page Authoring. Use these or similar techniques to make web site creation and maintenance easier and cheaper.
These examples are a progression - they start out with the easiest improvements, and evolve to a richer but more complex system.
| Part 1: Automating Common Content This example uses #include files to render common template content for several web pages. Using APGen to pre-render these pages provides superior performance to using ASP #includes. By moving common template content into #include files, web site maintenance becomes much easier. |
| Part 2: Navbars and Menus This example stores information about the web site in an XML file named site.xml. Code in the template script is modified to use the information from site.xml to render a navigation bar. Benefits of this approach are improved web site maintenance, improved reliability, and drastic improvements in performance over doing the same task with ASP. |
| Part 3: Site Builds This example adds a build script name build.apg, which acts as a makefile for the whole web site. Build.apg uses the site hierarchy information in site.xml to build all pages on the site. This makes site maintenance easier than manually running individual APG scripts for each page that has changed. |
| Part 4: Creating New Pages This example adds the capability to easily add new pages to the site. |
| Part 5: Multiple Templates and Multiple Content Types This example adds multiple templates and the capability to merge with page content stored in text files, HTML files, HTML fragments, and APG scripts. This results in flexibility of content format and page appearance, improved maintenance, and great performance. |