Should you perform the Visual Basic 6 to .NET upgrade all at once or do it one component at a time? Should you settle with functional equivalence or add new features to an application? What VB to .NET migration practices should you take into account before the project kicks off? These and other VB to .NET upgrade concepts are further explained in Chapter 2, which will provide you with the knowledge and best practices to prepare and carry out a realistic Visual Basic 6 to .NET conversion.
In the context of a Microsoft Visual Basic upgrade, achieving functional equivalence means that the exact functionality of a Visual Basic 6.0 application is retained in the Visual Basic .NET application after it has been upgraded, but before new features are added.
Achieving functional equivalence provides you with a working .NET version of your application, but it is usually considered an intermediate step in the process of upgrading an application.
Application advancement is the improvement of the upgraded application beyond the specifications of the original system.
Application advancement involves identifying, and then modifying or extending, the areas of your application that will benefit from the many improvements that the .NET Framework offers.
A proof of concept is the migration of a representative piece of code, used as evidence to demonstrate whether a project is ideal or feasible. It can help you to avoid wasting time on poor coding decisions and can allow you to validate solutions in an isolated condition.
A proof of concept will help you to determine the real cost of the most common issues that appear in the upgrade wizard's upgrade report.
In addition to the tasks your organization typically performs during a software development project, your plan for the upgrade project should include the following activities:
Defining the scope of your project is the all-important stage of project planning because you establish the project goals and the manageable tasks that will accomplish these goals, setting a comprehensive roadmap and defining realistic expectations.
An application analysis will determine the most appropriate upgrade strategy for the project. The goal of this activity is to ensure that the project adapts to your real business needs and that your expectations are realistic about the outcome of the project.
When selecting to upgrade your application, you should consider the following two upgrade strategies: a complete upgrade and a staged upgrade.
With a complete upgrade, all components of your application are upgraded and deployed as a whole. This does not mean they are upgraded in parallel; it means only that no effort is made to deploy the application in a production environment until all components have been moved to .NET.
The staged upgrade strategy allows you to upgrade some parts of your application before you upgrade others. This allows a more controlled, gradual upgrade where the application is upgraded a part or component at a time.
Some of the advantages of a complete upgrade strategy are:
Some of the disadvantages of a complete upgrade strategy are:
Some of the advantages of a staged upgrade strategy are:
Some of the disadvantages of a staged upgrade strategy are:
Vertical upgrades involve isolating and upgrading all n-tiers of a single module of your application without modifying other parts of the application.
Horizontal upgrades involve upgrading an entire tier of your application without modifying the other tiers.
You should consider the following points when deciding on a horizontal upgrade:
To transparently replace middle-tier components with .NET components without affecting client code, you must maintain the original GUIDS and ProgIDs of your COM components. In addition, you must properly handle replacement of the class interface generated by Visual Basic components when you attempt to transparently replace a COM component.
You will have to translate the ADO.NET datasets that are returned from your upgraded middle-tier components to ADO recordsets that are used in your original Visual Basic code.
You will need to deploy the interoperability assemblies for the middle tier components.
Interoperability between Visual Basic .NET and Visual Basic 6.0 can become prevalent in this type of upgrade, depending on how you choose to define the application tiers. If the distance between the tiers is widened by making one side of the communication a .NET assembly, you may be increasing the amount of marshaling that is occurring in your application, which can negatively affect performance.
Estimating the cost requirements for a software development project is typically a complex task because of the wide range of quality in software implementation and the varying programming abilities of developers.
The Visual Basic 6.0 Code Advisor is an add-in for Visual Studio 6.0. It can be used to scan your Visual Basic 6.0 source code for practices that do not comply with configurable coding standards.
The ASP to ASP.NET Migration Assistant is an add-in to Visual Studio .NET, created by Mobilize.NET for Microsoft, that helps you upgrade your ASP pages and applications to ASP.NET.
An assembly is the smallest deployable unit of a .NET application; it is a collection of classes, configuration files, resource files, and any other files that your application needs at run time.
An assembly can be an executable (EXE) or a dynamically linked library (DLL).
By default, assemblies are installed into the same directory as the owning application. This type of assembly is called a private assembly. Because it is installed in the application directory, there is no chance of it interfering with other applications installed on the same computer.
You can also create shared assemblies that are installed into a system wide repository for assemblies called the global assembly cache. These assemblies can be used by multiple independent applications. The advantage of these assemblies is that they use less disk space and less memory.
You can easily install multiple versions of the same assembly in the global assembly cache, and it will maintain these assemblies separately.