Archive for February, 2010

VSTO Arrives

Sunday, 7th February, 2010

(on my CV!)

I deployed my first commercial VSTO add-in last week. (I have done loads of meddling over the years of course, especially in the early versions)

As per my previous advice I use VS2008 and it was targeting Excel 2007.

It was a rewrite of a VBA add-in, I chose VSTO, mainly because it needed to listen for Excel events and this is notoriously flaky in VBA.

I have always said I like the idea of VSTO and the technology. My biggest gripe has always been deployment, and the significant list of prerequisites.

As this was a homogeneous corporate environment which met the prereqs, there weren’t really any downsides.

Given the choice between working in Visual Studio or working in the VBAIDE (whose own mother even, wouldn’t love it) I would always choose VS. Given the choice between a C language and a BASIC language I would always choose the C one.

So with no obvious downside (apart from fighting C# into working with a COM OM of course), and the joy of VS2008 and C# it was a no brainer.

So here is the scoop:

Events in VSTO are easier than VBA because you don’t need to faff around with a class wrapper. I spose you could just use the thisworkbook module in VBA, but I think thats a bit misleading.

Because VS2008 has mega intellisense you only have to type the first couple of letters and you are away.

C#/Excel is a bit more painful than VBA, but the VSTO guys have the ‘VSTO Power toys’ (google it)(or bing it) which eases then pain. For example styles(x) in VBA has to be Styles.item(x) in C# (can’t exactly remember which collection it was, but it took me ages to work out what the compiler was complaining about). As I understand it the power toys are an unsupported version of some of whats coming in 2010, the biggie being that you can call lots of Excel methods without loads of object.missings.

C# has some nice language features which if you can use make up for the OM niggles.

And finally deployment is a veritable piece of pish. Publish and forget. And with ClickOnce the add-in phones home at an interval you decide to check for updates, if it finds them it silently installs them. There is no, repeat NO security faffing required any more, what a relief.

This was my first brush with VSTO since version 1 using VS2003? I think, and Office 2003. At that stage I think I declared it unfit for use and abandoned it. As did many others in fact.

It’s hard to put into words just how far it has come since then, I’m still not convinced for Codematic web stuff that is offered to everyone and anyone but for corporate developments I think VSTO is the way to go, and the sooner the better. The alternative to join .net and Excel is a shimmed COM add-in which I wouldn’t really call a clean solution.

A quick scoot on Jobserve suggests Excel/VBA/C# is a pretty strong skillset right now, and I think it will get stronger and stronger. I am starting to see specific requests for VSTO and ClickOnce too.

I’ll do another post about the dynamics of the jobmarket because I think there are some big changes afoot.

Are you using VSTO? If not, are you planning to? and when? C# or VB?

cheers

Simon

Crackberry cold turkey

Monday, 1st February, 2010

After many years as a crackberry adict I am attempting once again to go cold turkey.

Last time was a G1, last year which lasted less than a week.

This time I have got a Motorola Milestone (Droid in the US).

First impressions? Its crap!

It might be my fat little sausage fingers, but its rarely bothers to respond to my screen clicks, often its seems to do nothing, or do anything but what I tried to click.

well I’ve had it about a month now, I had to do¬† a hard reset to get it to connect to the Google mothership so some of the more interesting features would work. But now it seems to be working ok.

I havent yet sampled the delights of the Andoid marketplace, I’ve had a look but failed to see anything worth downloading. In my dreams I am going to write a few apps.

I think whoever designed that keyboard should be forced to use it and no other for 6 months. The sharper edges of the bb keys make it much clearer what you are pressing. That daft multi pad thingy means you can’t reach most of the keys with your right hand, the letters are way off centre on the keys so if you click a letter most likely you will click at least one wrong key as well.

The screen is brilliant, a bit pointless but brilliant. Trying to do the internet on such a small screen is, for me, not worth the effort, I’d rather read a book and do t’internet when I get to a proper box. Maybe if I find (or write ;-)) some worthwhile apps this will change.

The battery life is abso-bloody-lutely crap. With minimal use (a bit of checking email on (free) wifi, no calls) it lasts 12 hours, 12 hours FFS!! [edit see comments – this has changed]

If I use it at work, I need to recharge it to phone home on a night. my BB would last a week on one charge, I could go away for the weekend without a charger. With the MM I really need a 12 mile extension lead so I can use it at home and at work. And its heavier, noticeably heavier.

I was pretty disappointed when I first got this, but over the last week or two we have started to get on better. I guess for the odd time I need the internet it will be useful (internet on the bb was crap). Maybe if I get the hang of the keyboard (one of the key reasons I got the MM rather than another Android phone.). And once I get this as my ring tone.

Anyone else got any views on the relative pros and cons of bbs and the latest crop of smart phones. All you iPhone fanboys, feel free to chip in, but bear in mind I would prefer a phone I own rather than one the manufacturer believes they still own.

cheers

Simon