WebGecko Home
Authoring and caching solutions for a better Web experience
SEARCHStart search

APGEN FREQUENTLY ASKED QUESTIONS

If your questions are not answered here, use our support form to ask us a question.

Questions
  1. What is the value proposition for APGen?
  2. What sort of performance gains can I expect from using APGen?
  3. How hard is it to use APGen?
  4. How much work is it to optimize an ASP Web site with APGen?
  5. What sorts of projects is APGen useful for?
  6. What Web servers can be used with APGen?
  7. What is pre-rendering?
  8. Can APGen be used for generating offline content, such as Web pages for CDs and HTML help?
  9. How does APGen compare with XSLT?
  10. What is the difference between APGen and Server-Side Includes?
  11. How does APGen compare to caching?
  12. How can static pages be better than dynamic pages?
  13. We'd like to decrease the download size of our home page by using HTTP 1.1 compression - does APGen support this?
  14. It looks as if my ISP has to install APGen on the Web server to use it. Is that correct?
Answers

What is the value proposition for APGen?

Using APGen will yield significant savings on Web site hardware, software, hosting, and maintenance.  In addition your users' experience will improve, which increases user loyalty and results in increased sales and traffic.

When your Web pages are made more efficient, less hardware, bandwidth, power and rack space are needed to handle a given user load.  Put another way, improving Web page efficiency reduces your cost per page view.  The monetary savings are nearly proportional to the improvement in efficiency.  This holds true for Web sites of all sizes, including small sites hosted on a shared Web server, all the way up to large sites using Web farms.  Savings on hardware, software, and hosting are shown on the APGen ROI page.

Maintenance savings result from decreased maintenance effort, and increased maintenance accuracy.  APGen enables you to automate every part of your Web site in a completely customizeable way.  Page content can be merged with templates, navigation links can be re-generated when the site hierarchy changes, Web site localization can be performed by extracting localized content from a database.  There are many other options for automating Web site maintenance.  Web sites are not normally automated to the degree that is possible with APGen; simply because this level of automation is computationally intensive, and would severely limit performance if executed on the Web server.  By adding a pre-rendering step to your Web application, performance is maximized and maintenance is streamlined.

Contact our pre-sales support to discuss how using APGen can reduce your Web site costs.

What sort of performance gains can I expect from using APGen?

The gains will vary for each page, depending on how costly the page is to render, and how user-specific the page content is.  Average capacity gains are 5 to 20 times.  Some real-world Web pages perform 200 times faster after APGen optimization.

Typical performance numbers should help you understand the gains that are possible: Using a quad processor 550 MHz PIII Web server with a separate database server, maximum capacity for real-world ASP pages ranges from 5 to 150 requests per second.  On the same server, static pages can be served at a rate of 2000 to 5000 requests per second.  For worst-case optimization, performance gains are small or negligible.  For best-case optimization, a page is completely converted to APG script which makes the Web page static, resulting in performance gains of 10 to 1000 times.

Worst-case optimization occurs for pages where all content is user dependent.  Examples include: shopping cart pages, search pages, and stock portfolio pages.  These pages display data that is relevant for a single request, so the content can not be optimized.  However, if a custom stock portfolio page displays daily headlines or most active securities, that portion of the page is not user dependent and can be optimized.  With APGen, pages can be broken up into dynamic and pre-rendered portions, according to the needs of your application.

Best-case optimization occurs for pages with database or component-driven content that is the same for all users.  Examples include home pages, product pages, portals, and online discussions.

For real-world Web sites, some pages are highly optimizable, and some are not.  After averaging the page gains, most Web sites will see overall capacity gains of 5 to 20 times.

Contact our pre-sales support to discuss how APGen can improve your site's performance.

How hard is it to use APGen?

APGen is a programming environment for pre-rendering Web pages and other content.  It is quite similar to the Active Server Pages programming environment, and is just as easy to program.  At the same time, APGen does require basic developer skills.

Any developer that can program with Active Server Pages can learn to use APGen in a half day.  Nearly all of an ASP developer's knowledge, skills, and source code can be carried over to APGen programming: The scripting languages used in APGen are identical to those used in ASP; the same editors, script debuggers, COM components, and databases used for ASP programming can also be used in APG scripts; existing VBScript and JScript source code can be copied into APG scripts.  The VBScript and JScript script engines used in APGen are written and updated by Microsoft - as the script engines improve with new language features, the new language features can be used in APGen.

ASP developers can view our Developer Quick Start to learn how to use APGen.  Or, they can download a free developer license to evaluate APGen and run the examples.

How much work is it to optimize an ASP Web site with APGen?

A Web site with hundreds of Web page files can typically be optimized with APGen in 2-3 developer weeks.  This is a very worthwhile investment due to the savings in hardware and hosting, better user experience, and easier maintenance.

WebGecko’s APGen product provided everything that we needed to meet our objectives.  In addition, APGen allowed us to make the necessary changes in a short period of time.  We have found that we could port existing ASP pages over in as little as 5 minutes per ASP page.  The example code provided with APGen is a HUGE benefit - we used the site generator code, from the sample provided, to create the builder for our site.  This took less than 1 hour.
John Weber
President, Software Toolbox

Read the complete testimonial

After APGen is adopted by a site, adding new pages that use APGen requires no additional effort.  Adding a new page that uses APGen and ASP is as easy as adding a new ASP page.  In many cases, using APGen makes adding new pages easier, because APGen enables increased automation of Web site authoring and maintenance.

When undertaking an APGen optimization project, we recommend starting with a proof-of-concept project: 1 or 2 developers choose a page to optimize, optimize it, and then test the performance gains from optimization.  A page should be chosen that has relatively non-volatile content, gets a fair amount of traffic, and is not too complex.  After optimization, run a test to measure the performance gained by the optimization.  This proof-of-concept project can take a few hours to a day of work.  It will increase the developers' understanding of APGen and how best to use APGen.  It will also indicate the performance gains that can be expected, and thus provides motivation for further optimization.

APGen 2.x includes two shortcuts for optimizing ASP sites - one is to use the ASPToAPG Example, which converts whole directories of ASP files to equivalent directories of APG scripts.  This is most useful for Static Page Generation projects.  The other shortcut is to access the ASP objects in APG script, so that references to ASP objects don't have to be converted to their APGen equivalent.

Pages that use Two-Phase Content Generation and/or Page Fragment Caching to mix pre-rendered and dynamic content require manual optimization.  This is because someone with knowledge about the page design and the volatility of the underlying data must make a decision about which regions of the page can be pre-rendered, and which regions of the page must be dynamic.  Manual optimization can be as fast as 5 minutes per page.

What sorts of projects is APGen useful for?

If any of the following are true for a Web development project, it may be a good candidate for APGen use:

  • The site will receive moderate or higher traffic spikes. If the site will ever experience a level of traffic that will temporarily saturate the CPU, then the performance of the site matters.
  • Some of the Web pages require CPU-intensive work.
  • The site needs to perform well.
  • Some of the content on the site is viewed much more often than it changes.
  • Content re-use and automating Web authoring will make the project more successful.
  • Generation of static content is needed.
  • Distributed caching and/or content distribution are used to improve user download speeds.

Even intranet sites can be good candidates for APGen optimization, provided they meet some of these guidelines.  For example, two departments in Microsoft use APGen on their intranet to extract documents from a repository (like Office documents from Visual SourceSafe), then extract the main content of each document and generate a Web page containing the content.  The navigation bar is automatically generated based on the layout of the documents in the repository.  Even though the intranet never sees very high traffic, displaying the content is computationally intensive and is best performed in a pre-render step.

Ideal scenarios for using APGen include:

  • E-Commerce product pages
  • News and articles
  • Content management applications
  • Online discussions
  • Portals and directories
  • Templating and generating navigation links
  • Localized pages, where localized content is stored in a database or XML
  • Generating content that can be viewed on multiple browsers and handheld devices
  • Generating offline content for CDs or HTML help
  • Source code generation

What Web servers can be used with APGen?

Any Web server can be used with APGen.  APGen generates Web files, which can be placed on any Web server on any platform.  The server running APGen must be a Windows NT 4 or Windows 2000 server.  The generated files can be written to any platform.

APGen is not an ISAPI filter, it is a COM component, which means it can be run from any program.  APGen can also be executed from the command line and from Windows Explorer.  APGen is designed so it can be used for generic content generation - any output format can be generated from any program.  In contrast, ASP is designed for generating Web content as an extension of the Web server.

APGen can even be used to generate JSP files that are hosted on a Linux server running Apache.  APGen does work best for generating Active Server Pages, because ASP and APGen use the same scripting engines and components, so the APG script is quite similar to the ASP script.  When APGen is used to generate JSP files, the APGen code is VBScript or JScript, and the JSP code is in Java.  This makes JSP optimization more difficult, but does allow JSP pages to be optimized with APGen.  CFML and PHP pages (and other formats) can be similarly optimized with APGen.

What is pre-rendering?

In our context, to pre-render is to generate Web page content before the Web page is requested.  Dynamic Web page systems like ASP, PHP, and JSP generate Web page content when the Web page is requested.

One of the disadvantages of dynamic Web pages is that dynamic pages are executed during every Web page request.  This limits scalability, because the overhead of executing a dynamic page is multiplied by the number of requests for that page.  Pre-rendering separates content generation from Web page requests - the page content is generated once when the data changes, instead of once per Web page request.

Can APGen be used for generating offline content, such as Web pages for CDs and HTML help?

APGen is valuable for generating offline content, including Web pages for CD distribution, HTML help, and source code.  For more information, see APGen Benefits.

How does APGen compare with XSLT?

APGen and XSLT have some similarities, in that they are both intended for generating output documents.  There are also a number of significant differences, detailed below.  The bottom line is that XSLT is restrictive in syntax and use, but is very well suited for straightforward transformation of XML documents.  APGen is much less restrictive and can be used for generating any output using any data as input.  For tasks like ASP optimization, generating Web pages with database data, and automating Web page authoring, APGen is ideal and XSLT is virtually unusable.  The best of both worlds is available, because XSLT transformation can be performed in an APG script.

A more detailed description of the differences between XSLT and APGen:
XSLT is used for transforming and reformatting XML data.  APGen is used for generating content in any format.  XSLT requires XML input, whereas APG scripts can use any data (including XML and no data) when generating output.  XSLT syntax is a dialect of XML, so XSLT documents must be valid XML documents.  APG script syntax mixes blocks of script and blocks of content, similar to ASP - it is more intuitive and flexible than the XSLT syntax.  XSLT can be difficult to learn, and can be cumbersome to program and debug.  APG script syntax is easier to understand, program, and debug.  Both the XSLT engine and the APGen engine are available as COM objects.

Another way to compare APGen with XSLT is to compare usefulness for different tasks: XSLT was designed for transforming XML documents, so it is well-suited for this task.  APG scripts can also transform XML documents, either by walking an XML DOM object and generating output, or by using an XSLT transform in the APG script.  For non-XML tasks like Web site content re-use, generating pages from database data, and generating ASP files: XSLT is barely useable, and APGen is ideal.

What is the difference between APGen and Server-Side Includes?

Server-side includes (SSIs) are implemented as a Web server extension - they offer simple content re-use, but extract a processing toll because the file insertion is performed on every page request.  Because SSIs execute on the Web server and are performed on every page request, they are actually more similar to Active Server Pages than they are to APGen.

Two significant advantages of APGen compared to SSIs are:

  • Execution of APG scripts (and content insertion) is performed independently of Web page requests.  Because of this difference, APGen content generation adds zero overhead to each Web page request.
  • APG scripts can contain script, as well as include files.  SSIs can only contain include files.  It is the script that enables programmable content generation, access to database data, and other completely customizeable behavior.  This is equivalent to the difference between SSIs and Active Server Pages.

How does APGen compare to caching?

APGen is a product that implements scripted content generation.  Caching is a computer science concept where computed results (data or content) are stored so future requests with identical parameters can use the stored results instead of repeating the computation.  Though APGen is not equivalent to caching, APGen can be used with ASPCache for Web server output caching, and generating static pages with APGen automatically maximizes the benefits of distributed caches.

In the Internet space, there are a number of different types of caching: Web server data caching; Web server output caching; edge caching; network caching (used with content distribution); proxy caching; and browser caching.  The first two types of caching (Web server data caching and Web server output caching) are performed inside the Web server application.  The other types of caching (edge caching, network caching, proxy caching, and browser caching) are performed somewhere on the network or in the browser - this group can be classified as distributed caches.

WebGecko ASPCache is the component for Web server data caching and Web server output caching.  With regards to output caching, ASPCache can be used for whole page output caching, and partial page output caching (also referred to as page fragment caching).  For output caching, ASPCache uses APGen to generate the cached content.  For data caching, ASPCache is used by itself.

Distributed caches are implemented by other software and hardware vendors.  APGen can be used to maximize utilization of distributed caches: When static pages are generated with APGen (normally considered pre-rendering instead of caching), the benefits of edge caching, network caching, proxy caching, and browser caching are realized - bandwidth is saved and server processing is drastically reduced.  These caches are highly optimized to cache static pages and static files.  Just by using APGen to generate static pages, the Web site automatically reaps all the benefits from distributed caches, with no additional configuration or effort.

Web server output caching and pre-rendering can be considered the same concept, performed at different times.  Output caching generates content during the first request for that content.  Pre-rendering generates content when the underlying data changes.  The difference can be compared to push vs. pull: Caching is the "pull" form of saving data, because the content is generated on demand.  Pre-rendering is the "push" form of saving data, because the content is generated when the underlying data changes.  Both "push" and "pull" models have their place - this is why APGen can be used in both a pre-rendering and output caching configuration.

Compared to Web server output caching, pre-rendering has these benefits:

  • No cache validity check.  With caching, it is often necessary to verify that the cached data is valid, which adds overhead and complexity to the cache retrieval process.  Cache validity checks can be compared to polling to see if data has changed.  All the data dependencies must be checked, which can become very complex in real world applications.  With pre-rendering, the content changes when the underlying data changes, so there is no need to check cache validity.
  • Reliability.  If an error occurs while pre-rendering, it can be caught before it affects a user.  Since caching occurs while responding to a request, the user is immediately affected by any errors.
  • Better performance.  Cached data must be retrieved from its store, which has some overhead (hopefully small).  Output cached dynamic pages still require a full pass through the Web server and all its filters.  Pre-rendered static pages avoid much overhead by taking a shortcut through the Web server execution path.  The overhead of cache validity checks is also significant - in some cases, cache validity checks can negate all benefits of caching.  For a performance comparison, see APGen Benefits.
  • Efficiency.  For Web farms with file replication, pre-rendering only needs to be performed on a single server.  Output caching for a given page is performed redundantly on every server in the Web farm.  This may or may not be an issue, depending on the overhead of the Web pages.

APGen can be used for both caching and pre-rendering, according to the needs of your application. WebGecko Consulting Services can help you design your application to leverage the benefits of both.

How can static pages be better than dynamic pages?

The tenet that "dynamic pages are better than static pages" is not always true.  There is no question that dynamic pages are necessary for form submission, real-time data, and customized views of data.  In addition, dynamic pages offer great programmability.  Many people are unaware that static pages offer these benefits over dynamic pages:

  • Outstanding performance Static pages can perform 100 times faster than database-driven dynamic pages.
  • Cache utilization Edge caches, network caches, proxy caches, and browser caches are all finely tuned to cache static files and download them only when necessary.
  • Decreased bandwidth use Due to the distributed caches that are present on the Internet, static files consume less bandwidth.
  • Light server load Unlike dynamic pages, static pages put very little load on the Web server.  Static pages can be served at rates of thousands of pages per second, while leaving plenty of CPU cycles for critical dynamic pages, like shopper order processing.
  • Reliability Dynamic pages are executed at the time of request, and they run a bunch of page code and usually depend on external resources, like components and database servers.  If anything breaks - other requests are holding up the ASP queue, the code raises an error, the database isn't available, a component causes a GPF, the database server is down, a database record is locked - any of these events (plus many more) will cause a page error and frustrate the customer.  How can you be sure that you've tested every combination and that none of these events will occur? In contrast, static page requests run a single, very well tested and highly optimized code path.  None of these events will cause an error when requesting a static page.
  • No Web server required Static pages can be viewed off of hard drives, network shares, CDs, disconnected laptops, and they can be distributed as product documentation.  Dynamic pages cannot be used for any of these purposes, because they require a Web server, database, components, etc.
  • Coverage by search engines Search engines typically don't index pages with query strings.  Sites that display content in static pages receive superior coverage from search engines.

APGen combines the programmability of dynamic pages with the benefits of static pages.  By making your pages programmable, you can re-use content across your site, and decrease the costs of authoring and maintenance.  By pre-rendering static pages, you receive all the benefits discussed above.

APGen can also be used for generating dynamic pages - in many cases some of the page content needs to remain dynamic, like ads or shopping cart contents.  In such a case, you lose some of the benefits of static pages.  Many of the benefits are retained, including: Improved performance, lighter server load, increased reliability, and search engine coverage.

We'd like to decrease the download size of our home page by using HTTP 1.1 compression - does APGen support this?

There are two types of compression you can use: HTML compression, which reduces file size for clients that don't support HTTP 1.1 compression; and HTTP 1.1 compression.  We suggest using both to minimize download size for all clients.

HTML compression involves removing unnecessary whitespace and comments.  The Output.BufferContents page shows how to compress the output of an APG script so the resulting output file is smaller.

IIS 5.0 includes HTTP 1.1 compression, for both dynamic and static pages.  Compressing static pages is more efficient, because dynamic pages have to be recompressed on the fly for every page view, whereas compressed static pages are cached by IIS.  The best choice for speeding up your home page and download speed is to make it static with APGen, and then use IIS 5.0 to compress the page.  IIS 5.0 is smart enough to send the compressed page only if the browser supports HTTP compression.

It looks as if my ISP has to install APGen on the Web server to use it. Is that correct?

There are two ways to use APGen; we have customers doing both:

  1. Run APGen locally, to generate static pages and dynamic pages.  The generated files are uploaded to the ISP.
  2. Run APGen on the Web server.  This is recommended if you want immediate page updates.  For example, when someone rates a product, if you want to immediately re-generate the product page, you would need APGen on the Web server.

The tradeoff is that 1 works well for periodic builds, 2 is best for automatic page updates.  You can also automate periodic local builds, regenerating pages several times daily and uploading the changed pages.




Home  |  Products  |  Community  |  Sales  |  Support  |  Company
Mailing List  |  Services  |  Press  |  Search  |  Privacy  |  Contact Us