ASPAlliance ASP Kitchen  
Search: Go  

An ASP Documentation Tool™

This article describes the ASP Documentation Tool™, a utility I wrote to automate the documentation of web applications developed using ASP 2.0 or 3.0 and the VBScript and JScript scripting languages.

When developing applications using Java and Perl, I've always been impressed with the JavaDoc and PerlDoc documentation utilities these languages support. When producing work for a client, these utilities take a lot of the hard work out of the mundane (but critically important) work involved with documenting the project.

Unfortunately there is no such standard documentation utility for ASP, and having not found a suitable commercial offering, I decided to write my own documentation utility for ASP. Since I often work on projects inherited from other developers, such a utility would be able to give a useful overview of the project without having to manually look through the ASP code. The utility would also (hopefully!) create much of the low level documentation required when handing over work to clients, saving valuable development time.

The ASP Documentation Tool use a graphical user interface to edit the ASP Documentation Tool's configuration options
Figure 1. The ASP Documentation Tool™'s GUI. Click image for full sized version.

Features

The ASP Documentation Tool™ scans all the files of a web project, and outputs a report based on what it finds within the files. The report contains a list of the following:

  • A summary of the project.
  • Pages within the site (.asp, .asa and .inc - other file types may be added if required).
  • Full source code for each page, with optional syntax highlighting.
  • A list of VBScript functions in the site, showing where they are defined and used.
  • A list of VBScript subroutines in the site, showing where they are defined and used.
  • A list of JScript functions in the site, showing where they are defined and used.
  • A list of client-side JavaScript functions in the site, showing where they are defined.
  • A list of ActiveX objects, showing where they are instantiated.
  • A list of VBScript constants.
  • A list of HTML Forms and Form elements.
  • A list of Request.QueryString, Request.Form and Request.ServerVariables used.
  • A list of email addresses used in the site
  • A list of ASP Application and Session variables used.
  • Details of SQL Server 2000 user tables and stored procedures in database(s) associated with the project.
  • Details of Microsoft Access tables and queries in database(s) associated with the project.

The report is produced in standard HTML [view sample], with an option to export the report in Microsoft's HTML Help  [view sample] and plain text format [view sample]. The HTML output can be viewed in any web browser on any operating system. By contrast, the HTML Help format is restricted to machines running Microsoft Windows. HTML Help does, however, have some useful advantages over the standard HTML output:

  • The documentation is stored as a single .chm file, making it easier to redistribute.
  • The documentation contains a useful table of contents showing an overview of the site.
  • There is an index as well as a search facility.
  • The search facility also allows full searching of the source code of each page in the documented website.

The HTML Help report compiled by the ASP Documentation Tool™ allows easy searching of the project documentation, including the ASP source code
Figure 2. The HTML Help report compiled by the ASP Documentation Tool™ allows easy searching of the project documentation, including the ASP source code.

System Requirements

The ASP Documentation Tool™ is written in Perl 5, but has been compiled into a Windows executable file that can be used on any machine without requiring Perl.

If you want the ASP Documentation Tool™ to create a report in HTML Help format then you will need to download and install the HTML Help Workshop. This is a free download from Microsoft.com. It is strongly recommended that you install the HTML Help Workshop to the default location, which is C:\Program Files\HTML Help Workshop. If the HTML Help Workshop is installed elsewhere then the ASP Documentation Tool™ will need to be modified to change the value of the variable called "HTMLHelpProg".

Configuring and Running the ASP Documentation Tool™

The ASP Documentation Tool™ is installed using a standard Windows installation routine. There is a graphical user interface - The ASP Documentation Tool™ Configurator - for configuring documentation jobs.

The ASP Documentation Tool™ executable file must be supplied with several command line options which control the behaviour of the script and the appearance of the output report. There are just two mandatory command line options, which are used to specify the input folder (i.e. the folder containing the ASP files that are to be documented) and the output folder (i.e. where the report should be placed).

Option What it does Example
--i Input folder containing the website's files. Use a vertical bar to specify more than one input folder (useful if your includes are in a separate location). "C:\inetpub\wwwroot\mywebsite", or
"C:\Inetpub\wwwroot\SampleWeb|C:\Inetpub\wwwroot\includes"
--o Output folder where the report should be placed "D:\reports\mywebsite"

So the following command when typed in the folder in which the ASPDocumentationTool.exe resides would document the web project in C:\inetpub\wwwroot\mywebsite and output the report in the folder D:\reports\mywebsite:

ASPDocumentationTool.exe --i="C:\inetpub\wwwroot\mywebsite" --o="D:\reports\mywebsite"

Note that the script will overwrite a previous report in that folder.

The following command line options are optional:

Option What it does Example
--v Verbose mode outputs script status to console. 0 or 1
--cs Specifies whether the source code of ASP pages and SQL stored procedures should by color coded and syntax highlighted. 0 or 1
--h Whether entities in the source code should be hyperlinked. 0 or 1
--c Whether entities in the source code should be color coded. 0 or 1
--l Whether the source code pages should display line numbers. 1 = numbering, 0 = no line numbering. Numbering is on by default. This is a useful option if you want to use the ASP Documentation Tool™ to create syntax highlighted ASP for publication purposes (like I do on my own ASPAlliance site!) 0 or 1
--txt Whether the report should be exported as plain text format (using the filename "projectname".txt). 0 or 1
--dsn Connection string allowing script to access a SQL Server 2000 database. At the very least this should contain the name of an ODBC data source, together with a SQL Server username and password. "DSN=Northwind;UID=webuser;PWD=Htf674HHs"
--db name of database to document. Use a vertical bar to specify more than one database. "Northwind", or
"Pubs|Northwind"
--hh Whether the output should be compiled in HTML Help format. 0 or 1
--project Specifies a name for the project. "SampleWeb"

As an example, the ASP Documentation Tool™ could be called from the command line using:

ASPDocumentationTool.exe --i="C:\inetpub\wwwroot\mywebsite" --o="D:\reports\mywebsite" --cs=1 --v=0 --hh=1 --project="SampleWeb"

Don't forget that it is possible to run the ASP Documentation Tool™ on Windows machines from .bat scripts, which can of course be scheduled using the AT command or the Windows Task Scheduler.

The ASP Documentation Tool™ reports are created in standard HTML, which can be subsequently edited using any HTML editor. The HTML Help format output may also be edited by using Microsoft's HTML Help Workshop - the HTML Help Workshop project file is created in the output folder along with the rest of the report, and it has a .hhp file extension.

Microsoft's HTML Help Workshop can be used to modify the HTML Help report
Figure 3. Microsoft's HTML Help Workshop can be used to modify the HTML Help report.

The ASP Documentation Tool™ creates a log file in plain text format [view sample].

Obtaining the ASP Documentation Tool™

See downloads section below

The evaluation version is fully functional, but has a few limitations, including:

  • There is no support for ASP written in JScript.
  • There is no facility for documenting SQL Server or Access databases.
  • There is no facility for exporting the documentation in HTML Help format.
  • Line numbering of the source code files is mandatory.
  • There is no text output option.
  • HTML Forms are not shown in the report.
  • VBScript subroutines are not shown in the report.
  • Application Variables are not shown in the report.
  • There is no access to product updates.
  • Pop-up window on all source code pages.
  • This version can only be used for evaluation purposes.

The full version of the ASP Documentation Tool™ is available for online purchase from RegSoft from just $49.99. Purchasing the ASP Documentation Tool™ allows you to download the current version, and all subsequent versions released up to six months from the date of purchase.

Comments/Suggestions?

I've released the ASP Documentation Tool™ in the hope that other users may find it useful! If you would like new features added, then don't hesitate to contact me - most user requests are incorporated into future releases!

Downloads

Further reading

Useful Development Tools

ASP Documentation Tool™
Automatically creates technical documentation for ASP 2.0 and 3.0 web applications written in VBScript and JScript. Documentation for Microsoft Access, SQL Server 7/2000 databases and Visual Basic 6.0 components associated with the web application can also be incorporated into the reports. Documentation is created in HTML, HTML Help and plain text formats.
   View Sample Output (HTML Help format) View Sample Output (HTML Help format).
   View Sample Output (HTML Format) View Sample Output (HTML Format).
   Download Trial Version Download Trial Version (5.2Mb ZIP file).

.NET Documentation Tool
Automatically creates technical documentation for .NET Framework applications written in C# or VB.NET (including ASP.NET). Documentation for SQL Server 7/2000/2005 databases and C#/VB.NET components associated with the web application can also be incorporated into the reports. Documentation is created in HTML, HTML Help and plain text formats. Additional support for ASP.NET web applications. A useful alternative to NDoc!
   View Sample Output (HTML Help format) View Sample Output (HTML Help format).
   View Sample Output (HTML Format) View Sample Output (HTML Format).
   Download Trial Version Download Trial Version (3Mb ZIP file).

SQL Documentation Tool
The SQL Documentation Tool creates technical documentation for Microsoft SQL Server 7.0, 2000 and 2005 databases. Technical documentation is created in HTML and HTML Help formats. The HTML Help format documentation is fully searchable and cross referenced. The SQL Documentation Tool documents SQL Server Tables, Views, Stored Procedures, Triggers, Table Relationships, Jobs and DTS Packages.
   View Sample Output (HTML Help format) View Sample Output (HTML Help format).
   View Sample Output (HTML Format) View Sample Output (HTML Format).
   Download Trial Version Download Trial Version (10.3Mb ZIP file).

VB Documentation Tool
The VB Documentation Tool creates technical documentation for Microsoft Visual Basic 6.0 projects. Technical documentation is created in HTML and HTML Help formats. The HTML Help format documentation is fully searchable and cross referenced.
   View Sample Output (HTML Help format) View Sample Output (HTML Help format).
   View Sample Output (HTML Format) View Sample Output (HTML Format).
   Download Trial Version Download Trial Version (1Mb ZIP file).

The Website Utility
The Website Utility examines websites for errors and areas that need to be optimised for search engines by using a built in web crawling engine. Errors checked for include broken or moved hyperlinks, missing page titles and missing meta tags. It also generates HTML for use in creating website site maps (table of contents pages - like this one), and is able to create both client-side JavaScript search engines and server-side ASP search engines and ASP.NET search engines for a website.
   View Sample Output (HTML Format) View Sample Output (HTML Format).
   Download Trial Version Download Trial Version (3Mb ZIP file).

Text Workbench
Text Workbench is a file search and replacement utility for text files and Microsoft Office documents. Make rapid file replacements on multiple files and folders full of files. Advanced replacement options include regular expressions support. It even works on remote file systems via FTP. A Regular Expression Laboratory allows advanced pattern matching and replacement expressions to be built and tested. This great utility will make your everyday development tasks much easier!
   Download Trial Version of Text Workbench Download Trial Version (3Mb ZIP file; you have the option to either install directly from this link or save the file for later installation).

Indexing Service Companion
The Indexing Service Companion is a utility that extends the functionality of the Microsoft Windows Indexing Service so that it is able to index content from any remote website and also from ODBC compliant databases. As such it can be used as a low cost alternative to Sharepoint's Search Services.
   View Product Documentation View Product Documentation (119K ZIP file).
   Try Sample Search Facility Try Sample Search Facility.
   Download Trial Version Download Trial Version (1.7Mb ZIP file).

ASP Spell Check
ASPSpellCheck is the easy way to add spell checking capabilities to your ASP or ASP.NET websites, Intranets and web applications. The utility allows you to add spell checking capabilities to any HTML text field or rich content editing text box. It works with all common web browsers, and there are no components or databases to install on the server.
   Read a review of the ASP Spell Check server component Read ASPSpellCheck Review.
   View Examples of the ASPSpellCheck component for adding spell checking capabilities to ASP web applications View ASPSpellCheck Examples.
   Download Trial Version of ASPSpellCheck Download Trial Version (3Mb ZIP file; you have the option to either install directly from this link or save the file for later installation).

Author details

Brett Burridge has worked as a web developer since 1997 and has developed web applications for a range of corporations, start up busiensses and educational establishments.

Brett is presently employed as an Internet developer and technical writer through his own company, Winnersh Triangle Web Solutions Limited. The company produces a number of innovative products, including a range of software documentation tools, which include the ASP Documentation Tool™, the .NET Documentation Tool for VB.NET and C#, and the SQL Server Documentation Tool. Other products include The Website Utility, which functions as a website error checker, search engine optimizer and ASP/ASP.NET search engine builder application.

As well as the ASPAlliance, Brett has written articles for Ariadne.ac.uk, ASPToday, the software documentation portal www.softwaredocumentation.info, and has contributed recipes to the ASP.NET Developer's Cookbook.    links

Outside web development, Brett is interested in travelling (here are my travel logs from New York, Hong Kong and Tokyo), digital photography (here's my photo gallery), tropical fishkeeping and collecting contemporary works of art by artists such as Doug Hyde.

Contact Brett by emailing

Indexing Service Companion - allows the Windows Indexing Service to index content from remote websites and ODBC databases!!!

Article history

"An ASP Documentation Tool™" published on ASPAlliance.com on 02 June 2002, last revised 11 September 2006.

ASP Kitchen: Classic ASP Articles: An ASP Documentation Tool™

Documentation tools to automate the documentation of SQL Server databases and ASP, C#, VB.NET and VB 6.0 application source code

Download a Free ASP Documentation Tool Now!

Google

Search Engine Builder - Build a search engine for your website!

© page content copyright Brett Burridge 1998 - 2008.