There are two things to remember when creating an ASP (an Active Server Page):
- ASP is a technology, not a programming language
- all of the action takes place on the server, not the user's pc
So, before creating an ASP it may be worth looking at those two points in a little more depth.
ASP is a Technology, not a Programming Language
Many people believe that ASP is a programming language - it's not; it is piece of software that sits on the server and interprets the scripting languages; for example, it is possible to use:
- Javascript
- PerlScript
- VBScript
Interestingly it is actually possible to mix and match scripting languages in the same ASP web page.
All the Action Takes Place on the Server, not the User's PC
Javascript and VBScript can be used in any web page, and if they are then the code is downloaded to the user's computer and then run by the browser; however, there can be problems with doing this:
- Firefox will only run Javascript
- Internet Explorer will run either Javascript or VBScript, but it's interpretation of Javascript is slightly different to Firefox's
The solution is to run everything on the server, not the client (the user's pc); if web site developers run all of the code on the server then they can guarantee that the code will run, and they only need return the results of any processing to the user - hence ASP.
Of course, there is another advantage to using ASP - all of the code is hidden and all that the user sees is the output from the script. However, there is a potential disadvantage to be aware of - if the server is doing all of the processing then there is the possibility of it becoming overloaded, especially if the web site becomes very popular.
All Servers are not Created Equal: Does My Server Support ASP?
ASP is a Microsoft technology, and so one might expect ASP to be only available on Microsoft web servers with IIS (Internet Information Services) and normally that is the case; however, there are solutions for anyone with Linux servers:
- install the Sun Java System Web Server (also known as Chili!Soft - see Running ASP on a Linux Server)
- install Mono XSP (although that only supports c# - see Mono XSP: Open Source ASP.NET Development)
Of course, the easiest answer may be to choose a suitable ISP (Internet Service Provider) and let them do all of the hard work.
Choosing an Editor
Once the web server has been set up, or arrangements made with an ISP, then consideration can be given to the ASP itself - and for this the developer will only need a text editor. Editors such as Notepad on Windows or Emacs (even Nano or Pico) on Linux will suffice, but it's worth looking into editors such as Notepad++ which have benefits such as:
- syntax highlighting - this can aid when writing code (by highlighting key words)
- FTP (File Transfer Protocol) which means that files can be uploaded directly to a web server
Notepad++ even has a word count function (see The Notepad++ Word Count).
Writing an ASP
The ASP itself can be a mixture of scripting languages; in this case Javascript and VBScript are used in the same page:
The code can now be saved (via the editor's FTP functionality) to the server and then called from a web browser, for example:
Conclusion
So, remember:
- ASP is a technology, not a programming language
- all of the action takes place on the server, not the user's pc
Any web designer with access to that technology has a very powerful tool at their disposal.