PDC PreConf Day 1: .NET Framework 2.0 - The Smart Client Perspective
As part of my work I make decisions on which client projects should be implemented as Web Applications and which should be Smart Clients. Because of this I decided to attend the pre conference session on Smart Clients and .NET 2, to see if there were any new issues that I was not yet aware of. The session was being presented by Rockford Lhotka and Billy Hollis, two gentlemen who’s sessions I’ve had the pleasure of attending before. I’ve been working on a project using Visual Studio 2005 since February, and that project involves some Smart Client elements. So most of the stuff covered by this session was pretty familiar to me, but it was still nice to hear how these two cool guys view these things.
The session started out with a discussion on the history of client user interfaces, focusing on how we’ve moved from mainframes and client server apps to web apps and now back again. The guys also touched on one issues I come across quite a lot – namely that by now people have finally gotten used to UIs being browser based and there is a fair amount of resistance towards going back to making “real” Windows applications again. One of the major issues they recommended was to take a look at how you calculate the cost of different alternative and especially how calculating the per user-cost of a web application can be misleading. The reason for this is that in so many cases you will end up having to add a lot of quite expensive hardware and licenses to your server setup when your user amounts increase. If you work with Smart Clients you might get away with less investment on the server, since you can actually use some of that computing power in the usually quite expensive desktops or laptops that your users are equipped with.
A lot of interesting and funny stuff was covered during the intro and the Smart Client background, and I won’t repeat it here, except for one last thing; how there basically no general agreement on what a Smart Client actually is. My view on it is that the name is horribly misleading and that they should actually have been called “Windows Applications – Finally Done Right” (WAFDR). But I guess that would have been too long for the Microsoft Marketing Department to accept it. Sigh. But that won’t stop me from using it! 
Data and Data Binding
They kicked off the proper session with a look at the data and data binding stuff in VS 2005 and how it has evolved from the .NET 1,1–world. One of the really major new things I’ve found in Windows Forms 2 is the ability to do data binding to objects, which is is essence the only decent way to do it in a client server application or in a real WAFDR application. It’s also become a lot easier to work with data sources, ranging from how to create them to how to use them in your forms. One thing I really like is that VS now comes with a proper data set editor, instead of just using the regular XSD-editor, which isn’t really that good for data sets. I’ve done some work with this stuff, and I can tell you it’s actually quite good. A clear and great step forward for data binding, and even though I’ve been quite sceptical towards data binding in the past I have to say that has mostly changed over that past 6 months because of working with VS 2005. And most of the stuff is nowadays strongly typed, which is the way it should have been to start with.
In Windows Forms 2 there’s a bunch of new UI controls, and for the first time ever there’s a pretty good grid control included (the GridView control). It used to be so that you couldn’t really understand why Microsoft even bothered to include their own grid control in Visual Studio, since it was so crap. But that’s changed now, because the GridView is actually quite nice. It lets you use proper controls in the cells, and it also lets you set a bunch of display properties all the way down to the cell level. At work we’ve used a bunch of third party controls in order to get decent grids and certain other UI controls, and we’ve not really been happy with them. Most are simply too bloated to be practically useful in a business environment where some of the client machines might be a bit old and therefore not able to deal nicely with the multitude of events firing all over the place in the grid. And not to mention what a disaster they tend to be in ASP.NET, especially in an environment where every machine is not set to use English (United States) as their regional settings. We’ve used Infragistics a lot, and by now I pretty much consider them to be the unholy Spawn of Satan. With VS 2005 we’ve been able to avoid using third party controls for several new projects, which I’m quite happy about.
Rhockford talked quite a bit about the data stuff, and I won’t repeat all of it here, but one thing I got stuck on was where to place business logic in an application. Quite obviously it should not be in the UI, and it seemed that his opinion was that the reason why people tend to put it there was because you couldn’t data bind properly to object before (not without a lot of work), and you couldn’t really put logic in the dataset. Either that or stupidity. But in this presentation he talked about how now it is possible to put logic in the data set, and seemed to be of the opinion that this is a good thing. I haven’t had time to think about this myself yet, but I have to say I am rather sceptical. Perhaps what he meant is having it in the object that contains the data in general, and since the data source could be an object as well then perhaps he meant was having it in a custom object and binding to that. Or then perhaps I just didn’t catch was he was on about.
Break for lunch, I’ll post more in the afternoon.