Nick's .NET Travels

Continually looking for the yellow brick road so I can catch me a wizard....

Bill takes on RSS with VB9

Bill has converted the C# only Orcas Beta 1 RSS Feeder example into VB9.  In his conversion he has illustrated how Linq further reduces the need for iterators.  There are a couple of note worthy points from this example:

  • Try and work out exactly where each of the Linq statements are executed?
    • There are two linq expressions defined in the GetItems method but neither of them get executed until the ToArray method is called.  The ToArray method effectively iterates the expression converting the Ienumerable into an array (this is so that you can iterate the same array multiple times without reiterating/re-executing the linq expression)
  • Take a guess what the new Option Infer On means?
    • This controls whether types are inferred or not.  If this property is set to Off you can't write Dim x = 5 and assume the compiler will know that x is an integer.

There are of course some weird behaviour to do with this new Option Infer:

Option Explicit - you must declare your variables

Option Strict - you must type your variables

Option Infer - you can infer the type

Ok, so now I'm confused so how about some examples:

Explicit [Off] Strict [Off] Infer [Off]
x = 5

[No compiler checking, x is an Object that is auto-declared essentially where it is first used]

Explicit [On] Strict [Off] Infer [Off]
Dim x = 5

[x is typed as Object since the compiler can only guess what it could be at runtime]

Explicit [On] Strict [On] Infer [Off]
Dim x as Integer = 5

[x is typed as an Integer and the compiler ensures that all references to x do appropriate casts.  With Infer off you can't use anonymous types which means that all Linq statements have to return predefined types]

Explicit [On] Strict [On] Infer [On]
Dim x = 5

[x is typed as an Integer and the compiler ensures that all references to x do appropriate casts.  Anonymous typing is permitted as the type is inferred by the compiler]

Explicit [On] Strict [Off] Infer [On]
Dim x = 5

[x is typed as an Integer but the compiler allows implied type conversions (eg x = "6").  Anonymous typing is permitted]

 

My recommendation is to turn Option Explicit and Option Strict on at a project level (as with previous versions of Visual Studio) and that you also turn on and get used to Option Infer as anonymous types truly enable the full power of Linq.

Windows Live OneCare - A Mechanic for your PC

Having beta tested the first version or so of OneCare I had almost given up hope of Microsoft releasing a product that would meet my needs.  However installing the release version, which I must confess I've only just done, has been quite a positive experience. 

The only gotcha was with establishing a VPN connection.  After installation of OneCare trying to establish any VPN connection would fail without any indication of what was going wrong.  Recalling this from past experience I thought to go in an disable the firewall.  Doing this will prompt you to leave the firewall enabled but for it to bring up the Firewall Connetion Tool:

You'll notice that I've not only included the VPN firewall exception, I've also checked the ActiveSync/WMDC option so that I can still connect my Windows Mobile device. Unlike in the early betas this does fix the issues that I was seeing.

The other thing I like about OneCare is TuneUp which you can schedule to occur:

Of course if you don't want to install OneCare you can always go to the website where there is a run-once TuneUp option.

Simplifying your Build Server

One of the tasks that the dev team at [Intilecta] has spent quite a bit of time on recently is reworking the build process.  Having been involved in the v1 build process I have been adding my 2 cents worth from time to time.  One such area was how to minimise the bits of software we need installed on the build server.

We are going to need a tool that can execute a build.  The obvious choice was to go with MSBuild since it comes with the .NET Framework v2.  Unfortunately at this stage we can't get away without having [VS2005] installed as we need it to build our setup projects (we are hoping to change that later this version).

The next area we had to consider was how we handle the 3rd party control libraries we have installed.  At this stage we are using Infragistics and Dundas controls.  Both of these products have a substantial install which includes adding various assemblies to the GAC.  We wanted to be able to control the build process so that we don't need these to be installed on the build machine.  Unfortunately doing this with the projects in their current form meant that we were getting compile errors similar to:

Error 1 Exception occurred creating type 'Infragistics.Win.UltraWinTree.UltraTree, Infragistics2.Win.UltraWinTree.v6.3, Version=6.3.20063.1059, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb' System.ComponentModel.LicenseException: Unable to locate license assembly. C:\...\licenses.licx

It turns out that these errors are caused by the license management framework (which AFAIK is actually part of the .NET Framework to support third party component vendors) as a result of having a license.licx file included in the project.  To see this (for VB.NET projects) you need to set Solution Explorer to show all files.  This file will then appear under the My Project folder (VB.NET) or Properties folder (C#) - it's set as an Embedded Resource.

My understanding of how the license checking works goes like this: Having the licx file in the project causes the framework to try to create an instance of the class defined in the licx file.  As part of the constructor this class does some license checking to see if it is being run on a licensed development machine (control libraries are typically licensed on a per dev/per seat basis).  In the case of our build machine we haven't installed the product so it fails this check and hence fails to create the object defined in the licx file.

If we remove the licx file the build starts to work (you also need to change the references from being references in the GAC to being references to the actual dlls since you don't want to have to add the control libraries to the GAC on the build machine just so you can do a build).  This gives us a solution for our build process..... BUT

So why do we need the licx file at all?  Well if you now open the project and attempt to work with a form/panel/control that makes use of a 3rd party control you will get an exception similar to (if you don't have the control library installed):

Unable to locate license assembly.
at Infragistics.Shared.UltraLicenseProvider.GetDesignTimeLicense(Type type, Object instance, Boolean allowExceptions, UltraLicenseBaseAttribute licenseAttribute)
at Infragistics.Shared.UltraLicenseProvider.GetLicense(LicenseContext context, Type type, Object instance, Boolean allowExceptions)
at System.ComponentModel.LicenseManager.ValidateInternalRecursive(LicenseContext context, Type type, Object instance, Boolean allowExceptions, License& license, String& licenseKey)
at System.ComponentModel.LicenseManager.ValidateInternal(Type type, Object instance, Boolean allowExceptions, License& license)
at System.ComponentModel.LicenseManager.Validate(Type type, Object instance)
at Infragistics.Win.UltraWinTree.UltraTree..ctor()

If you do have the library installed the licx gets created when you open the designer.  Just watch that you don't check it back into source control with your project!

Skype Challenge Update

It's now the 5th day since I announced my attempts at the Skype Challenge and by all accounts I feel that I'm failing.  That said, I'm going to keep persisting and attempting to reduce my phone dependency.  Here's a few thoughts on where technology is currently failing:

Acknowledged problems (problems I knew I would encounter in this challenge)

  • Battery Life - My poor Dell Axim struggles to get through a whole day on a fully charged battery.  While I'm in the office it sits on my desk with the wireless off and plugged in but when I go home at night I turn the wireless on (so I'm "online" with Skype) and I set Activesync to poll every 15 mins or so.  Unfortunately by morning the battery has got so low that the wireless has been disabled!
  • Audio Quality - The Dell was never really designed to work as a phone.  Even with noise cancellation the audio is pretty poor quality.  On this respect I can't wait to get my K-Jam back
  • Unable to Receive SMS - Clearly this was going to be an issue.  One solution to this problem would be for Skype to allow users to specify a mobile SkypeIn number - this could be used for not only incoming voice but also sending/receiving SMS messages

Unanticipated Issues

  • Audio Quality Degradation - When we head out for coffee to our regular haunt, Tiger Tiger, I usually enable the wireless for Skype.  I don't typically get any calls but once or twice I've taken a call on the Dell.  The call is usually not bad, the line is quite fast so there is no delay or degradation of audio.  Unfortunately if someone else is downloading a file or also talking on Skype (or another VOIP app) the audio is unintelligible.  I seemed to recall that this is typically of ADSL style connections that only support up to around 800kbps upstream traffic (despite much larger download bandwidth).
  • Unavailability - I don't know why I didn't think of this issue before hand.  One of the reasons that Push Email works over GPRS and not over wireless is the inability for Windows Mobile to maintain an active connection to a wireless network when it is in suspend mode (which it can do over the GPRS network - since it has to do a similar thing to support incoming calls on the mobile network).  Of course this means that Skype (set to Wireless only mode since we are trying not to use the phone provider) is only available when the device is not suspended (ie when I'm using it).  Unless someone happens to call when I'm using the device I'm unlikely to receive the call!!!
  • Unable to Send SMS - Go figure - why did Skype leave this almost trivial functionality out of the Windows Mobile version of their client.  Just about every other function from the desktop is there, just not the ability to send SMS.
  • Contacts Unavailable - On the desktop I've become used to Skype automatically including my Outlook contacts in the Skype contacts list.  Unfortunately the mobile client doesn't do this which makes using SkypeOut to call people a little harder (need to do a bit of copy-n-paste).

I hope this serves as an overview of the issues to date.  If anyone has any clever work arounds, please feel free to contact me.  Better still if you think you can, then take the Skype Challenge!

Palringo - I don't understand the name let alone the concept...

I saw this post across on the Modaco feed referencing a product called Palringo and despite a number of comments to the effect that it is a cool product I just don't get it.  So last weekend I was talking about the Skype Challenge (more on that later) in which I was trying to use Skype to replace my phone service; this product seems to just be another IM product with a bit of voice thrown in for good measure.  In fact the only thing I see going for it is that it is going to be supported on a number of platforms, they are even about to release betas for the symbian/Java platform.

RikReader, now with SQL Server Compact Edition

Doug has just announced that version 1.4 of RikReader is now available for download/update.  Now if you have a previous version installed the process is a little more complex that previous upgrades but apparently this has to do with the fact that the underlying database is now SQL Server Compact Edition.

For those who aren't familiar with RikReader it is one of the best feed readers that I've seen that sits on top of the Feed Store introduced with Vista/IE7.  Written in WPF (as all good apps should be) means that you get that nice newspaper style reading or you can flip to a single article view. 

Warning: At this stage if you have a lot of feeds (say 200+) RikReader might appear to perform really badly.  When you first start up RikReader it goes through a process of syncing the feed store with the additional information it tracks in the SQL Server CE database.  As you can imagine this takes quite a while the very first time you load the application.  I would highly recommend leaving the application until the "pulsing circle" (lower left corner of the app) goes away and then start using the app. 

You would think that doing this type of synchronisation should be done on a background thread, which it is.  However, apparently all calls to the RSS API needs to be done on the UI thread - perhaps the team responsible for this can answer to why this is necessary?

Update: After talking with Doug this appears to be a thread affinity issue based on the nature of the RSS API calls - I'm sure he'll be updating the reader to tweak this to improve perf and usability.

The way Back with Ajax

Across on the Ajaxian blog they have a link to the work Andrew Mattie has been doing to address one of the biggest problems with Ajax - the way it effectively breaks the browser's back button.  Having never really jumped on the Ajax bandwagon I only realise this is a problem based on the numerous sessions I sat through and the frustration experienced when using an Ajax enabled site that doesn't work with the Back button.  Anyhow, hopefully the work Andrew has done will help to reduce this problem

Where Photography meets the Ocean

Recently a close friend of mine started his own website and a blog entitled the Weekend Warrior.  In his latest venture Hugh spent the weekend over at Rottnest checking out the surf.

Hugh takes some unreal photos and has all the gear to take professional photos of surfing and other water sports.  Can't wait to get back into kite surfing so I can appear in the weekend warrior!

WPF/E gets a SilverLight

Those naming wizards at Microsoft (aka the marketing department) have been at it again.  This time they have rebranded the Windows Presentation Foundation Everywhere (aka WPF/E) as Microsoft SilverLight.  Over in the Backstage at MED, Loke has the story

Long live Windows Mobile 2003 SE!

In a flash back to a couple of years ago I decided to find my old Dell Axim X30 and see whether it was up to the job.  I seemed to recall trying one of the early Skype Pocket PC clients back on one of the old HP iPaq devices so I guess I wasn't surprised that Skype have a version of their client that works on this device.  When you download the client the file name includes "LowCPU" which I guess implies that this version is designed for a low power CPU and that there is a high CPU version (although given battery life is a major concern I'm not sure I would ever go with this verison).

The experience is actually quite good, audio quality seems to be reasonable and there was almost no lag. You may need to alter the microphone gain (Start->Settings->System tab->Microphone) and you may need to enable the echo cancellation option in the Skype Settings.

You will notice that I discovered how you can use the skinning feature in Pocket Controller to give you that professional look during presentations and demos (they have skins for virtual every device I could think of).  Pocket Controller is also able to connect via a network connection (which is more than can be said for ActiveStinkSync.

In the last of these screen shots you will see that there is an "Echo/Sound Test Service" item in the history.  This is a contact that appears in your contacts list when you run Skype on the device and enables you to place a call, record yourself talk and hear it played back - if you think about it this really tests most features of placing a call!

Yes, I'm almost free of my mobile phone.  Bring on the Skype Challenge

Usage logging

Joseph has a great breakdown (in a similar vein to Google Analytics) of usage statistics of his application Thoughtex.  I wonder whether he is interesting in redistributing the usage logging class library.  Everytime I build another utility or tool I often consider collecting this type of information but the cost to develop often outweighs the cost of developing the tool itself.

Usage tracking is an important part of the usability design cycle.  There is currently a huge amount of emphasis placed on the importance of the user interface but how do you really quantify how usable an application is. Without tracking usage you really have no idea how your application is being used. 

[Intilecta] has invested heavily in building an integrated framework into our application that enables users to monitor their own usage, team leaders to track aggregate usage and admins track overall usage.  This is important as the application is designed to be continually improved based on user feedback/usage!

More Skype Challengers

If I'd bother to do a Google search before announcing the Skype Challenge I would have noticed that Nicholas Wolfgang over at Bios_Level had already laid down the challenge.  Funnily enough he invested in the Belkin device and has documented a number of challenges that he has faced along the way.  The number one issue seems to be (surprise, surprise) battery life.  Anyone who has used a Window Mobile device on a wireless network will know that it is hard to get through an entire day without recharging.

Skype WiFi phones - WTF?

Phase 1 of my Skype Challenge is almost complete - I handed back the i-mate SPL I was borrowing so I'm now without a Windows Mobile device (I still have my SIM card in an old Esicsson phone until I get around to sorting out my voicemail etc).

I must admit I've been having some issues selecting the right tool for the job:

  • Skype WiFi Phones - These come with Skype preinstalled and are unnecessarily expensive.  For the price of one of these you could get a standard Windows Mobile Pocket PC and put the skype client on it - much more functionality for minimal cost difference.  The other issue is that most of them don't support browser based authentication for wireless access.  This is significant as most non-free wireless networks (and even some of the free ones) require you to login via the browser. This is a classic WTF where the manufacturers (Linksys, Belkin, Netgear etc) clearly haven't thought about their target market!
  • Smartphone - Too expensive as I don't need phone connectivity.  Also a lot of them don't have wireless which doesn't make them a very good Skype device!
  • Pocket PC - This is where I'm leaning as it has the rich user experience of a typical Windows Mobile device, including touch screen, has wireless connection and is not too expensive. 
  • UMPC - Now you might be asking why this fits in here as it isn't particularly convenient as a phone.  But when you add in a bluetooth headset it all of a sudden becomes the ultime communications tool.  Not only do you have a skype phone with you all the time, you also have all the applications and functionality that you have come to expect with a regular desktop/laptop computer.  Perhaps I should be talking with the newest edition to the GottaBeMobile Team, Hugo Ortega

For the moment I think I'll go back to looking for my old Dell X30 Pocket PC device that I can use until my K-Jam returns.

The Skype Challenge

This morning I was flipping through the Sunday Times (for the most part this paper is little more than an abstract collection of ads with a bit of sports trivia appended to the end) and noticed a Post-it note attached to the front of the paper:

 I thought that the previous person had left this behind (I was in a Cafe!) but then I noticed the other copies also had this note on the front.  Flipping to page 20 I saw that this was an Iinet ad:

I had to smile at the creative form of advertisement - after all, it's a big job to stick notes to the thousands of papers that get produced each Sunday, plus the cost for the full page ad.  On the way back home the contents of the note got me thinking even more: Do I really need a phone service any more? 

To answer this question is looked at what I currently have/use for both my work and personal life:

Personal

  • Landline @ home: I only have this so that I can get ADSL at home (I then have a wireless network that allows me to roam around the house).  All phone calls are made using my mobile and/or skype.
  • Mobile: I use this so that "regular" people can get hold of me.  By this I mean that anyone who knows my mobile number can use the standard phone infrastructure to call me.
  • Skype: I have a SkypeIn number that I use infrequently but is useful if I need to talk to someone for an extended period as they don't have to pay mobile charges.

Work

  • Skype: Although the Wellington office has a landline, this is again only really used for the ADSL connection.  The Perth annex uses Skype almost exclusively to stay in contact with the rest of the team - this generally includes an hour or two on skype!

As you can see I'm already moving towards using Skype for more of my communication needs.  Lets break this down even further and look at how I could alter this arrangement to free my self of any phone providers:

  • Making Calls: This part of the challenge has already been solved.  Skype offers the ability to not only call people who are on Skype it also has the SkypeOut service which you can use to call both landlines and mobile phones.  They are consistently improving line quality, reducing lags and reducing the cost of calls.  In fact dialing any landline in the US is already free!
  • Receiving Calls: Skype has also addressed this issue with the introduction of the SkypeIn service.  The awesome thing about this service is that with a single Skype account you can have multiple SkypeIn numbers that mean people only ever have to dial a local number to call you.
  • Sending SMS: Skype not only allows you to send SMS (using your Skype credits) to any mobile phone worldwide, it also allows you to configure the sending number so that the messages appear to come from your mobile number.
  • Receiving SMS: Ok, this part of the equation Skype hasn't solved AFAIK.  In order to receive SMS it has to be sent to a mobile phone and whilst you can configure Skype to send messages from a certain number, you can't configure it to intercept messages to that number.
  • VoiceMail: If you are away from your computer or not logged in, Skype is able to take a message and notify you of the missed call via their Voicemail service.

Looking through this list there is only really one feature that I don't get through Skype which is the ability to receive SMS.  I must admit I'm not really an SMS person - never really did get the hang of typing t9 text - so I might be willing to go without until Skype sorts this one out.

Of course the other feature that isn't in that list is Mobility, which is what my mobile phone gives me.  If you think about this, do you really want to be contactable all the time?  At work (yes), At home (yes), At a restaurant (no), In town shopping (maybe), At the beach (maybe). 

yes: Lets work with the yes answers for the moment, now I have wireless at home and work and Skype is available for both my computer and my k-Jam.  I could also invest in a wireless skype phone which would mean I wouldn't need an expensive mobile operator dependent device.

no: Well this isn't an issue since I don't want to be contacted anyhow

maybe: When I'm shopping in the Perth CBD I could make use of the MetroMesh (and there are equivalent wireless networks being setup in a lot of major cities around the world) or I could just make use of free wireless services in cafe's such as Tiger Tiger.  The beach, parks and other places are a little harder as they don't typically offer wireless coverage.  For the purpose of this discussion lets assume that in these places we are happy to be disconnected - we will of course get notified of any missed calls and messages when we get back into coverage (sounds like a time before good mobile coverage was the norm)

The Skype Challenge

The purpose of the Skype Challenge is to question our dependency on phone service providers and seeks to put pressure on them to step up to the challenge by offering us compelling reasons to stay connected (some telcos have preempted this challenge - take BT's SDK which enables developers to build applications that take advantage of their rich infrastructure).

The Skype challenge is

  • To go an entire month without using either a landline* or a mobile phone** to make or receive phone calls. 
  • You have to make all calls via Skype
  • You can't accept calls, unless they come via Skype
  • You can't send/receive SMS, unless they go through Skype

*Use of ADSL via a landline connection is acceptable - over time more ISPs will start to offer ADSL packages that include the cost of connection so it is only a matter of time before this dependency goes away.
**If your mobile phone is a pda with Skype installed and wireless capabilities then it is acceptable to use it to make Skype calls and send Skype SMS messages ONLY.  You can use other functions on your mobile phone such as the camera, voice recorder etc so long as they don't use phone provider functionality (eg GPRS).

My Commitment (Updated)

I have just purchased a Belkin WiFi Skype phone.  When this arrives Unfortunately none of the WiFi phones that I've looked at support connecting to a wireless network that requires browser based authentication. On Monday I'm going to follow up with Linksys as they have a WiFi phone that their website claims runs Windows Mobile - which means that browser based authentication should be ok and it should be able to run Skype for Window Mobile.

If the WiFi phone option doesn't work I'm going to use my K-Jam (minus SIM card) for making/receiving skype calls when not at my computer. Regardless I'm going to turn off my mobile phone (leaving a voice message giving my SkypeIn number) and attempt to go an entire month as per the rules of the Skype Challenge outlined above!

Over the month I will blog about my progress so that we can sort out any technical issues/frustrations.

EVERYONE: I challenge you to take up the Skype Challenge and go a whole month without using a landline or mobile phone!

[Added] Skype Challenge Lite

I know that the Skype Challenge is unrealistic for some of us that don't use Skype as their primary form of communication at work.  To this end I've added the Skype Challenge Lite which means you have to use Skype for your personal life.  Where possible you should attempt to use Skype to make/receive all work calls, but since a number of organisations don't support the use of Skype and/or Messenger in the workplace it is permittable for you to use a landline and/or mobile while at work.

Skype Find and More

Yesterday I downloaded the latest version of Skype (the next version talks about being able to invite non-Skype contacts, which would be very cool - unfortunately it is only in beta and VERY unstable).  Instead of going with the standard options I decided that I would install the Internet Explorer Addin.  Not knowing quite what to expect I was quite impressed when phone numbers started appearing with a Skype border and with options to enable me to call them directly:

 The other function that might be quite useful in the future is SkypeFind.  This appears as a separate tab within the Skype client and allows you to search for recommendations based on keywords.  For example I might want to search for Coffee in Wellington.

I noticed that Mauricio has already added in the Astoria, which is where he holds his weekly coffee.  I did a similar search for Perth and was disappointed that neither Tiger Tiger or Cimbalino were in there - so I added them ;-)

When an Extension method isn't an Extension method

I thought that Bill was going to post this as he was the one who pointed it out to me but I guess he was "busy" looking at the latest from Microsoft Marketing.  Anyhow, in a nut shell the VB team have made a very questionable decision when it comes to Extension methods:

In this example I have a custom collection, say MyCollection and I also have an Extension method defined as DoFunkySutff(collection as MyCollection).  How would this look in intellisense?

When I write instanceOfMyCollection. I would be prompted with a list of methods, including the extension method DoFunkyStuff() - Note that the collection argument is NOT listed as the compiler is doing the translation from instance to extension method by placing the instanceOfMyCollection as the first argument to the call to the static DoFunkyStuff method.

Ok, so what happens if I had a method defined on MyCollection which has the same name (and signature), ie DoFunkyStuff(). Well the intellisense experience is going to be the same - It's going to be hard to distinguish between the two types of calls!

The story gets worse: What happens if this method has a different signature, eg DoFunkyStuff(i as integer). Here the C# and VB.NET stories diverge.  In C# you would get both DoFunkyStuff(), the extension method, and DoFunkyStuff(i as integer) in the intellisense list.  However, in VB.NET you will only get DoFunkyStuff(i as integer).  Basically this is a result of VB.NET using shadowing by name v's shadowing by name and signature (the correct way!!) which C# is using.

To make matters even worse (both languages): What happens if I have two imports that define the same extension methods for the same class - Compile error!!!  And you can't even use Aliasing to get around it.  Clearly there is still work to be done to resolve these issues.

Imagine Cup gets the Developer Touch

Across at International Developer there is an article that discusses the Imagine Cup competition that Microsoft runs annually.  I'm even quoted!

I gather that round 1 entries have now closed for the Australia arm of the competition which means that all the teams are now busy beavering away preparing for the national final.  Good luck to the teams and if there is one word of advice I could give - take Readify up on their offer of a mentoring service!

Feeds, Feeds and more Feeds - Content Found

I typically scan well over 250 feeds a day! Yep that's right I'm an addict - actually I don't normally get beyond the Perth Bloggers network (which I have as the feed in [VS2005]) and most of the Australia Microsoft DPE team.  Anyhow today I was glad that I spent the time scanning for interesting content because I came across this great little post by Anna Liu which points to a video on YouTube that shows an innovative user interface for the next generation of mobile devices. 

Unlike the disappointing attempt of Deepfish to provide a usable experience for pocket pc devices this interface seems like it has actually been tailored for these devices.  I had to laugh though because in 2004 at the Imagine Cup finals in Brazil we saw an interface that would make these guys drool.  The concept behind the application itself was to provide a guide for people walking around a museum but the menu system these guys had come up with was second to none.  They had worked on the spin out menu concept where you start with a minimal dial in the middle of the screen, select an item which then spins out a new dial.  As you progressively select items new dials appear; if you want to go up a level you click the centre.  These guys had made it entirely customisable and the menu itself was all images (rather than simple text) so it looked unbelievable.  I just wish I could get in contact with these guys!

Occasionally Connected Application is NOT about Working Offline

For almost as long as I've been working with .NET I have been an advocate for building rich client applications (aka smart client applications) that work in an occasionally connected manner - think Outlook cached mode.  Recently there have been a couple of posts such as "You're not on a f^&king plane (and if you are, it doesn't matter)!" and "The Mile High Club: 37signals, f@#k yeahs, and productivity stock-art" that talk about the current trend of people talking about providing caching/offline capabilities to their web applications.  IMHO they all miss the point.  Building web applications that will work offline is NOT the solution - you need to build rich client applications that are DESGINED to work offline.

Ok, so let me explain:  The basic premise of building occasionally connected applications is that you work on the assumption that the application WILL be offline.  To enable this you work with a local datastore (assuming a real world application that works with some sort of data) and you build an rich application that doesn't require any network access.  You then need to consider how the data is going to be synchronised to the local datastore (again, assuming a real world application where you want the data to be kept in a central repository).  This can be done using technologies such as Merge Replication, RDA, MS Sync Services but essentially this is a separate concern to building the application itself.

So, why is this better than just coding an application that will continue to work when I pull the network cable out?  Well it all comes down to usability - according to Microsoft we are in the Age of User Experience (which IMHO is rubbish, just because Microsoft has entered the design application market does NOT mean that we have only just started to think about usability - more on that later).  Usability of web applications has a fundamental problem in that it relies on request-response model back to the web server.  Even with the best implementation of Ajax you are still likely to experience delays, refreshes etc that lead to a poor user experience.  On the converse a rich client application "should" have smooth usability with no wait times between screens.  I know which one I would prefer!

Finally, back to my point about the Age of User Experience; Despite two iterations of the .NET Framework WinForms essentially hasn't changed since the old C/VB days.  A lot of companies have invested heavily on extending forms and controls to make their applications look good.  Of course there were always challenges making the application responsive - you could introduce multiple threads to load data, but then you ended up debugging locking issues etc. 

Now with the Windows Presentation Foundation we have a much rich (or so they keep claiming) framework with which to build applications.  I must admit the applications I have seen to date have all looked great, but they nearly all diverge from using standard menus or having a familiar look and feel - tell me how this is suppose to empower users?

Whilst WPF is a significant improvement when it comes to building rich client applications there is still a long way to go before "usable" and "applications" become synonymous!