Sunteți pe pagina 1din 22

Introduction to ASP.

NET

Agenda
Introduction to ASP.NET ASP.NET Features XML Web Services Additional Resources

What is ASP.NET?
ASP.NET provides a complete environment for building, deploying and running .NET Web Applications Ease of Development
Simplified page development model Target any Web client (PC or mobile device) Modular, well-factored, extensible architecture Superior debugging and tracing support

Performance, Scalability, Reliability


Compiled, not interpreted Rich Caching Support Web farm scalable session state Automatically detects and recovers from errors No need to bring down web server Deploy and upgrade running apps with XCOPY, XML Configuration files

Ease of Deployment and Configuration


Inside the .NET Framework


VB Windows Forms C++ C# ADO.NET Perl Java Enterprise Services

Windows Forms
Secure, easily deployable rich client classes

ASP.NET

XML

ASP.NET
Classes and engine for building, deploying, and running Web applications and services

Common Language Runtime


Message Trans- Active IIS Queuing actions Directory Management

ADO.NET

Classes for loosely-coupled data access

Common Language Runtime


Executes code, maintains security, handles component plumbing and dependencies

Enterprise Services
A complete set of features enabling transactions, message queuing, etc.

.NET Framework
Designed for loosely-coupled computing
Visual Studio .NET .NET Framework
Windows Application Services Communication Protocols XML, SOAP, HTTP, HTML

Built for Web services


Integral SOAP & XML support

High-productivity, multilanguage development


Unified, simplified programming model

Secure, scalable, highperformance execution


Advanced security and compiler technologies

ASP.NET Web Forms


ASP.NET makes pages dramatically easier
Requires a lot less code to be written Enables much cleaner code to be written Can handle automatic uplevel/downlevel scenarios

ASP.NET enables support for server controls Controls can handle rendering and interaction
single file separate files (code-behind)

code <tags>
Form1.aspx

<tags>
Form1.aspx

code
Form1.aspx.cs

ASP.NET Web Forms


ASP.NET makes programming web apps easier
Write clean code Do more with fewer lines of code Program in any OO .NET language using code-behind programming model

ASP.NET enables support for server controls Controls can handle rendering and interaction
single file separate files (code-behind)

code <tags>
Form1.aspx

<tags>
Form1.aspx

code
Form1.aspx.cs

Runtime Compilation
Parse ASPX

Generate

Engine

Codebehind class

Request Request

ASPX File

Instantiate

Gend Page Class

Compile

Response Response

Page Class Instantiate, Process and Render

ASP.NET Controls
Html Controls
Map 1:1 with HTML tags Render client-targeted HTML and script Consistent, strongly-typed object model Some render as single HTML tags Some render richer HTML + script Server controls targeted at Cell Phones/PDAs Small devices with limited screen real estate HTML + WML/WAP mobile markup support Automatically handle device incompatibilities Extensive template customization support WYSIWYG support within Visual Studio.NET

Server Controls

Mobile Device support


Debugging ASP.NET
Tracing
ASP.NET supports page and app tracing Great way to collect request details

Error Handling
.NET provides unified error architecture ASP.NET also provides declarative application custom error handling Global application event raised if unhandled exception occurs Use new EventLog class to write custom events to log when errors occur Use new SmtpMail class to send email to administrators

ASP.NET Modular Design


ASP.NET enables customers to replace/extend/ customize the core product
Eliminate black box magic with ASP/IIS Example Customization: Session State, Output Caching, Authentication/Authorization

Http Runtime: logical replacement for ISAPI API


Enables low-level http programming Easy programming model for ISAPI-like tasks

ASP.NET can run on any host environment


IIS, IE, Apache, SQL, Exchange, etc.

ASP.NET Modular Architecture


Pages Services

HttpHandlers
Caching

HTTP Runtime
HttpModules
ASPNET_WP

Authent

Sessions

Session State
ASPNET_STATE

ASPNET_ISAPI
INETINFO

ASP.NET Caching Support


ASP.NET provides built-in caching support that enables re-use of work Full Page Caching
Vary by params, language, user-agent

Partial Page Caching


Enables portions of pages to be cached

Web Service Caching


Vary by parameters and methods

Cache Engine: Extensible Cache API


Enables arbitrary objects to be cached

Session State
Session State can now be external from ASP.NET Worker Process
ASPState NT Service SQL Server 7.0

Big reliability wins


Session state survives crashes/restarts

Enables Web farm deployment


Session State can now be shared across a web farm of ASP.NET Servers Applications no longer tied to one machine

ASP.NET Web Services


Easiest way to build XML Web Services
Author class with methods No special HTTP or XML knowledge required

Supports Multiple Message Wire Formats


SOAP messaging support Http Get/Post return XML payloads

Extensible model for innovation


Interoperate with other SOAP applications Platform neutral technology

Improved Code Deployment


Simple deployment for components
Just xcopy/ftp to an applications \bin dir No registration required (no more regsvr32)

No tools, no configuration changes, no app shutdown, no re-boots Simple uninstall just delete directory
No registry entries to clean up

Improved Reliability
ASP.NET has been designed with assumption that failures will occur on systems
Designing for failure reduced fragility

ASP.NET detects and recovers from problems


Access Violations, Memory Leaks, Deadlocks

ASP.NET supports pre-emptive cycling of apps


Time and Request Based Settings

Net Result: Admins should never think that an ASP.NET application is down or unavailable

Summary
ASP.NET provides a quantum leap in power
Tons of new features/infrastructure

ASP.NET will make building web apps easier


Much less plumbing code required Enable developers to focus on customers

ASP.NET will enable customers to develop a new breed of web applications


More opportunities to build richer apps

Customer reaction has been fantastic


Visit http://www.asp.net to learn more

Teaching with ASP


Introduction to Programming Systems Analysis/Design E-Commerce Applications Database Design & Management Interoperability Web Development GUI Development Distributed Computing

The .NET Framework in Curriculum


Multi-language runtime environment
Use the language you like Access the same class libraries to do similar tasks

Use a powerful IDE to access easy-to-use learning tools


Visual Studio .NET Academic

Experience programming with .NET by building your own Terrarium creature at the Hands-On Lab (Booth #301)

Microsoft Resources for Faculty


MSDN Academic Alliance Check out MSDN AA Kiosk at the Microsoft Booth

New program from Microsoft


Software for computer science, engineering, and IS courses.

Annual membership fee of $799 per department


Membership runs from July-June

Web site that supports program: (www.msdnaa.net)


Visual Studio .NET Academic

All the features of Visual Studio .NET Professional plus Course Management Tools

S-ar putea să vă placă și