Pros and cons of using IIS, ASP, PerlScript and ADO on Windows NT
Observations on the pros and cons of using these to produce a web application.
This document records some observations on the pros and cons of using Microsoft Internet Information Server, Active Server Pages, PerlScript and ActiveX Data Objects together on Windows NT to produce a web application.
Ideally it would be possible to consider each of these components independently, but this is not generally the case. This is why, when choosing a web server, programming language, programming language interface, and database interface, it is important to consider whether the choice of one restricts the choice of any of the others.
In the past, Common Gateway Interface (CGI) was a standard interface between the web server and the programming language. Nowadays the two are usually more closely integrated for better performance and functionality. The downside of this is that this web server interface may impose a dependency on the programming language and even on the code itself. For example using Active Server Pages restricts your choice of programming language and will make some of your code dependent on Microsoft Internet Information Server.
Internet Information Server (IIS)
Microsoft Internet Information Server (IIS) is Microsoft's 'enterprise' web server.
Pros
The graphical user interface (GUI) helps new users. IIS has good integration with Performance Monitor, which provides for easy access to extensive usage statistics.
Cons
- IIS is not robust and can easily be made to 'hang' so that the server must be rebooted to recover. It is certainly unacceptable for an NT Service to fail in this way.
- IIS can only be configured using the GUI, which can be a complex and laborious manual process in a production environment. There seems to be no way to encapsulate all of the settings in a single configuration file, as you can with Apache, which is essential for configuration management.
- IIS lacks flexibility in many areas. For example, there is almost no way to control how URLs are parsed.
- Remote administration and configuration of IIS is almost impossible, as this can only be done using a crippled web-interface that, of course, requires IIS to be running and correctly configured!
- IIS is only available for Windows.
Conclusion
Almost none of IIS' 'unique selling points' are unique, or selling points. Avoid IIS; instead use Apache, the industry standard web server.
Active Server Pages (ASP)
ASP is an IIS plug-in that pre-processes web pages, allowing you to embed server-side code in a more efficient way than CGI.
Pros
ASP provides a simple interface to user-session management and cookies, which is very useful for most web applications. Using the Windows Scripting Host, ASP also allows a choice of programming language: VBScript, JScript or Perl.
Cons
ASP does not expose HTTP variables as environment variables, which is the conventional approach in web server programming environments (because VBScript cannot access environment variables). Instead a 'Request object' is used, which makes code specific to ASP.
Conclusion
ASP is a good environment for web applications programming, but it offers no particular advantages over the alternatives that it is copied from, such as PHP, GNU Server Pages or the various forms of embedded Perl, such as the Apache::ASP Perl module for Apache. In fact, these alternatives are generally superior to ASP.
PerlScript
PerlScript is ActiveX scripting engine for ActivePerl, ActiveState's Perl distribution for the Win32 platform. PerlScript allows you to use Perl as the ASP language, instead of VBScript or JScript.
Pros
- The ActivePerl Perl distribution is extrememly straightforward to install and use.
- ActivePerl installs a very usable set of the complete Perl documentation.
- The Perl Package Manager (PPM) makes it ridiculously easy to download and install Perl modules from the huge number available on the Comprehensive Perl Achive Network (CPAN), so there is no need to compile or 'build' anything.
- It is straightforward to run programs interactively at the command line, which is useful for debugging. This is not easy to do with some other languages.
- As Perl is the most widely-used programming language for web server applications, the support and documentation available on the web surpasses that for all other languages, either because they are less popular or because they are not as closely associated with the web.
- Perl is independent of the other technologies involved, such as VBScript.
Cons
Perl can be a messy language and requires programmer-discipline to produce maintainable code. This is because 'There's More Than One Way To Do It', as the Perl motto goes, which means that coding styles can vary a lot.
Conclusion
Perl is a good choice of server-side programming language, particularly because it is extrememly well-established in this area. Furthermore, CPAN provides access to an unrivalled repository of high-quality Open Source third-party code. However, other languages such as PHP and Python have certain advantages over Perl, such as cleaner implementations of Object-Oriented Programming.
ActiveX Data Objects (ADO) and OLE DB
ADO is Microsoft's high-level data access interface; OLE DB is Microsoft's low-level data access interface.
Pros
There is very little to recommend ADO other than the fact that it works and doesn't require any complicated configuration.
Cons
There is very little official ADO or OLE DB documentation and, because neither are widely used, there is very little information available on the web. This is in stark contrast to Perl DBI, for example. The situation is even worse for OLE DB.
Conclusion
ADO might be a good choice if you have already decided to use IIS and SQL Server, because of the level of integration. Otherwise, a more mainstream database interface, such as ODBC or Perl DBI would be a better choice.