ASP Strengths

Now that you have seen a little of what ASP can do, let's examine the strengths and weaknesses of ASP in more detail. The first strengthwhich is also a weaknessis that VBScript is usually used for scripting ASP pages. The strength of VBScript is that it is derived from Visual Basic, and literally millions of people have at least passing familiarity with Visual Basic. VBScript takes much of its strength from the ease of use that has become the norm for many developers. The support for VBScript in Microsoft Visual InterDev (part of Microsoft Visual Studio) includes the IntelliSense code completion ability that many programmers have become accustomed to. For example, while creating the code for Listing 9-4, I only needed to type Response followed by a period and I was presented with a list of the methods and properties of the Response object. Highlight the correct method or property (either by using the arrow keys or by typing the first letter of the method or property) and press the Tab key, and the method or property appears in the code, with further help on the arguments required for any methods. This is a powerful aide in learning a new programming language.

The second strength of ASP is that the resulting application is often "fast enough." That is, you could certainly find ways to improve performance (as we will discuss), but the application might already be fast enough as written. This is especially true for intranet applications, for which you can get some idea of the likely traffic on the site when it is available. Gauging site traffic is much tougher when you're creating an Internet site. Will your site be the next Amazon.com? If so, pure ASP code will likely not be enough.

When you do hit the wall performance-wise, you just might need to tear everything out and start fresh with another technology, such as ISAPI. It is just as possible that you will be able to do spot optimizations using ActiveX components . For instance, string manipulation can be slow using Visual Basic and VBScript. If you have a page that needs to do a lot of string manipulation and that is causing a performance problem, creating an ActiveX component using the Active Template Library in Microsoft Visual C++ can have a tremendously positive impact. You will see an example of that later in this chapter.

ASP pages also are fairly well integrated into IIS, which is itself fairly well integrated into Windows 2000. This is a terrific advantage, as you can presume that Windows 2000 server machines will have IIS and thus will be able to run any ASP application you create. Documentation and support for ASP is extensive , including Microsoft's MSDN as well as third-party articles and books (some of which I've noted in the annotated bibliography).

Debugging ASP applications has become much simpler as well. In the days of IIS 3, debugging meant placing trace statements that would give you some insights into any problems running the application, or you would need to rely upon error messages that were less than user -friendly. With IIS 4 and later, debugging has reached a new height. You can debug applications on the server or client machines, and the debugger will place you at the line where the error has occurred. Variable values can be displayed as hints when the mouse cursor is placed over the variable in the source, or they can be displayed in a watch window. IIS 5, which is included with Windows 2000, introduces a new Error object that allows much greater control when an error occurs.



Inside Server-Based Applications
Inside Server-Based Applications (DV-MPS General)
ISBN: 1572318171
EAN: 2147483647
Year: 1999
Pages: 91

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net