Wise ASP Logo Surfer's Choice Member
   

Wise ASP - What is Active Server Pages.net ?

Getting Started

  ASP has been rebuilt from the ground up. The result is ActiveServerPages.net. ASP.net, with a host of new features, provides for easier to write, cleaner code that's simple to reuse and share. ASP.net boosts performance and scalability by offering access to compiled languages.

   ASP.net will be offered at no charge on Microsoft IIS 5.0, IIS 4.0, as well as personal versions for Windows 95 and Windows 98. Only the Windows 2000 version and Windows NT are available during the Beta 1 timeframe. The other platforms will be supported at a later date.

  ASP.net takes a giant leap from the existing ASP architecture. The whole infrastructure allows for development of structured applications. Web Forms will bring a development model that is more intuitive and certainly easier to use. Server Controls add the ability to provide common features and makes extending and enhancing existing functionality easier. Data binding allows simple creation of data-bound applications.

  The underlying structure of ASP.net is very different to that of previous versions. ASP.net is almost entirely component-based and modularized, and every page, object, and HTML element you use can be a runtime component object.

  ASP.net enables a new breed of Web applications. The current crop of Web applications. ASP.net will allow developers to produce more dynamic, scalable applications that better meet the business needs of companies, as well as providing a richer development environment. At first glance, you might think these new features would make writer applications harder. However, many aspects of development in ASP.net are much simpler. Let's look at some of the features in ASP.net.

Compiled Languages

  Existing versions of ASP are based on scripting languages like VBScript and JScript. Scripting languages suffer from two major flaws: they are interpreted, and they are not strongly typed. Both of these lead to performance hits. ASP.net has introduced support for fully compiled languages, giving you the ability to write your server-side code in Visual Basic. One great advantage of Visual Basic is the support for strongly typed variables. In addition to Visual Basic and C++, you can also use the updated Microsoft language, C# to write your server-side code. With ASP.net, compilation occurs when the page is first loaded. Even scripting languages are compiled before execution. So JScript pages will also see a performance improvement.

Web Forms

  ASP.net Web Forms are Web pages that you let write code just as you do for ASP today. More than that though, ASP.net Web Forms are designed on top of an object-oriented programming model, enabling code resuse and separation of the application code from page content. In traditional ASP this isn't possible because there's no link between the UI controls and their server-side code. In ASP.net, however, there is a link; instead of having to pull out variables from the form variables, you can use the runat="server" attribute on the form and asp:textbox controls. Controls used like this are called Server Controls.

  ASP.net Web Form Pages are text files with a .aspx filename extension. They can be deployed throughout an IIS virtual root directory tree. When a browser client requests .aspx resources, the ASP.net runtime parses and compiles the target. The .aspx file is only compiled the first time it is accessed -- the compiled type instance is reused across multiple requests. More info ...

Using Web Controls

  The biggest challenge facing the Web developer today must be the continued issues of browser compatibility, and the increasing complexity of the pages that they have to create. Trying to build more interactive pages that use the lastest features of each browser, whilst still making sure that the pages will work on all the popular browsers, is a nightmare that refuses to go away. To this end, ASP.net introduces the concept of server controls that encapsulate common tasks and provide a clean programming model. These server-based controls send pure HTML to the browser -- there's no client-side script involved. In fact, one of the key design objectives was to stick with the intrinsic 3.2 elements to provide the best possible compatibility. Although the default output of ASP.net Web Controls is HTML 3.2, they can also output DHTML for uplevel browsers such as IE 5.0. This enables you to have controls that send DHTML and client-side scripting to recent versions of Internet Explorer, and plain HTML 3.2 to other browsers.

  ASP.net will ship with five families of Web Controls:

  • Intrinsic controls that map to their HTML equivalents
  • List controls to provide data flow across a page
  • Rich controls to provide richer UI content and functionality
  • Validation controls to perform a variety of form validation
  • Mobile controls to encapsulate WML
  The intrinsic server controls are similar to HTML controls. List controls will ease creation of lists and radio buttons and checkboxes. The rich controls consist of Calendar and AdRotator. The Calendar control with output pure HTML for downlevel browsers, or DHTML for uplevel browsers. The validation controls will provide easy ways for developers to build validation into form handling. Also, you are not limited to using only the supplied controls. It is fairly easy to author your own.

Data Binding

  One of the new Web Controls is the DataGrid, which has built-in support for rendering sets of data. To generate an HTML table from SQL-generated data, you simply create ADO+ objects and execute the command to get the data, which you use as the source for the grid

Using ASP.net Caching

  To build a high-performance, scalable Web site, you are bound to use some form of caching. Certain page-building operations are expensive to construct, and caching them once they have been constructed saves server resources and allows them to be served more quickly. There are plenty of tricks you can use with existing ASP applications to improve speed, but none go as far as the features that ASP.net has to offer, including:

  • Page level caching
  • Data caching, which allows portions of pages to be cached
  • Cache API, which gives programmers access to the cache engine

  Page caching is the simplest, and allows dynamic pages to be output-cached so they are served directly from the cache rather than exeucuted on every single request. Data caching will offer the same degree of control over individual portions of an ASP.net page. Both of these techniques use the Cache API, which is exposed to the programmer to allow you to cache your own objects.

Page Events

  ASP.net has been rewritten with object-orientation in mind as you might have guessed. At the top of the object tree is the Page object. Each ASP.net control, application, and page inherits from Page. This means that each page is an instance of the Page object. This becomes important when you realize that the Load event of the Page is an event that you can respond to, as you are used to in Visual Basic. During the user's interaction with the user, other events are generated, and then the UnLoad event is fired when the page is unloaded.

Using Debugging and Tracing

  One of the goals of ASP.net is to make writing applications easier, and debugging is a key part of development. The way that ASP.net pages are compiled allows COM+ to hook into them as the are being executed and provide a rich debugging environment. Profiling and tracing are also important techniques used during development. Apart from Response.Write, it has never been easy to monitor the progress of an ASP application. ASP.net provides two levels of tracing services that make it easy to do just that.

  • Page-level Tracing - At the page-level, developers can use the TraceContext instrinsic to write custom debugging statements that appear at the end of the client output delivered to the requesting browser. Because tracing can be explicitly enabled or disabled for a page, these statements may be left in the production code for a page with no impact to the page's performance.
  • Application-level Tracing - Application level tracing provides a view of the inputs and outputs to a page, such as form and querystring variables or headers, as well as some important statistics about the page's execution (control hierarchy, session and application state). Application-level tracing is enabled via the ASP.net configuration system, and accessed as a special mapped URL into that application ("trace.axd"). When application tracing is enabled, page-level tracing is automatically enabled for all pages in that application.

Configuration

  ASP.net configuration information is stored in XML files. If you change one of these files, thereby updating the configuration, the common runtime will automatically pick up and propagate any change that you have made. ASP.net will also support the deployment of a fully compiled application. The benefit is that none of the source code is visible to the administrator of of the Web server - an important feature if another company hosts your appliation.

  That's the end. Thanks for reading and feel free to jump around Wise ASP using the select box at the top of the screen.

88x31cardsvisoranm