Beruflich Dokumente
Kultur Dokumente
NET
Microsoft Corporation
What We Will Cover
Introduction to Microsoft® .NET
“Classic” ASP
Microsoft® ASP.NET
Server controls
Data controls
ASP.NET Web applications
Business objects
Web services
Additional topics
Session Prerequisites
This session assumes that you
understand the fundamentals of
Development on Microsoft® Windows®
ASP or Microsoft® Visual Basic®
This is a Level 100 Session
So Why This Presentation?
ASP.NET offers many enhancements
over classic ASP but…
With ASP.NET, there’s a lot new to learn
Solves many ASP issues
RAD for the Web
Demonstrations
ASP vs. ASP.NET
Server controls walk-through
Validation
Data controls
Cookieless sessions
Web services
Page caching
Agenda
Introduction to .NET
“Classic” ASP
ASP.NET
Server controls
Data controls
ASP.NET Web applications
Business objects
Web services
Additional topics
Introduction to .NET
1st Generation
Client Logic Servers
Data, Hosts
Biz Logic
Browsers
OS
Services
Web app developers took Applications largely operating
advantage of these local in a client / server model were
services and used HTML augmented with Web browser
to “project” the UI to many and servers. The industry
types of clients focused on rich OS and local
Microsoft provided COM, IIS, services provided by products
Internet Explorer like SQL Server™.
Introduction to .NET
2nd Generation
Biz Servers
Rich Tier Logic
Client Logic Data, Hosts
“Stateful”
Browsers OS
Services “Stateless” &
“Geo-Scalable”
COM+ Services improve reliability,
scalability and manageability. Internet Separation of data and
Explorer provides DHTML for better business logic provide
interactivity. greater scalability and
Combination of “stateless” Web performance while
protocols with DNS and IP routing have accessing enterprise
enabled mass-scale “geo-scalability” and legacy data.
Introduction to .NET
Web Services: The Next Generation
Applications Become
Other Programmable Web Services Public Web
Services Services
Biz Biz
Logic &
Web Service
Tier Logic Building Block
Smarter
Clients Services
Internal
Standard OS Services
Browsers OS
Services
Smarter Servers
Devices Open Internet Data, Hosts
Communications Protocols
Richer, More Applications Leverage
(HTTP, SMTP, XML, SOAP)
Productive User Globally-Available
Experience Federated Web Services
Introduction to .NET
The .Net Platform
Visual Your Application Your Internal
Studio® .NET and Web Service Services
Orchestration
.NET Enterprise
Servers
Operations
Applications .NET
Using Your Framework
Service .NET Foundation
Windows® Services
CE, 2000, XP, .NET
End-User Internet Protocols
Clients SOAP “blue book”
3rd Party Web Services
HTTP, SMTP, XML
Introduction to .NET
The .NET Framework and Visual Studio .NET
Visual Studio.NET
ASP.NET: Web Services Windows
and Web Forms Forms
Code readability
Coding overhead
PostBack complexity
Reuse
Performance
DLL locking
Deployment
Sessions
Caching
Agenda
Introduction to .NET
“Classic” ASP
ASP.NET
Server controls
Data controls
ASP.NET Web applications
Business objects
Web services
Additional topics
ASP.NET
Architecture
ASPX
.ASPX
ASP.NET
Architecture
Compiled .ASPX
ASP.NET
Architecture
Compiled .ASPX
ASP.NET
Architecture
Compiled .ASPX
ASP.NET
Execution Model
Source Visual Basic C# C++
code
Unmanaged
Compiler Compiler Compiler
Component
JIT Compiler
Native Code
No DLL locking
No DLL registration
Simplified configuration
Pagelets
Demonstration 1
ASP vs. ASP.NET
Data-Driven ASP
Data-Driven ASP.NET
Comparison
Agenda
Introduction to .NET
“Classic” ASP
ASP.NET
Server controls
Data controls
ASP.NET Web applications
Business objects
Web services
Additional topics
Server Controls
Simplify Common Tasks
Simplify common tasks
Forms
Tables
Data display
Calendar
Ad rotator
Server-side programming model
Automatic browser compatibility
Less code, less complexity
Extensible
Server Controls
HTML and Server Controls
</script>
PostBack
Server-side object automatically populated from
client-side controls
Server Controls
Browser Support
Validation
Client-side
Server-side
Demonstration 2
Server Controls Walk-Through
Programming Model
Syntax
Server Controls
Validation
Without code
Required field
Within range
Two fields equal (password)
Regular expressions
Validation error messages
With code, but simplified
Custom validation
Demonstration 3
Validation
Required Field
Validation Summary
Agenda
Introduction to .NET
“Classic” ASP
ASP.NET
Server controls
Data controls
ASP.NET Web applications
Business objects
Web services
Additional topics
Data Controls
Bind to many data sources
Collections
Array
HashTable
ADO.NET
DataReader
DataSet
XML
Data Controls
ADO.NET
Connection
Command
DataReader
DataSet
DataAdapter
DataView
Data Controls
ADO.NET
DataSet
Database
Authors
Connection Authors
DataAdapter
Select … from Authors
Data Controls
ADO.NET
DataSet
Database
Authors
Connection Publishers
DataAdapter
Publishers
Select … from
Publishers
Data Controls
ADO.NET
DataSet
Authors DataGrid
Repeater
Publishers
DataList
DataView
Data Controls
DataGrid
List format
No default output
More control
More complexity
Item as row
Not updateable
Data Controls
DataList
Directional rendering
Good for columns
Item as cell
Alternate item
Updateable
Demonstration 4
Data Controls
ADO.NET
DataGrid
Repeater
DataList
Agenda
Introduction to .NET
“Classic” ASP
ASP.NET
Server controls
Data controls
ASP.NET Web applications
Business objects
Web services
Additional topics
ASP.NET Web Applications
Global ASAX
Application_Start
Application_End
Session_Start
Session_End
Session
Application
ASP.NET Web Applications
web.config
Site configuration file
Like an .INI file for your site
XML format
Extensible
Some settings
Security
Session
Localization
Tracing
Debugging
ASP.NET Web Applications
Session Variables
<sessionState
mode=“StateServer“
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;user
id=sa;password="
cookieless="false"
timeout="20"
/>
Demonstration 5
Cookieless Sessions
Sessions with cookies
web.config
Sessions without cookies
Agenda
Introduction to .NET
“Classic” ASP
ASP.NET
Server controls
Data controls
ASP.NET Web applications
Business objects
Web services
Additional topics
Business Objects
Problems with ASP and DLLs
DLLs with .NET
Business Objects
Problems with ASP and DLLs
DLL Locking
Page hit
Shutdown Web application
Shutdown Internet Information Server
Edit in Visual Interdev
MTS/COM+
Shutdown package
Binary compatibility
Registry
Business Objects
DLLs with .NET
Not registered
Placed in ./bin directory
Not locked
Shadow copy
Agenda
Introduction to .NET
“Classic” ASP
ASP.NET
Server controls
Data controls
ASP.NET Web applications
Business objects
Web services
Additional topics
Web Services
The Web today
How Web services work
Web Services
The Web Today
Purchase courseware
Purchased
Purchase Courseware
?
.ASMX
Web Services
Testing
Courseware.asmx
.ASMX
Web Services
WSDL
Courseware.asmx?WSDL
Service Definition(XML)
Proxy
DLL
.ASMX
Web Services
Proxy
DLL
.ASMX
Demonstration 6
Web Services
Web Service Source
Testing
WSDL
Client Proxy Creation
Consuming a Web Service
Agenda
Introduction to .NET
“Classic” ASP
ASP.NET
Server controls
Data controls
ASP.NET Web applications
Business objects
Web services
Additional topics
Additional Topics
Deployment
Scalability
Caching
Authentication and authorization
Availability
Additional Topics
Deployment
Copy
Components in .\bin
No registering DLLs
No locked DLLs
Apps are isolated
Each app can have its own version
Uninstall
Delete
Additional Topics
Scalability Improvements
http://www.microsoft.com/usa/webcasts
MSDN Subscriptions
The way to get Visual Studio .NET
Visual Studio .NET MSDN Subscriptions
Enterprise Architect
• Software and data modeling MSDN Universal
• Enterprise templates $2799 new
• Architectural guidance $2299 renewal/upgrade
Enterprise Developer
• Enterprise lifecycle tools MSDN Enterprise
• Team development support $2199 new
• Core .NET Enterprise $1599 renewal/upgrade
NEW
Servers
Professional
• Tools to build applications MSDN Professional
and XML Web services for $1199 new
Windows and the Web $899 renewal/upgrade
Where Can I Get MSDN?
Visit MSDN Online at
msdn.microsoft.com
Register for the MSDN Flash e-mail
newsletter at
msdn.microsoft.com/flash
Become an MSDN CD subscriber at
msdn.microsoft.com/subscriptions
MSDN online seminars
msdn.microsoft.com/training/seminars
Attend more MSDN events
Microsoft Press®
Essential Resources for Developers