We Are GAP Mobilize
Free Assessment Tool

VBUC Migration Guide - Chapter 2

Practices for successful upgrades

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.

What is functional equivalence?

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.

What is application advancement?

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.

What is a proof of concept?

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.

What are some activities that my upgrade project plan should include?

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 project scope:
  • Performing an application analysis.
  • Assessing the current and the target architecture.
  • Analyzing and designing new functionality.
  • Selecting an upgrade strategy.
  • Making an inventory of source code.
  • Preparing the source code.
  • Preparing to handle upgrade issues.
  • Unit testing.
  • Validating functional equivalence and acceptance.
  • Implementing and testing new functionality.
  • Deploying the Visual Basic .NET application.

Why is defining the project scope so important?

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.

What does performing an application analysis accomplish?

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.

What strategies should I consider when selecting an upgrade?

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.

What are the advantages of a complete upgrade strategy?

Some of the advantages of a complete upgrade strategy are:

  • Upgraded applications can be advanced with new functionality that uses .NET technologies and techniques.
  • Upgraded applications can be integrated into new .NET solutions, making them usable in more scenarios.
  • Fully-upgraded applications can be used on new hardware and new versions of Windows.

And what are some of the disadvantages?

Some of the disadvantages of a complete upgrade strategy are:

  • Some Visual Basic 6.0 features cannot be automatically or easily upgraded to Visual Basic .NET.
  • A completely upgraded application could have a different user interface or may have different behavior.
  • A Visual Basic .NET application requires a compatible version of the .NET Framework to be installed on target computers.
  • Developers responsible for performing the upgrade or for maintaining the resulting application may have to learn new skills to perform the upgrade.

What are the advantages of a staged upgrade strategy?

Some of the advantages of a staged upgrade strategy are:

  • More control over the progress and the cost of the upgrade project.
  • Minimized risk, because you return the application to a stable production-quality state after each stage.
  • Upgraded components can often immediately benefit from the performance and scalability features of .NET without having to wait for the entire application to be upgraded.
  • Upgrading of the low priority or costly portions of an application can be postponed indefinitely, resulting in a partial upgrade.

And what are some of the disadvantages?

Some of the disadvantages of a staged upgrade strategy are:

  • Performance improvements will not be as noticeable as in a full upgrade because of the added overhead required for COM interoperability.
  • Applications with a dependency on COM components are harder to deploy and maintain than applications that are fully upgraded to .NET because COM objects need to be registered and have versioning issues that .NET objects do not.
  • A staged upgrade requires the implementation of wrappers or interfaces to provide the interoperability mechanisms between the .NET and the legacy code. These wrappers will often be temporary and will be discarded later.

What are vertical upgrades?

Vertical upgrades involve isolating and upgrading all n-tiers of a single module of your application without modifying other parts of the application.

What are horizontal upgrades?

Horizontal upgrades involve upgrading an entire tier of your application without modifying the other tiers.

What are some points I should consider when deciding if a horizontal upgrade strategy is appropriate, and if so, which tier is the most suitable to upgrade first?

You should consider the following points when deciding on a horizontal upgrade:

  • Your application is on a large number of Web servers. A prerequisite for the deployment of a Visual Basic .NET application is that the common language runtime (CLR) must be installed on each Web server. If your application is deployed on a large number of servers in a Web farm configuration, this can be an issue. If you have relatively fewer servers in middle tiers than in other tiers, consider using a horizontal upgrade and then upgrading the middle tier first.
  • Your application uses a large amount of shared code. If your Visual Basic application uses a large number of DLLs or other types of shared code, constants, or custom libraries in the middle tier, choosing to upgrade this tier first can help you manage the upgrade of your entire application. However, if you do this, you will destabilize a large number of components that use the shared code and thereby affect the testing process.
  • Your application has a complex middle tier. Complex object hierarchies in the middle tier should be kept as a unit. Deciding where to isolate an application with a complex middle-tier object hierarchy is difficult, and upgrading only parts of a complex middle tier typically necessitates numerous interoperability calls between environments, resulting in performance degradation.

What are some issues I should consider when replacing the middle tier?

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.

Why is estimating the cost requirements for a software development project a complex task?

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.

What is the Visual Basic 6.0 Code Advisor?

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.

What is the ASP to ASP.NET Migration Assistant?

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.

What is an Assembly?

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.

Talk To An Engineer