Upload
jeff-blankenburg
View
80.156
Download
3
Embed Size (px)
Citation preview
Migrating toMigrating to
Clint EdmonsonClint EdmonsonArchitect EvangelistArchitect EvangelistMicrosoftMicrosoft
BackgroundBackground
Upgrading from Classic ASPUpgrading from Classic ASP
Upgrading from .NET 1.1Upgrading from .NET 1.1
Upgrading from VS 2003Upgrading from VS 2003
Upgrading from Server 2003Upgrading from Server 2003
General RecommendationsGeneral Recommendations
FuturesFutures
ResourcesResources
Review of Classic ASP/COM+…Review of Classic ASP/COM+…Classic ASP = ASP, COM+, ADOClassic ASP = ASP, COM+, ADO
Components & Interfaces registered as GUIDs Components & Interfaces registered as GUIDs and string namesand string names
COM+ runtime acts as object factoryCOM+ runtime acts as object factory
Reference counting memory management Reference counting memory management system system
ASP pages compiled and cached by scripting ASP pages compiled and cached by scripting engine as they are requestedengine as they are requested
Review of ASP.NET technology…Review of ASP.NET technology…Assemblies (EXEs & DLLs) are loaded as they Assemblies (EXEs & DLLs) are loaded as they are usedare used
Preferential load locations (GAC, local folder, Preferential load locations (GAC, local folder, framework folder)framework folder)
Classes are JIT compiled from intermediate code Classes are JIT compiled from intermediate code as they are usedas they are used
Common Language Runtime (CLR) creates Common Language Runtime (CLR) creates objects and manages memory using garbage objects and manages memory using garbage collection algorithmscollection algorithms
Global Assembly Cache (GAC)Global Assembly Cache (GAC)
ASP.NET pages are compiled at request timeASP.NET pages are compiled at request time
Review of Server + IIS technology…Review of Server + IIS technology…Server 2000 + IIS 5Server 2000 + IIS 5
Classic ASP files run in IIS processClassic ASP files run in IIS process
COM+ code must run out-of-process or in the IIS processCOM+ code must run out-of-process or in the IIS process
All ASP.NET applications run in a single ASP.NET worker process (can be All ASP.NET applications run in a single ASP.NET worker process (can be isolated if necessary)isolated if necessary)
Server 2003 + IIS 6Server 2003 + IIS 6Introduced concept of multiple worker processes (application pools)Introduced concept of multiple worker processes (application pools)
COM+ remains the sameCOM+ remains the same
ASP files run within the same worker process as ASP.NET applications ASP files run within the same worker process as ASP.NET applications
Virtual applications are assigned to a specific application poolVirtual applications are assigned to a specific application pool
Each pool is assigned to a specific version of the .NET frameworkEach pool is assigned to a specific version of the .NET framework
Classic ASP & ASP.NET can coexistClassic ASP & ASP.NET can coexistBoth types of pages can live in the same Both types of pages can live in the same applicationapplication
Allows for gentler migrationAllows for gentler migration
Application can be re-architected from inside outApplication can be re-architected from inside out
Separate files, processed by separate enginesSeparate files, processed by separate engines
Warning:Warning: Session & Application state are not Session & Application state are not shared between enginesshared between engines
.NET supports COM+, but….NET supports COM+, but…Two completely different memory management Two completely different memory management approachesapproaches
Easy to expose .NET classes as COM+ objects Easy to expose .NET classes as COM+ objects and use them in classic ASPand use them in classic ASP
Warning:Warning: Much harder to use COM+ inside .NET Much harder to use COM+ inside .NET
.NET 1.1 apps run under 2.0, 3.0, and 3.5.NET 1.1 apps run under 2.0, 3.0, and 3.5In fact, your web apps will be running on .NET 2.0In fact, your web apps will be running on .NET 2.0
You will still need VS 2003 if you intend to keep them 1.1You will still need VS 2003 if you intend to keep them 1.1
Warning:Warning: Some minor incompatibilities and changes Some minor incompatibilities and changes between 1.1 and 2.0between 1.1 and 2.0
Dynamic Page Naming scheme changed – code using reflection to Dynamic Page Naming scheme changed – code using reflection to determine page name will breakdetermine page name will break
Dynamic naming scheme of controls in grids and lists changedDynamic naming scheme of controls in grids and lists changed
System.Threading.Monitor class bug fixes – # calls to System.Threading.Monitor class bug fixes – # calls to Monitor.Enter() must equal number of calls to Monitor.Exit()Monitor.Enter() must equal number of calls to Monitor.Exit()
Keep-Alive default setting on Web Service proxies changed from Keep-Alive default setting on Web Service proxies changed from false to truefalse to true
Others…Others…
New in .NET 2.0New in .NET 2.0Master PagesMaster Pages
GenericsGenerics
Anonymous classesAnonymous classes
Partial classesPartial classes
Caching libraryCaching library
Built in Membership, Role, and Personalization frameworkBuilt in Membership, Role, and Personalization framework
Login controlLogin control
Web Parts & ZonesWeb Parts & Zones
Many, many performance optimizationsMany, many performance optimizations
New in .NET 3.0New in .NET 3.0Built on top of 2.0Built on top of 2.0
Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF)
Windows Communication Foundation (WCF) Windows Communication Foundation (WCF)
Windows Workflow Foundation (WF)Windows Workflow Foundation (WF)
Identity Management Metasystem (CardSpace)Identity Management Metasystem (CardSpace)
Minor point release update to .NET 2.0 includedMinor point release update to .NET 2.0 included
New in .NET 3.5New in .NET 3.5Built on top of 2.0 and 3.0Built on top of 2.0 and 3.0
ASP.NET AjaxASP.NET Ajax
Membership, Role, and Personalization framework Membership, Role, and Personalization framework exposed as web servicesexposed as web services
Language Integrated Querying (LINQ)Language Integrated Querying (LINQ)
Native support for latest web protocols (RSS, JSON, etc)Native support for latest web protocols (RSS, JSON, etc)
Implicitly typed local variablesImplicitly typed local variables
Object and collection initializersObject and collection initializers
Extension methodsExtension methods
Auto-implemented propertiesAuto-implemented properties
New in VS 2005New in VS 2005Support .NET 2.0 framework projects onlySupport .NET 2.0 framework projects only
Two Project Styles: Web Sites and Web ApplicationsTwo Project Styles: Web Sites and Web Applications
Integrated micro-web server for debuggingIntegrated micro-web server for debugging
Class browserClass browser
Interactive object test benchInteractive object test bench
Code snippetsCode snippets
Refactoring wizardsRefactoring wizards
Debugger data-tipsDebugger data-tips
New in VS 2008New in VS 2008Completely replaces VS 2005Completely replaces VS 2005
Multi-targets version 2.0 and higher runtimesMulti-targets version 2.0 and higher runtimes
Designers and toolboxes adapt to runtime selectionDesigners and toolboxes adapt to runtime selection
JavaScript intellisenseJavaScript intellisense
JavaScript debuggingJavaScript debugging
New CSS editorNew CSS editor
Unit test automation tools (in all SKUs)Unit test automation tools (in all SKUs)
New in Windows Server 2008 & IIS 7New in Windows Server 2008 & IIS 7Windows Activation ServicesWindows Activation Services
Completely configurable request pipelineCompletely configurable request pipeline
Support for URL rewritingSupport for URL rewriting
Adoption GuidanceAdoption GuidanceComplete rewrite should be a last resortComplete rewrite should be a last resort
Upgrade based on strategic importance and maintenance Upgrade based on strategic importance and maintenance overheadoverhead
Partial conversionPartial conversion
Convert as upgrades are neededConvert as upgrades are needed
Add only the new features in .NETAdd only the new features in .NET
Leverage application pools for migrationLeverage application pools for migrationCreate separate 1.1 and 2.0 pools on your serversCreate separate 1.1 and 2.0 pools on your servers
Test 1.1 apps under 2.0 runtime and move them over if successfulTest 1.1 apps under 2.0 runtime and move them over if successful
Even 1.1 apps will see a 5-15% performance improvementEven 1.1 apps will see a 5-15% performance improvement
Code conversion effort is low, remediation testing will be Code conversion effort is low, remediation testing will be your big costyour big cost
99% of your apps will take less than 1 day to upgrade99% of your apps will take less than 1 day to upgrade
Finding that 1% is the expensive partFinding that 1% is the expensive part
Architectural GuidanceArchitectural GuidanceKeep your UIs dumbKeep your UIs dumb
Separate UI logic from business and data access logicSeparate UI logic from business and data access logic
Leverage databindingLeverage databinding
Practice Service Oriented ThinkingPractice Service Oriented ThinkingShare your business capabilities, not your databasesShare your business capabilities, not your databases
Look for cross platform Enterprise Application Integration Look for cross platform Enterprise Application Integration opportunities (.NET, JAVA, SAP, SIEBEL, …)opportunities (.NET, JAVA, SAP, SIEBEL, …)
Develop a set of shared enterprise components & Develop a set of shared enterprise components & servicesservices
Security (Authorization, Authentication)Security (Authorization, Authentication)
Event Logging & NotificationEvent Logging & Notification
Database Location & AccessDatabase Location & Access
Service Location & AccessService Location & Access
EncryptionEncryption
Other Tips…Other Tips…Use the Web Application project type in the enterpriseUse the Web Application project type in the enterprise
Don’t try to code .aspx pages like .asp pagesDon’t try to code .aspx pages like .asp pagesPut all server side code in code-behind filesPut all server side code in code-behind files
Avoid using Application & Session state if at all possibleAvoid using Application & Session state if at all possibleApplication variables are not distributed in a web farmApplication variables are not distributed in a web farm
Session state in a farm is often slower than direct DB calls because Session state in a farm is often slower than direct DB calls because of serialization overheadof serialization overhead
Watch out for XML and Regular ExpressionsWatch out for XML and Regular ExpressionsXMLDocuments cause heavy CPU load – use XMLReader/WritersXMLDocuments cause heavy CPU load – use XMLReader/Writers
Regular expressions generate dynamic .NET assembliesRegular expressions generate dynamic .NET assemblies
.NET 4.0 and Beyond*.NET 4.0 and Beyond*Will strive to continue additive framework strategyWill strive to continue additive framework strategy
Support for running multiple runtimes in the same process is being Support for running multiple runtimes in the same process is being proven out right nowproven out right now
Technology POCs are made available regularly on Technology POCs are made available regularly on CodePlexCodePlex
ADO.NET Entity Framework and LINQ to EntitiesADO.NET Entity Framework and LINQ to Entities
ADO.NET Data ServicesADO.NET Data Services
Model-View-Controller (MVC) FrameworkModel-View-Controller (MVC) Framework
More to come…More to come…
* These statements and features are subject to change and no guarantees are implied.
Where to go next…Where to go next…Converting ASP to ASP.NET
Debugging Classic ASP Code in VS 2005
Migrating from Classic ASP to ASP.NET (webcast)
Upgrading to Microsoft .NET
Visual Studio 2008 & .NET 3.5 Training Kit
Clint EdmonsonClint EdmonsonArchitect EvangelistArchitect Evangelist
MicrosoftMicrosoft
http://www.notsotrivial.nethttp://www.notsotrivial.net
© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions,
it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.