If we had a Visual Basic app to upgrade, we’d never use automation tools. Now, you might be thinking that’s a pretty bold claim! Let’s roll back in history to provide you with an explanation.
Back in 1991, when Visual Basic 1.0 was released by Microsoft, it became popular among enterprises that wanted to build in-house applications. Over time, Visual Basic attracted a large community of developers who loved it as a friendly environment for beginners. In a nutshell, Visual Basic showed us what programming could do.
Now there are thousands of VB apps scattered throughout the world filled with spaghetti code. Why is this? Because newcomers weren’t skilled enough to follow coherent development practices when they were developing systems with Visual Basic. This leaves little hope that automation tools can convert this code to the new platform properly.
Or can they? Let’s find out together.
Spagetti code is technology jargon that refers to code that is written without a coherent structure and rules.
What Is Happening with Visual Basic in 2021: To Migrate or Not to Migrate?
Microsoft no longer supports Visual Basic — its last version was designated as legacy in 2008 — though it does still provide the community with applicable documentation. Many users are still using WinForms to build business applications in Windows, and a few are building websites using ASP.NET Web Forms.
However, with new technologies on the horizon, Visual Basic has become an outsider in the industry; it doesn’t quite fit in. That’s why Microsoft rolled out a VB and C# coevolution strategy to unify the .NET ecosystem and facilitate the transition from legacy VB code. Using C# capabilities, for example, VB apps could be leveraged with the web interface or powered with mobile access. This approach has proven itself many times over.
By the time of the latest .NET Conference, named “Focus on Windows,” it had become clear: Microsoft won’t evolve Visual Basic as a language but will integrate it into the .NET environment. That leaves almost no choice but to migrate to the newest .NET version.
How to Transfer VB to a Web App with Automation Tools
As soon as the need for migration emerged, Microsoft (in collaboration with partners) launched specialized conversion tools transforming VB code to C#, VB.NET, and .NET platform. The recommended tools include:
- Microsoft Visual Basic Upgrade Wizard: a tool suitable for small and medium projects. It will partially migrate your code to Visual Basic 2008.
- Visual Basic Upgrade Companion (VBUC): a more powerful tool to upgrade Visual Basic 6.0 apps to the .NET platform.
- Code Architects VB Migration Partner: a tool for converting code from VB6 to VB.NET.
In its documentation, Microsoft points out that these tools can’t be an end-to-end solution.
Learn more about other proven ways to transfer VB.NET apps to the web. 3 Approaches for Safety Migrating a VB.NET App to a Web App
How Do Automation Tools Work?
Transferring VB code with automation tools is a fast and cost-effective way to upgrade legacy software, compared to rewriting from scratch. The migration goes through a number of stages:
- Pre-migration work: This stage involves mapping out the entire process (setting up the software with the tool requirement) and making changes to the existing VB code. You’ll need to refactor, restructure, and remove unnecessary chunks for smooth code conversion during the transition.
- Automatic conversion: Set up the extension and run the program. It will parse the VB and ASP files, convert them, and write the equivalent .NET files. The same principle is used in a VB6 to VB.NET code converter. You can select options for the project’s defined features.
- Manual changes: The stage involves fixing the different migration issues: removing duplicates, dealing with dependencies, leveraging the functionality, rewriting some parts of the desktop app, etc.
- Quality Assurance activities: Providers advise allocating about 35% to 50% of the total effort to run test cases in the new environment.
How to test a legacy codebase without breaking anything? Learn here. Testing Legacy Codebase: What is, Common Problems and Best Practices
As we can see, conversion tools alone leave wide gaps in the migration. In any case, you should assemble a qualified team who’ll handle the rest of the work (about 70%). But, if your project is simple and non-buggy, you needn’t be bothered with the manual work; you may be able to make do with the software only.
Disadvantages of Visual Basic Conversion Tools
As we mentioned previously, conversion tools are imperfect. There are serious disadvantages of automated migration:
Can’t deal with complex projects
Enterprise users who have dozens of VB apps under one roof won’t benefit from conversion software. Even though software providers claim its efficiency for apps with 650K lines of code and more, they have many dependencies that are difficult to structure. As such, the amount of manual work will outweigh the pros of automated migration. From a practical standpoint, it’s not cost-effective in the long run.
Require lots of manual enhancements
Developer communities are plastered with complaints about VB code fixes. For instance, folks from Stack Overflow encountered about 15,000 errors when compiling their code to C#. Sometimes they spend months polishing and debugging the codebase.
Here are a few things that can’t be converted with VB conversion software and require a rewrite:
- ActiveX Document (COM-based components)
- Property Page
- Microsoft Data Report (*.dsr)
- COM Crystal Report objects
- ActiveX container
The post-migration stage will also need plenty of architectural, performance, user experience, and security improvements.
Low level of customization for the specific needs
Most of the declared tools target a specific Visual Basic version: VB6, which is called a last release of the “real Visual Basic.” Software providers write off earlier versions. But they still exist and need proper support.
If you migrate the app without thorough preparation, you’ll later face issues related to the business logic. As a result, you won’t be able to take advantage of the new platform.
If you need to migrate VB apps, we advise you to look to custom software development services. This approach can be tricky and complex, but you get predictable outcomes.
Migration with automation tools creates gaps and could go sideways when you least expect it. As such, you’ll need a qualified team to support your project at every stage. This means migration costs will rise until you get the work done. So, the cost-effectiveness of the conversion tools depends entirely on the type of the project.
If you want to carry out agile migration right, let us know! We can assess your VB platform and pick the most viable option.