Sunday 29 April 2007

MonoDevelop

I want to use mono for a hobby CMS project I'm working on because I intend to open source the product and I'd like for it to be compatible with Linux hosting. MonoDevelop has made slow but steady progress over the couple of years I've been downloading it and abandoning the projects I create with it. But the 0.13.1 release has actually made the platform useable for me. The ASP.Net implementation can handle Web Application Projects with Generics, Serialization, Web Services and lots of the other tricks VS 2005 users take for granted.

I shall update this post as OpenShowCase evolves and highlight the adequacies and inadequacies of the Mono platform for a developer thats used to having all the toys.

I work off several development machines depending on whether I'm on my lunch hour, at home or in a hotel so I need both the IDE and source to be available wherever I am. My laptop runs Ubuntu and my PC at home runs Debian so I just added Mirco Bauers Debian repository to both apt sources (deb http://debian.meebey.net/ ./).

As it's a non-standard repository you also need Mirco's PGP key:
gpg --keyserver hkp://wwwkeys.eu.pgp.net --recv-keys 0x7127E5ABEEF946C8
gpg --export -a 0x7127E5ABEEF946C8 | apt-key add -
apt-get update && apt-get install monodevelop monodevelop-versioncontrol kdesvn
I haven't tried to get MonoDevelop working on Windows yet but I'll update this when I have.

For source control I've used subversion and taken advantage of Google's code and project hosting. The version control plugin for MonoDevelop works well but has a problem with adding a newly created solution to an existing repository. The same problem appears to affect kdesvn so the simplest thing to do is just create the code.google.com repository and use the command line client to make the first commit. From the console change to the directory that you keep all your projects in and enter the command below:
svn checkout https://.googlecode.com/svn/trunk/ openshowcase --username 
Afterwards the plugin seems to work fine.

Friday 27 April 2007

Localisation in .Net

I'm all fired up at the moment about integrating localisation for a major on-line retailer in the UK. Implementation seems to be another religious debate among those who have an opinion but the business constraints of our clients can sometimes simplify our options.

My choices were to use the built-in functionality in framework 2.0 or go find another job. So now, I'm working hard on moving the resource repository into SQL server and rolling a custom ResourceProviderFactory that uses the database (instead of resx files) to store my localised strings.

The first bit was pretty straight-forward. Google is my friend and I found some great resources and examples on the web.

You would think that the technology is old enough now that it would be simple to roll a robust solution but I can't seem to find any examples that implement IDesignTimeResourceWriter and DesignTimeResourceProviderFactory. My research leads me to believe that these classes are the key to making Visual Studio's "Generate Local Resource" tool work it's magic on my string repository instead of its native resx repository. So I'm rolling my own. It's a work in progress and I don't have any reason to believe it works but the code is here.