Mono Migration – Stage 1

Well I promised I would be updating on how the effort was going to migrate our VB.Net/ASP/SQL Server 2000 product here at work to Mono, and as the first steps are now underway, I have a few things to talk about.

For starters we are looking at porting our code to C#, rather than VB.Net in Mono, and removing the ASP stuff from it etc. We are also looking at implementing localisation of the site. Originally when looking at this in Visual Studio we would have to look at purchasing a tool to pull out all the translatable strings in the program. Luckily, I found out mono-develop does this for free. Awesomeness.

At this stage the idea is that we are going to go for a proof of concept and move the code over to Mono as it is in it’s VB.Net/ASP form, then we will look at doing the actual port, as time is a little critical for us.

The first step is to setup a virtual machine for running Ubuntu (our OS of choice for the cloud) and install Mono/PostgreSQL etc on it. I choose to use VirtualBox for 2 reasons, 1) I hadnt used it before and it looked very interesting and 2) VMWare was causing my machine to go into an infinite “Cannot load Drivers” loop on the windows host, so it wasnt really an option at all.

Once I had completed this I downloaded and ran MoMA. This tool will scan the assemblies for your program and tell you what problems there are with running the code on Mono. We have a few problems on ours, but most of it is SQL calls that aren’t implemented, so I’ll find a way around this.

At the end of the MoMA tool there are links to a few sites that have definately helped me in moving the code over for the first test. Now there is just one last step before attempting to build the code in Mono and see how badly it breaks.

Clean the code. It is pointless trying to port everything over unless you need everything. I have currently removed about 50k of code from the site that is either no longer used and, thanks to my predescessor, has never been removed. I also found thousands of table entries and a good 30+ tables and another few hundred stored procedures that are either not used or obsolete. I’m still in the process of cleaning up before I try the build, but once that is done I shall let you know how things go.

Tags:

Leave a Reply