VSLive Smart Client demo

We had a good time with Soma's keynote at VSLive, and the folks at Fawcette have made the talk available via streaming media (and the transcript is over here).  Craig Neable represented our evangelism team as the demo jock, walking through our good-better-best smart client story.  Fast forward to minute 40 to see him in action.

We were hoping to make a few different points with the demo:

  • In a world of connected systems, clients finally can reach out to access all the data they need
  • Smart clients provide the most productive user interface for filtering that data down to the right set of information
  • Visual Studio 2005 and the .NET Framework version 2.0 provide the best tools for developers interested in building smart client experiences
  • Smart client is not an all or nothing proposition!  In fact, there's a very nice pay-as-you-go model.  You can add a little bit of smart client technology and see a huge return in productivity.

That last point is one that's near and dear to my heart.  It's what I was getting at in my previous post.  I've heard from web developers that sometimes "write smart clients" sounds like "throw away your existing code base, abandon all your existing customers, and retrain your entire development staff."  But that's not the case at all.  You can find the most important user functionality in your web app, and even one smart client developer can implement an improved user experience that will make a big difference to your users.  And, they can do it using the same tool (Visual Studio) and core frameworks (from the .NET Fx) as your existing team of web devs.

In our demo at VSLive, we made this point in transitioning from the default ASP.NET site to the same site enhanced with a WinForms control.  The scenario we set up was a real estate agent looking through hundreds of listings for properties that might interest a client.  The client might say "I want a 3 bed, 2 bath house", and our ASP.NET site made it easy to find properties matching that description -- the same kind of functionality you'd see on any web site today.

But a good real estate agent knows that even if the client said 3b 2ba, they'd be happy to also consider a 3b 1.5ba that met the rest of their criteria, like location and price.  The client probably would also consider a 3b 2.5ba as well, or maybe even a 4b 2ba.  So if you're using the default web site, you have to do multiple searches, and each search requires a round trip to the server and a wait for the new page to come back.

For the demo, we replaced the standard ASP.NET grid with a WinForms control wrapping the new DataGridView control in Visual Studio 2005.  Because the DataGridView is built to support large data sets, we were able to bring all the data down to the control, and then do all additional filtering directly on the client, without having to round trip.  Not only that, but we tweaked the DataGridView so that the search would filter to plus or minus one of what the agent specified, so a search for 3b 2ba also returns the similar properties the agent would be interested in.  Then we highlight the properties which are an exact match, so the agent can quickly see which properties meet all the client's requests, and which only come close.  In the standalone smart client, we make another simple change -- we used the standard slider control to let the agent quickly change the target property price.  By scrolling back and forth, almost playing the control like an instrument, the agent can very quickly determine the range of properties that might meet the needs of the client.

To get the same set of data back from the original web site would have taken tons of round trips -- first a search for 3b 2ba at $650,000, then another search for 3b, 2ba at $675K, then a search for 3b 1.5ba at $650K, etc, etc.  But with a minimal amount of dev effort to take advantage of smart client components like the DataGridView and the slider control, the agent could do all those searches with just a flick of the mouse.

Small investment, big improvement in productivity.  That's the promise of smart client technology.

Anyways, I think Craig makes the point in the video above in less time than it took me to write all this, and you to read it ;)  So thanks to Craig and the rest of the demo squad (Robert Hess, Hans Hugli, Thomas Lewis, Chris Flores, David Shadle) for a great presentation on Monday.

[Update: in response to several comments below -- UserControls are not a feature new to VS 2005.  You can build UserControls in VS 2003.  Jay Allen wrote a nice MSDN article (from 2002, in fact) that walks through the process.  Our particular UserControl hosted the DataGridView, which is new to VS 2005]