Dave Noderer's Blog

South Florida does .NET!

  Home  |   Contact  |   Syndication    |   Login
  201 Posts | 0 Stories | 362 Comments | 28 Trackbacks



Tag Cloud

Article Categories


Post Categories

Image Galleries

.NET Community

Life at the Beach

My Blog Friends

A couple of months ago my esteemed Microsoft Developer Evangelist, Joe Healy visited our user group and spent some time going through the APIMASH starter projects the DPE’s have been working on. I was impressed!!

It looked like fun and thought that members of my user group would respond to these fairly simple but complete examples for Windows 8, Windows Phone 8 and now Windows 8.1.

Being a Visual Basic .net MVP I noticed that none of these were done with vb.net and know that there are millions of vb programmers out there looking for samples.. so I volunteered!

I started with Bob Familiar’s Chuck Norris c# starter kit, downloaded it from github and tried a few approaches to porting it.  You can read about Bob’s original starter kit here: http://theundocumentedapi.com/2013/06/06/apimash-chuck-norris-starter-kit/

There are two libraries, APIMASH_CNorrisVBLib and APIMASHVBLib plus the main windows 8 project.

Being the lazy developer, I tried to bulk convert c# to vb.net. Two I tried were http://www.developerfusion.com/tools/convert/csharp-to-vb/ and  http://converter.telerik.com/. Neither really did a complete job and both left some c# remnants and just plain errors. In the end I used the DeveloperConfusion throughout just so I would get use to what it was doing. In retrospect I should have keep more detailed notes and will next time. Three areas I remember having to rewrite the code was for adding event handlers, lamdas and overrides.

The two libraries were pretty straight forward and I was able to get them to compile and look correct pretty quickly. There were no tests and I did not tackle that task.

What took me longer was the actual windows 8 app. Trying to convert the code behind and past it into the xaml forms did not go well. In the end I created a fresh windows 8 project and spliced in and ported pieces. The main problem was that the namespaces got confused and mixed up so that the code behind was not recognizing the few controls on the page.

Once I was over that hump the project worked!

I’m sure that there are many improvements that could be made and hope to hear from you.

The project can be found on github under the Windows Starter Kits: https://github.com/apimash/StarterKits

posted on Monday, August 5, 2013 7:26 PM