newman     VBWeb     VBSource     Portfolio    

Compare ASP


InterDev is yet another product that doesn't let you step through the code.
Visual InterDev is an Integrated Development Environment (IDE) for developing Active Server Pages (ASP). ASPs are files that contain a mix of HTML and server side VB Scripting. They are interpreted by a part of the web server installed with InterDev called Denali. Denali plays the same roll as the part of a web server that enforces the CGI protocol. There are several advantages to InterDev. For one thing, it is fully featured and competes with the top database enabled web site development products.
Stepping Through Code
For such an advanced environment, it's surprising how hard it it to debug. InterDev is yet another product that doesn't let you step through the code. The developer must resort to pushing debug messages onto the page. VBWeb can save a request so that you can rerun the request in the VB IDE. That way, you have all of VB's debug features at your disposal.
Persistent State Information
InterDev solves the biggest complaint about CGI, the loss of persistent state information. If you have heard the web referred to as a stateless environment, here's why. With CGI, each time a visitor clicks a link to your site, a program starts, sends a page, and then closes. Once the program closes, any database connections and global variables are lost. If the visitor surfs ten pages in your site, the program makes ten database connections. That is a waste of time.

For another demonstration, consider a typical shopping basket style site. A visitor picks out a book he wants to buy and then he wants to keep on shopping. Your site has to remember that book for when the visitor finally decides to check out. In VB, that's easy. Just declare a global array. That array exists in the PC of each user. But on the web, the web site itself has to maintain those arrays for all the visitors. When a visitor picks out another book or checks out their order, the web site has to figure out which array belongs to that visitor.
With cookies, you can program your own Session Object.
The Session Object
To simplify this problem, InterDev provides the Session Object. In some ways, the Session Object is analogous to the General Declaration section in VB. If the developer declares an array in the Session Object, InterDev keeps a copy of that array for each visitor. InterDev has ways of figuring out if a visitor has been at the site recently and restores the Session Object for that visitor with the array in it. The Session Object can be used to keep database connections and much more.
The VBWeb documentation describes how to use Cookies.
How does InterDev know which Session Object to restore? If you are familiar with CGI, you might have used the REMOTE_ADDR server variable. It returns the IP address of the visitor. With it, you store data in a table that is indexed by the visitor's IP address. But if two visitors dial in through the same Internet Service Provider (ISP), they will appear to have the same IP address.

The solution is in cookies. Cookies are values stored by the visitor's browser at the instruction of the web server. The web server gets the stored value back with each request from the visitor. Despite what you may have heard, cookies are safe. Only the web server that instructs a browser to store a value can get that value back.

InterDev uses this feature to store a Session ID. InterDev looks for that Session ID cookie with every request. If no Session ID is found, then InterDev picks an available Session ID, tells the browser to keep it, and then it starts a new Session Object for that visitor.

Although VBWeb does not have a Session Object, it does provide support for cookies. With cookies, you can program your own Session Object as described later in this documentation.
Most designers find the VBWeb method better than InterDev's ASPs.
HTML Templates
One advantage to InterDev is the way it mixes server side scripting in with HTML into the ASPs.. You can use your favorite HTML editor without wrecking the scripting. This is a big problem for CGI scripts. In CGI scripts, the HTML is berried within the scripting. It is hard to pair up the start and end tags by eyeball because indenting follows the scripting and not the HTML berried in it. HTML maintenance makes things even harder. You cannot use an HTML editor.

There is a way to get the advantages of InterDev's ASPs into CGI. The idea is to separate the HTML from the scripting. An HTML template is an HTML page that contains place holders. The CGI script puts data in the page by replacing the place holders. That way, the scripting is not cluttered with lots of static HTML. VBWeb provides a complete set of text functions. Even if you decide to go with WinCGI over VBWeb, these functions can be used to improve development. Most designers find the VBWeb method better than InterDev's ASPs.



You may download VBWeb for free but you may not distribute VBWeb or use any part of it for commercial use or profit without a signed written agreement between you and NEWMAN Services Corp. 973-228-5753

Feedback Comments
Return Address (if you want a reply)