Ask the ASP.NET Team

Your Source for ASP.NET FAQs

Ask Microsoft

FAQs

 

Ask the ASP.NET Team

Your Source for ASP.NET FAQs

 

By Rob Howard

 

Welcome to the premiere issue of asp.netPRO magazine! In the issues ahead we'll use this column as an avenue for you to ask those really tough questions directly to the Microsoft ASP.NET team. For example, if you're wondering what really happens when a page is served from the ASP.NET Cache, how the new out-of-process session state works, or just how to dynamically create controls, simply send us your questions! (In addition to answering three to five questions in each issue, we'll also send the submitter of the best question a limited-edition ASP.NET t-shirt.)

 

To submit your questions for the next issue, please send an e-mail to the following address: [email protected]. We won't reply to you directly unless you won the t-shirt (or another cool prize), and we promise not to share your contact information.

 

Let's start the premiere issue with some common ASP.NET questions.

 

What Is the ASP.NET Premium Edition, and Where Do I Get It?

There are two versions of ASP.NET available for Beta 2: the standard version that ships with all versions of Visual Studio .NET and the premium version.

 

The two versions are slightly different, with more features enabled in the premium edition than in the standard edition, namely: out-of-process Session state support, support for Web gardens (the ability to affinitize an ASP.NET worker process with a processor on the server for a multi-processor box), and output caching.

 

The premium edition can be obtained from http://www.asp.net - just look for the link to download ASP.NET. It's a 19MB install and can be installed over an existing Beta 2 installation of Visual Studio .NET or ASP.NET. The features described above will then be available.

 

There will not be a premium edition of ASP.NET for the final RTM (release to manufacturing), and ASP.NET will be a free download.

 

Where Can I Find Additional Resources for ASP.NET?

There are lots of great resources for ASP.NET. Our team has been hard at work with third-party Web sites (there are over 40), publishers, authors (there are more than 30 ASP.NET books and 250 total .NET books planned), conferences, user groups, and Informant (the publisher of this magazine).

 

At http://www.asp.net we attempt to maintain a listing of all the known ASP.NET resources - and it's getting hard to keep up! In addition to the http://www.asp.net Web site, we also encourage people to check-out another great resource for .NET content: http://www.gotdotnet.com.

 

Why Does ASP.NET Perform Better than ASP Classic?

There are many differences between classic ASP and ASP.NET as it relates to performance. Let's look at the top three issues, starting with ASP classic:

1)        No Strong Typing. ASP classic code was interpreted by the ASP ISAPI extension and the code could be written in several scripting languages, with the usual choices being VBScript or JScript. Scripting languages are not strongly typed; rather all variables were treated as type Variant and at run time were coerced into the appropriate type. For example:

 

Dim i

 

Without strong typing, ASP had to figure out the intended meaning of the type at run time, which meant additional work.

2)        Late Bound. The instantiation and use of objects was all done late-bound. Again, at run time the determination would be made as to whether or not the object actually supported the method that was being called.

3)        Interpreted. Lastly, as previously mentioned, ASP code is not compiled; rather it is interpreted. ASP converted the script code into a temporary byte code format and stored this byte code within a ScriptEngineCache. Rather than re-interpreting the ASP code on subsequent requests, the ScriptEngineCache containing the byte code could be executed.

 

ASP.NET is a paradigm shift from existing Web development technologies, but for ASP in particular, the corresponding changes are:

1)        Strong Typing. ASP.NET applications can be written using any language supported by the Common Language Runtime. Although code can still be written that is not strongly typed, you can now write code that declares a variable to be of a specific type. For example:

 

Dim i As Integer

 

With strong typing, the compiler knows the variable type at run time and is able to access and manipulate that variable as the type it declares. The net result is the compiled code is more efficient.

2)        Early Binding. In addition to strong typing, we can now early bind to objects. In addition to giving us better performance, this means that tools such as Visual Studio .NET can provide method or property names on classes as we instantiate them.

3)        Compiled. Rather than being interpreted like classic ASP, ASP.NET code is fully compiled. Upon the first request to an ASP.NET application, the ASP.NET file is parsed and compiled into a .NET class that is then cached on the disk. On subsequent requests that cached version of the class can be loaded into memory and executed.

 

That's it for our first "Ask Microsoft" column. We look forward to some great questions for the next issue!

 

Rob Howard is a program manager on the ASP.NET team. He also writes MSDN's 'Nothing but ASP.NET' column, and is a co-author of Wrox's Professional ASP.NET. The ASP.NET team wants to hear from you. Send your questions to [email protected].

 

 

 

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish