Introduction

ASP is a Microsoft technology which allows to embed scripting languages into HTML pages. The scripting language is not fixed - besides JavaScript and VBScript, other enabled languages like Perl and Python can be hosted by the scripting language.

ASP pages look and behave like HTML pages, but they usually have embedded special tags which change their behavior, produce generated HTML ouput, read from databases and more. The HTML preprocessor (MS Internet Information Server) scans an ASP page for special commands between "<%" and "%>" tags and performs according actions.

Enabling the scripting engine for different languages is a great idea. The server has a single COM object model for itself which it publishes to the scripting engine which is used in the ASP script. It is upto the engine to combine these global objects (Response, Request, Session, Application, ...) with its own namespace.

This approach has its advantages and disadvantages. A major advantage is the possibility to create HTML pages interweaved with code in a way that the HTML part can be edited with a standard WYSIWYG HTML editor. Examples are MS Frontpage, Macromedia Dreamweaver, Hot Dog or Claris Homepage, to name a few. The special tags are treated as comments and stay intact, if one is a bit careful with editing.

A drawback is the general idea to mix HTML with code. Other systems like Digital Creation's Bobo try to avoid this by dividing code and HTML into python scripts and document template pages. After a deeper look, you will recognize that these approaches are not so different as it looks in the first place. With a little discipline, it is possible to reduce the Python code in an ASP page to its bare minimum - just define a row of function definitions which wrap the HTML pieces. A closer look at Bobo shows that they too can't completely go without code in HTML, it is just done by introducing another embedded little language.

I believe it is possible to map both techniques to each other, at least there is a useful common denominator. Document template pages and ASP pages can be made quite compatible to some extent. The majority of differences is in the syntax which is no real problem.

I'm planning to add examples on converting ASP to Bobo and back when I have gained some more experience. Comments on this page are always welcome - see you in the news group.