|
If you`ve developed dynamic, data-driven websites for very long, you have no doubt run into this question from your customer:
"We want to put the website on a CDROM so our agents can show the website at the convention without an Internet connection."
Of course, to the client, this is a simple request--just copy the website to a CD! You, the programmer, understand that the website requires a database engine, drivers, and a webserver capable of processing ASP/VBScript! You cannot just "copy to a CD". You may also be using some components or DLL`s in your application that further complicate this "simple" request.
The basic problem is turning a single ASP page such as "/forum/products.html" that may generate thousands of unique pages depending on the querystring, into static HTML pages:
The next step of converting the data-driven website into a static HTML website is to convert all your links. So if you have a page that lists products with links to the product detail such as:
products.asp?id=1
products.asp?id=15
products.asp?id=743
You now need these links to be links to the new, static, product-specific HTML page.
There are tools such as Teleport (http://www.tenmax.com/teleport/pro/home.htm) that at first glance look like they would handle the task -- especially when your customer reads the product`s marketing blurb! However this tool, as nice as it is, simply makes a local copy of an already static website.
What about if your ASP application has pages that use pagination? Maybe you have 1000 products, and your catalog shows 20 products per page. So again, you have a single ASP page (maybe "/forum/catalog_prodID_47.html") that itself is really multiple pages due to pagination. Turning this into a static version requires more than just copying the static output to a new file--you have to link the multiple pages together with navigation back and forth.
There is an article here on CodeToad that could be helpful if I decide to just do the very time-consuming conversion: http://www.codetoad.com/asp_dynamic_static.asp
This is how I could write code to generate the static HTML pages automatically. But then I still have to go back through the pages that link to these pages and make the links work.
I`ve looked for tools to automate this process, but in my programmer`s brain, I can`t really think how you could write and package a generic program to convert any data-driven application into a static website. But I didn`t think the Internet fad would last either! (just kidding)
Some things such as the contact form that sends an email server-side cannot be turned into a static HTML page and expect it to work from a CDROM! So my strategy right now is simply to determine what will work and what won`t work in a static environment, then write code to automate the HTML page generation as much as possible. I`ll have to manually clean up everything else. I want the process to be automated as much as possible so that next month after the data has changed significantly, I can re-generate the static CDROM version of the website.
Any great ideas?
|
|
|
|
|
|
|
|
|
|