Title: VB6 Migration Strategies
1VB6 Migration Strategies
- Nick Page (Nick.Page_at_microsoft.com)
- Developer Platform Group
- Microsoft Ltd.
2Agenda
- Is Upgrading the best choice ?
- The Choices
- Migration Strategies
- Migration Tools
- FAQ
- COM
- VB.NET or C
- VB6 Support
3Is Upgrading the best choice ?Evaluating your
application
- Business Value (to you, the ISV)
- Worthwhile investment to upgrade ?
- Uniqueness in the marketplace
- Could additional value be added through
integration with other products which is
difficult at the moment - Does your application contain business rules not
easily reproduced elsewhere - How critical is the application to your
customer's business ?
4Is Upgrading the best choice ? Evaluating your
application
- Application Quality (user and developer
perspective) - Ease of maintenance
- Agility
- Monolithic or componentised
- Consistency. Use of patterns.
- Current effectiveness. Need for workarounds,
errors, level of support etc - Stable application logic or likely to change?
- Good separation of business rules?
- Application Stability in development?
- Perception of users. Is it perceived as being
dated ?
5Is Upgrading the best choice ? Evaluating your
application
- Application Quality (user and developer
perspective) - Type of application / project type / technologies
- Internet application making use of ActiveX
- DHTML
- Web Classes
- ActiveX control or ActiveX dll project
- Use of 3rd party ActiveX controls
- User Controls
- Multi-tier DNA application
- Use Visual Basic Upgrade assessment tool
- Skills
- Knowledge of existing solution
- Knowledge of .NET
6Is Upgrading the best choice ? Evaluating your
application
7The ChoicesMigrate
- Application is a good fit with business needs.
- Application needs only moderate functionality
changes. - A new application would require adding
significant functionality to it, and it would
need to be closely integrated with the existing
application.
- High operational costs are associated with the
existing application. - Need to upgrade to .NET for strategic reasons.
- Future vision of the application includes Web
services. - Difficult and costly to find resources to
maintain the existing application.
8The ChoicesRewrite
- The business rules are satisfactory but you will
need to add additional functionality to the
application. - The available off-the-shelf solutions do not come
close to meeting your needs. - The existing application has poor quality code.
- The existing application has high maintenance
costs.
- The time, cost, and disruption of rewriting the
application are acceptable.
9The ChoicesReuse
- The business rules are satisfactory.
- The existing application has low operational
costs. - It is difficult to separate logic from persistent
data and presentation layers. - Only simple Web access is required, which allows
you to use a wrapping solution
- You have sufficient resources to maintain core
legacy code. - Off-the-shelf software is central to the existing
application, and it is possible to rely on
third-party support and maintenance.
10The ChoicesReplace
- The existing application is significantly out of
line with business needs. - Making changes to the business model to fit an
off-the-shelf solution is acceptable. - The time, cost, and disruption of replacing the
application are acceptable.
11Migration StrategiesInitial Learning
- Get some experience with .NET
- Look at .NET Application Architectures
- Proof of Concept
- Target a few, small applications
- Real World application
- Evaluate applications to find the most suitable
- Comparison can be made between upgraded and
original - Can be upgraded in modular fashion
- Plan for real application Migration
12Migration StrategiesPlanning for Migration
- Establish the scope of the project
- Measures for when application is functionally
equivalent to original - Other requirements
- Application Analysis
- Upgrade Assessment Tool
- Assess the target Architecture
- Avoid polluting a .NET architecture with non
.NET technologies - Write wrappers if necessary to avoid this
- Upgrade Strategy
- Complete Upgrade
- Staged Upgrade
- Vertical Slice / Horizontal Slice
13Migration StrategiesStages Upgrade
Presentation
Horizontal
Business
Vertical
Data
14MigrationTools
- Code Advisor
- Add-in for VB6
- Review code against pre-determined standards
- Identify migration issues
- Upgrade Assessment tool
- File Dependency and Call graphs
- Estimates of cost and effort to migrate
- Other potential migration issues
15MigrationMigration Wizard
- EXE DLL
- Copies project
- Creates reports
- Links to Help
- Four Levels
- Issue No Automatic Upgrade
- ToDo Requires Finishing
- Warning Possible Behavior Change
- Note Informational
16Tools
17MigrationThe Migration process
- Let the tools do most of the work
- Finish non-automated migration
- Reach a safe point through Functional Equivalence
- Evolve on top of the .NET Framework
Automated Tools
Functionally Equivalent
Current Application
Non automated changes
Preparation
Incremental Evolution
18FAQ DNA / COMShould we use COM / Enterprise
Services?
- .NET components can utilise Enterprise Services
- Services without Components registers
automatically on first use. - Start from position of not using ES
- Tight technology coupling
- deployment challenges
- DCOM ports
- DCOM proxy needs to be deployed
- What about Transaction Support?
- Few applications actually use Distributed
Transactions. Most are local Transactions against
a txn resource. - Now have System.Transactions for doing local txns
- ASMX Web Services can initiate txns which can be
distributed, although cannot flow txn context
over web services to other components (as COM
does)
19FAQ DNA / COMShould we use COM / Enterprise
Services?
- What about Loosely Coupled Events?
- There isnt a direct equivalent although there
are patterns for delivering this capability over
Web Services. - Windows Communication Foundation will provide
this capability. - Object Pooling?
- Few scenarios where this should be used.
- Look first at ASMX Web Services, enhanced with
WSE 3 where Security and Transactions are
required. - All the threading, initialisation etc is taken
care of. - Use Enterprise Services where
- you really need Distributed Transactions and need
to flow txns across application boundaries. - Are making real correct use of Loosely Coupled
Events, Queued Components, Object Pooling
20FAQ VB.NET or CWhich language should we use?
- Both offer the full power of the .NET Framework
and are excellent choices - This is a choice both for VS2005 and going
forward - VB6 developers will feel more at home on VB 2005
- Developers looking for a tools-focused experience
will feel more at home in VB - Going with C can put a useful marker in the
sand. No MS tools support for migration to C
but there are 3rd party tools. - Prescriptive guidance coming by end of the year.
21FAQ VB Support policyHow much longer are you
supporting VB6?
- Mainstream support ended March 31, 2005
- 7 years of free support is far longer than
competitors - Extended support is available through March 31,
2008. Custom support through 2012 - The VB6 Runtime is slated to ship as a part of
Windows Vista
22Resources
- Upgrading VB6 to VB.NET MS Press FREE !
- http//msdn.microsoft.com/vbrun/staythepath/additi
onalresources/upgradingvb6/default.aspx - Designing an Application Migration Strategy
- http//msdn.microsoft.com/library/default.asp?url
/library/en-us/dv_vstechart/html/appmigrationstrat
.asp - Upgrade Assessment tool and Upgrade guide
- http//msdn.microsoft.com/library/default.asp?url
/library/en-us/dnpag2/html/VB6ToVBNetUpgrade.asp - Preparing your Visual Basic 6 Applications for
Upgrade - http//msdn.microsoft.com/vbasic/default.aspx?pull
/library/en-us/dnvb600/html/vb6tovbdotnet.asp - Code Advisor
- http//msdn.microsoft.com/vbasic/previous/2003/dow
nloads/CodeAdvisor/
23Resources
- Visual Basic 6 Resource Centre
- http//msdn.microsoft.com/vbrun/
- .NET Patterns and Practices
- http//msdn.microsoft.com/practices/VS2005/
- Choosing a Distribution Technology today (inc
COM/Enterprise Services) - http//msdn.microsoft.com/webservices/choosing/def
ault.aspx?pull/library/en-us/dnwebsrv/html/dsgpre
scriptiveguidance.asp - http//msdn.microsoft.com/webservices/choosing/
- System.Transactions
- http//msdn.microsoft.com/msdnmag/issues/05/12/tra
nsactions/default.aspx - ASP to ASP.NET Migration Wizard
- http//msdn.microsoft.com/asp.net/migration/aspmig
/aspmigasst/default.aspx - Online Training
- https//www.microsoftelearning.com/visualstudio200
5/