Code Architects joins the Visual Studio Industry Partner program

clock May 25, 2009 07:55

Three days ago, on May 22, it was both VB Migration Partner's birthday and the day when we released our 1.11 version, a new milestone in VB6-to-VB.NET conversion technology.

Later in the same day, we were also "officially" accepted by Microsoft Corp. as part of the Visual Studio Industry Partner program. It's an important acknowledgement of Code Architects's role in helping developers and software companies move their legacy VB6 apps to .NET.

You can read the entire story in this press release.



Happy birthday VB Migration Partner... and welcome version 1.11 !

clock May 22, 2009 08:33

Exactly 365 days ago we released VB Migration Partner 1.00, after a 8-month public beta period and 2.5 years of intense development.

A lot of things have happened in these 12 months. In spite of us being relatively unknown outside Italy, our software gained immediate popularity among VB6 developers, who had been waiting for a product like VB Migration Partner since the .NET launch in 2002, that is when they realized that the Upgrade Wizard included in Visual Studio is a little more than a toy and that other VB6-.NET conversion tools leave much to be desired.

Understandably, the only people who weren't very happy of our debut were our competitors, whose products had something to be compared with, at last.

VB Migration Partner 1.00 included several unique features that couldn't be found in any other similar tool, including those that had been on the market for 6 years, such as support for Gosub and On Goto/Gosub statements, As Any clauses and callbacks in Declare, graphic statements, and drag-and-drop. One year later our competitors are still trying to catch up and are now slowly adding some of the features that we support since our earlier beta versions.

18 months after we launched the vbmigration website and unveiled our software, VB Migration Partner is still the only conversion tool that supports granularly scoped migration pragmas and the convert-test-fix methodology, both of which are essential in complex, real-world migration projects.

However, we didn't rest for long, and in September '08 we launched VB Migration Partner 1.10, also known as the Refactoring Release. Even if apparently we just changed the minor version number, we actually re-wrote the parser and conversion engine from scratch. It was a painful but necessary step, because we needed to support important features, such as refactoring of Gosub into separate methods, type inference, conversion of On Error into Try-Catch blocks, and a rename engine to ensure compliance with .NET coding guidelines.

A few days before the official release date an important customer asked for binary compatibility of .NET DLLs with the original VB6 component, and we managed to add that, too! Binary compatibility you can migrate an N-tier application in pieces, starting with the innermost data tier, so that you can use the business and user-interface tier to test the new components. It might look as a minor detail, yet it dramatically cuts test and debug time/cost and allows you to focus on the portions of the application where the introduction of .NET and the replacement of old, non-scalable COM components has the higher benefits.

Well, I couldn't find a better way to celebrate the VB Migration Partner's birthday than by announcing that we just released version 1.11 a few hours ago!

If version 1.10 was the Refactoring release, the new version 1.11 can be dubbed as the Variant release. We rewrote the portion of the conversion engine that deals with Variant variables and extended the special VB6Variant type in our library so that it now behaves in exactly the same way as the VB6 Variant data type, including full support for Null propagation, Empty and missing values, and arrays of arrays. All the methods in the support library can now take a VB6Variant and return a VB6Variant as necessary.

Support for null propagation simplifies the conversion of database-intensive projects to VB.NET more than any other feature, but we didn't stop there. The new version 1.11 also generates better code for late-bound properties and methods, for B-string functions (e.g. LeftB and InputB), and for non-Latin alphabets. As usual, you can read all the details in the Version History.txt file, in the setup folder.



Can your VB6 conversion tool handle null propagation?

clock May 21, 2009 09:13

If you have massively used Variants in your VB6 apps, the migration to .NET might be a nightmare. The best that the Upgrade Wizard and other tools can do is translating each “As Variant” into “As Object”, on the assumption that the Object type can do everything that a Variant does.

You shouldn’t be surprised to learn that this is one of the false migration myths, or is a gross oversimplification of the truth, to say the least. In fact, the .NET Object type lacks what arguably is the most useful feature of Variants: support for Null values and Null propagation in expressions.

Under VB6 a Variant variable can hold the special Null value and – even more important – all the string and math expression that involve a Null operand also deliver a Null Variant value. Virtually all database-intensive applications deal with Null values and have used null propagation to an extent. Now, let’s consider this VB6 code:

' rs is an ADODB.Recordset
Dim realPrice As Variant
realPrice = rs("Price")
realPrice = realPrice * (100 – rs("Discount")) / 100
If Not IsNull(realPrice) Then DisplayPrice(realPrice)

Under VB6, if either the Price or the Discount field is Null, the realPrice variable is assigned Null and the DisplayPrice method isn’t invoked. Now, consider the “canonical” VB.NET version of the above code:

Dim realPrice As Object
realPrice = rs.Fields("Price").Value
realPrice = realPrice * (100 – rs.Fields("Discount").Value) / 100
If Not IsNull(realPrice) Then DisplayPrice(realPrice)

Under .NET a Null database field returns a DBNull object – more precisely, the DBNull.Value element. The problem is, no math or string operation is defined for the DBNull type, something I consider one of the most serious mistakes Microsoft made in this area. As a result, the third statement throws an exception if either field is Null. So long, functional equivalence! Welcome, migration head-aches!

Null propagation is a serious problem not to be underestimated. One of our customers has found that, on the average, one out of 40 statements uses Variant expression and relies on null propagation. To put things in the right perspective, in a middle-sized real-world application you can expect to manually fix several thousand statements that use null propagation. What’s worse, there is no simple way to work around Null values in VB.NET, short of splitting all statements in portion and testing each and every subexpression for the DBNull.Value value.

If you use VB Migration Partner, you can solve the above problem in the most elegant and painless way. Just use the following project-level pragmas:

 '## project:NullSupport
 '## project:ChangeType Variant, VB6Variant

The NullSupport pragma tells VB Migration Partner to map some VB library functions – such as Left, Mid, Right, and a few others – to special methods that are defined in VB Migration Partner’s support library and that, not surprisingly, correctly return a Null value if their argument is Null (as they do under VB6).

The ChangeType pragma converts all Variant members – variable, fields, properties, methods, etc. – as the special VB6Variant type (also defined in VB Migration Partner’s support library) which redefines all the math, comparison, string, and logical operators to support null values.

Yes, this is all you need to add null propagation support to your VB.NET code! This feature alone can save you literally weeks in a real-world migration project. And don’t forget that VB Migration Partner is the only VB6 conversion software that supports Null values and Null propagation easily and automatically.

When you hear other vendors claiming that “our tool uses advanced artificial-intelligence-based techniques to ensure functional equivalence with the original VB6 code”, just ask them how it deals with Null values. Smile



Announcing release 1.11

clock May 12, 2009 04:22

We at Code Architects have been working on the next release for a couple months now. It should have been released as version 1.10.05, but we have added so many important features that we decided to label it as version 1.11.

Here's a partial list of what you'll find in the forthcoming version:

  • smaller runtime library (about 1.66 MB) loads faster and takes less memory
  • improved support for Variants - our VB6Variant class now behaves very closely to the original VB6 data type
  • better support for "B-string" functions, e.g. LeftB and InputB)
  • byref/byval semantics are correctly handled also in late-bound calls  (more info in upcoming blog post)
  • better support for Japanese characters and resources
  • better support for ActiveX controls

We should be releasing version 1.11 within the end of May. 



[CASE STUDY] Migration of a 650,000 LOCs ERP system

clock May 3, 2009 10:42

We've just published a case study of a migration carried out by SIS, an Austrian Microsoft partner who used VB Migration Partner to convert a middle-sized ERP system (about 650,000 lines of code), with a good assortment of challenges. The part that I like most is the following paragraph (the boldface is mine):

During the software evaluation phase we run a 25K prototype through all the conversion programs. It took 2.5 hours to get a compilable and runnable VB.NET project with VB Migration Partner, and 13 hours with its closest competitor. The reduced effort, the ability to use pragmas and support for the convert-test-fix were the main reasons for choosing Code Architects’ software. Later we discovered that their tech support is also excellent.

It looks like VB Migration Partner allows you to convert VB6 apps to VB.NET about 5 times faster than its competitors. Interestingly, the ratio is virtually the same also for larger, real-worlds apps - as you can ascertain by reading our competitors' case studies related to applications of comparable size.

You can read the entire story here.