Поделиться через


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]

Comments

  • Anonymous
    February 09, 2005
    Jeremy,

    I watched the keynote and was very interested to see the DataGridview brought down to the browser. In the past, that would obviously have taken an ActiveX control. I'm looking forward to see how this can be done with VS.Net 2005.

    Is it true that we can detect via the browser if the client browser is running the .Net framework and automagically install (or should I say instantiate) the DataGridView? Will there be any user action necessary or will this be seemless? From the demo it seemed seemless?

    As a guy whose been doing ASP.Net for the past few years and ASP for much more than that, the idea of introducing Smart clients is the holy-grail. Very much interested to see how one-click is handled into VS.Net 2005. I am hoping it lives up to the hype and that I can start transitioning my company's software products to incorporated them.

    Thanks!!!
  • Anonymous
    February 09, 2005
    Johnnie,

    It's easy to detect the presence of the framework, just look at the user-agent string. You should see something like this:

    HTTP User Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)

    And then in your ASP.NET you can decide what to render based on that string.

    The control we used is built on top of the WinForms UserControl classes. See the following for details (and I'll blog more on this soon):
    http://msdn.microsoft.com/msdnmag/issues/02/01/UserCtrl/default.aspx
    http://msdn.microsoft.com/msdnmag/issues/02/04/WinForms/default.aspx
  • Anonymous
    February 09, 2005
    Jeremy,

    is this all proof of concept stuff (the hosting of WinForm Datagridview) or will it ship with vs2005?

    can you blog on the code sample to make this work.

    Thanks for an excellent demo.
  • Anonymous
    February 12, 2005
    Carter has another take on the message of the demo: avoid the tyranny of OR. http://blogs.msdn.com/jcmaslan/archive/2005/02/11/371476.aspx