3 Approaches to Transfer a Desktop VB.NET App to Web

ModLogix
6 min readJun 1, 2021

Visual Basic (VB) is one of the pioneers in object-oriented programming, which received immense popularity among thousands of organizations. Years ago, it was used to develop Windows applications and to interface database systems. Companies found it a helpful tool for creating effective solutions for business activities like marketing, accounting, financial planning, preparing payroll, procurement, order processing, etc.

Now it’s hard to number the applications built on Visual Basic and its dialects. Plenty of developers still remember classic Visual Basic with its last official version — Visual Basic 6.0, while someone got used to VB.NET that arrived in 2001. All in all, the thing that unites them is an urgent need for an upgrade. VB-based applications inherited millions of lines of dead code, huge amounts of dependencies from third-party software solutions, and, of course, vulnerabilities.

Sooner or later, every company will make the tough call to transfer VB to a web app. What are the main approaches and implications of this process? Let’s look through the possible options.

Why Migrate a Desktop Visual Basic App to the Web Platform

Migration to the modern web environment is a thriving opportunity for organizations that are caged in the limitations of desktop apps. As for VB.NET apps, it’s almost the last lifeboat for their owners to stay afloat. Microsoft has no plans to evolve Visual Basic as a language after 2020, thereby it’ll become harder to support and scale the existing solutions.

As the troubles with Visual Basic apps are far from over, let’s consider other reasons why it’s worth thinking over migration.

Increasing shortage of technical professionals

How long have you met developers who are eager to work with Visual Basic code? Well, we neither. Their number is reducing dramatically as the new languages appear and some of them reach retirement age. Notably, in 2016–2018, Visual Basic 6.0 was named the most dreaded programming language according to Stack Overflow’s annual developer survey.

Therefore, it is tough to find a VB software development provider who can understand the old code and maintain it (or simply fix a bug).

There are hurdles to maintain and extend the system

The lack of tech talents gives rise to another issue, implementing any changes to the system is like clearing a minefield. With no qualified engineers, fixing the legacy code could lead to devastating consequences, let alone adding something new.

To support VB owners, Microsoft even announced the C# coevolution strategy starting from 2010. Now it’s meant to be easier to deal with the existing desktop apps, but it doesn’t exclude the necessity of moving VB.NET projects to the modern environment. The thing is many libraries used in VB apps are severely outdated, and today they have no reliable analogs.

There are no equivalents for outdated components

Speaking of the outdated tech components and structure, VB applications have a Component Object Model (COM) at their core. Being highly complex, COM was used exclusively for Windows applications but now is not popular as Microsoft focused more on new .NET technologies. Integral parts of COM, OCX/ActiveX controls, software modules designed to run on 32-bit applications a part of COM, are not supported in VB applications as well.

Many other third-party components and controls, based on VB solutions, are also obsolete. Curiously, in the meantime, the new .NET 5 release includes the updates for the WinForms application framework.

Identify modernization and security improvements for your product

The current solution suffers from performance issues

Slow response time and frequent downtimes are commonplace for Visual Basic apps. In 2019, owners of Visual Basic 6, Visual Basic for Applications and VBScript experienced a global outage. After installing the planned security update KB4512506, the apps stopped working. Of course, Microsoft patched this issue, though the company wasn’t obliged to do it.

Obviously, high performance isn’t Visual Basic forte, thus companies look for some alternative backend solutions instead of physical or dedicated servers.

3 Approaches to Transfer a Desktop Visual Basic App to a Web App Safely

There are three main approaches for a VB app transition that are supported by the official Microsoft community. Despite the depreciation mode, there is a lot of documentation on modifying and porting VB.NET and VB applications. In addition, Visual Basic formed a strong developer community that shares best practices on dealing with apps. As a rule, developers use Visual Studio to implement the given recommendations.

What can you do to make your Visual Basic software web-friendly?

#1 Extend with C# capabilities

So as not to fully recreate the app in the new environment and violate its initial structure, you can leave the original application as it is (plus fixing minor bugs) and plug in extra functionality. It means use C# (we already mentioned the excellent compatibility of Visual Basic and C# — unlike Visual Basic, C# is developed and supported) to:

1) add new features to the current desktop solution. In a split with modern .NET parts, the existing VB app is partially available on the web.

2) plug in the web interface. It’s more a comprehensive way to gain web presence as users will utilize web portals and pages.

3) create a mobile app. Thanks to the API, parts of the Visual Basic system become available on mobile devices as well. All you need is qualified engineers who are able to connect the mobile app to the core of the existing system.

The extension approach to VB apps modernization is extremely suitable in such cases:

  • the app doesn’t have critical bugs and flaws;
  • there’s a need to add some new functionality;
  • rewrite or migration efforts aren’t paying off.

Advantages of the extension approach:

  • it’s the most cost-effective manner to transfer VB to the web app;
  • the upgrade can be done gradually without disrupting business processes;
  • the promising opportunity to get an updated system shortly (within a couple of months);
  • rapid payback due to feature-driven development.

Cons of extension:

  • due to the incompatibility of components, your application may be idle;
  • it might not resolve some performance issues.

#2 Migrate with automation tools

As an alternative to fragmented development, companies choose automation tools to migrate a VB app to a new environment. On a first glance, it’s a lucrative option to recreate the existing application with minimal time and costs. To that end, Microsoft officials introduce 3 proven tools: Microsoft Upgrade Wizard, Artinsoft VB Upgrade Companion, and VB Migration Partner tool that arrived in 2008. They allow you upgrade classic VB and VB.NET solutions to C#, Java, modern .NET, or cloud.

With all the benefits of the following approach, the app would require additional work and consultation from experienced vendors. How to determine if it is right for your case to transfer a VB.NET app to a web app?

  • the current app version works with bugs;
  • app users complain about frequent errors and data loss;
  • the number of app users are constantly growing;
  • all your workflows are adapted to work purely on a PC.

Pros of automated migration:

  • conduct the migration affordably and seamlessly;
  • minimum disruptions during the process;
  • extensive support and available documentation;
  • automatic troubleshooting of VB vulnerabilities.

Cons of migration:

  • you run the risk of inheriting a poorly scalable architecture;
  • you need to hire a technical team who can fix any incompatibilities.

#3 Rewrite from scratch

As with every modernization project, you could always rewrite the app’s codebase from scratch to get rid of all legacy components, patterns, and tools. Thus, you must interpret the existing app’s logic using new technologies and languages.

Companies try to avoid this method lamenting the abnormal level of complexity. These apprehensions are not groundless: a team must deal with dozens of databases and rewriting efforts could last a while. However, in some cases, it’s truly justified. Rewriting will suit you if:

  • the current version of the app is extremely outdated and buggy;
  • crucial features are built into the code;
  • you are not satisfied with the old application architecture (for example, it does not scale at all);
  • you want to fully migrate to the web or mobile platform.

Read the full article on ModLogix

Originally published at https://modlogix.com on June 1, 2021.

--

--

ModLogix

ModLogix helps organizations move legacy applications to new secure, stable, and scalable platforms. To explore more, please visit https://modlogix.com/