This page contains some suggestions on how to go about your Dynamic-CD development. However, there is no one correct way to proceed.
Web and CD versions
If your web site appears online and on a CD, then you must first decide how to manage both sets of information. It is most likely that your online web site will be the primary dataset and that your CD will be a snapshot or subset of your web site. For example, you may be able to prepare an order from a product database on the CD, but it only makes sense to process the order online.
You could decide that the Web and CD versions of your web site must be identical. You will have to check carefully that everything works in both situations. In particular, you must check that scripts and databases run OK.
Alternatively, your CD could be a subset of your online web site. However it is still possible for there to be common scripts. A script could only show certain links if it detects that it is running online.
If you use databases, then you will almost certainly have to move the database files into your CD image, and password-protect them in Access (in Menu Tools+Security). Your database scripts will need updating, at the very least to make sure that the database is opened from the correct location (see example).
It is quite likely that you will only want a stripped down database to appear in your CD image, eg the product information but not the customer information.
If your Web and CD site are different, then it is worth while automating the process of generating one from the other. If you web site is the main source, then write batch files and database conversion tools that allow you to generate the initial CD image easily whenever you need to start producing a CD snapshot of your web site. Make sure that any CD script files that you write are not overwritten accidentally by this process; perhaps save them first and copy them back in afterwards.
To use Dynamic-CD you must have a copy of your web site on your hard disk. Here are two possible ways to structure your hard disk:
CD Web site Only
If you are creating a CD from scratch then this directory structure is suggested.Start with a Project directory. Replace Project with the name of your project.
CD is a subset of an online web site
If you are creating an online and CD web site from scratch then this directory structure is suggested.Start with a Project directory. Replace Project with the name of your project.
Build your web site
If you have not already done so, build your web site in the appropriate directory. If you are making an online version of the web site, make it in Project\Online. Otherwise make the CD Source in Project\Source.
For a simple project, you can view the web site in-situ without creating a CD image. However if you are using scripts, databases or password-protection, you will need to make a CD image with Dynamic-CD-Wizard to see the CD site in action.
Choose a program editor
You can develop your site using your usual web development tools. If you are writing scripts you may wish to get a suitable programming editor, such as the Microsoft Visual Studio tools. This will highlight your ASP code and possibly do syntax checking.
Note that you cannot do source code debugging with Dynamic-CD.
Get the documentation to hand
When you are writing scripts if it helpful to have all the documentation to hand. In particular you may want to refer to this information:
Build your database
If you have not done so already, build your database. Use Microsoft ACCESS® to create a
Remember that you cannot update your database from CD, so everything will be read-only from CD. There is no point in creating a Customer table because you will not be able to add anything to it. You will have to use other techniques to save information that you want to pass between pages on your CD, eg forms, cookies, the session object or a file. For example, use the FileSystemObject object to store information in a file in the current user's Windows temporary directory - obtained using Request.ServerVariables( "WINDOWS_TEMP_DIR") .
If you really want to, you can copy your database onto the user's hard disk using FileSystemObject , eg to the Windows temporary directory. Change the read-only file attribute to make the database updatable.
If your CD database is based on your online database, be careful if the two will be linked
at some stage. Suppose, for example, that you build up an order using the CD database
and then send the completed order to your online system. You must make sure that you
use a safe way of linking order lines together. If you use an Access "Autoindex"
Start writing scripts
You are now ready to start writing scripts. Begin by copying some of the examples in the Dynamic-CD documentation - check that you can get them to run. Study them carefully so that you see how they work and how they are structured. Most folk start off with simple code, testing each routine as it is written to make sure that it works.
Build and test your CD image
When you want to do a test run of your CD, use Dynamic-CD-Wizard to build a CD image. Initially you can test the CD image direct from your hard disk. Soon however it will be best to burn a real CD-R so that you can check that your CD runs correctly on other computers.
Start Dynamic-CD-Wizard. Click the "New" project button if necessary, and enter the name of your CD. Proceed through the rest of the wizard pages, following the instructions that are available by pressing the "Help" button. If you followed the earlier directory layout suggestions, then use Project\Source as the source directory and Project\Image as the image directory.
When you have got to the final page of Dynamic-CD-Wizard, click on the "Test on hard disk" button to start Dynamic-CD and display the CD startup file.
Do not exit from Dynamic-CD-Wizard. Instead, keep it open to make it easy to try updates to your site. Pressing the "Rebuild CD image" button remakes the CD image. A warning box is shown because the rebuild process first has to delete all the files and sub-directories in the CD image directory. When the CD image is rebuild, click on "Test on hard disk" to try out your latest version.
A development cycle is when you repeatedly change your site and test it.
You might be developing some script code. With each change you need to remake your CD image and restart Dynamic-CD. As described above, Dynamic-CD-Wizard makes it easy to do this. Leave Dynamic-CD-Wizard on the last wizard page (once you have built the CD image once). After each change, press the "Rebuild CD image" button to remake the CD image, and "Test on hard disk" to try out your latest version.
Note that you cannot do source code debugging with Dynamic-CD.
© Copyright 2000-2007 PHD Computer Consultants Ltd