Newcastle Coders Group 2006-09-06 - Paul Stovell’s Presentation - My Thoughts

Posted in Coding, IT by Will on September 6, 2006.

(Edit: This has been revised and updated since first posting on the night of the presentation — hopefully it’s a little clearer now)

Paul Stovell of Readify came to the NCG tonight to give a presentation titled “Windows Forms 2.0 Data Binding and Asynchronous Business Objects”. Paul’s comments and links from the presentation are here

This is the first “proper” presentation I’ve attended (in person), so I thought I should write up what my take on it was, and what I learned from it. (It also helps me to recall it later if I find this post)

It’s obvious by listening to Paul speak that he’s excited by the technology he’s presenting - it’s not something he finds a chore.
This results in having a lively presentation, with room for a few laughs and doesn’t become dry or boring.

Firstly, it should be noted that I have very little .NET 2.0 experience at the moment. Most of my experience is just fiddling in VS.NET 2005, with a small (personal) project for a Smart Device in the Compact Framework.

So, what did I learn?

Data binding under .NET 2.0 isn’t just mapping to Datasets/Datatables.

You can bind controls to any type of object (eg: Textbox.Text bound to DateTimePicker.CurrentDate, or Textbox.Text bound to MyCustomerObject.CustomerName), assuming it has been appropriately configured (it must implement a few bits of functionality).

I was always under the impression that you could only ever bind to a Dataset, Datatable, or something similar… the ability to bind to objects directly is great … I can see a bunch of uses for this in a project I’m working on right now, for example. And I’ll be using this to great effect in my personal CF project too.

Data binding is easy
Actually, it’s fair to say that in .NET 2.0, it’s dead easy - the IDE lets you drop a Data____ onto a form in various layouts, and it’ll go and create all the joining code.

If you want something more complex, you can drop databound

It takes more effort to write code to just get all the data in there “by hand” — than it does to do a bit of databinding (or so it seems) which has the ability to send updates as necessary.

Use Background Worker Threads to do any async work in your Business Objects
Using a Background Worker Thread inside your business objects is easy with anonymous delegates (no more Control.Invoke) - and you can implement the INotify___ interface on your classes and use a NotifyChange() to inform data bound objects that the data has changed.
Paul demonstrates this by having a Property getter go and calculate the total value of an account by Summing the rows, which then sends a NotifyChange message to all bound objects that the data has changed.

(the ___ stuff is me not knowing the full name, and it’s too late to and look it up right now)

The only things I think that Paul could do to improve the sessions can be summarised fairly easily:

Paul, Try not to let the presentation get ‘off the rails’ quite as much.
This was (in this presentation) caused by one or two people asking questions not relevant to the current thing that was happening. IMO - most of the questions not immediately relevant could easily have been punted to the end of the main part of the presentation. (eg: Going back to code that was on screen 30+ minutes ago gives a bit of a jolt to the thought process for me)

—-

Some personal observations:

It’s impressive to see Paul actually do most of the coding on-screen, right before us. I guess this is a confidence thing - I can’t stand people watching me code - because I start making mistakes a lot more than I would normally.
More prepared bits of code (”…and here’s one I created earlier!”) would make things a little smoother (less dependancy/type conversion/mistype issues).
Seeing that not everyone’s code is perfect is still fine and resulted in some things to happen that resulted in a few laughs.

I guess another thing I’m starting to pick up on is that C# really isn’t that different to VB.NET (at least, for most of the work) — I’m guessing I could probably switch to it in a month or two if I gave it a go and had a C# person to bounce stuff off.
The VB.NET jokes/comments by various people (Yes, that includes you Paul :P) reminds me of the Nikon/Canon rivalry in the meets I’ve been to for that.

Oh, and Some people in the audience don’t know when to stfu and stop hogging everyone’s time. I’m just glad that I managed to shut up for most of it.

2 Comments

  1. Paul Stovell replied:

    Hi Will,

    I’m glad to hear you enjoyed the presentation :)

    Thank you for the kind words and great feedback. I’m comfortable with coding on screen and I think it adds value because people get a little more time to understand the thought process behind what I write, rather than if I just copied and pasted code on the screen. I think I’ll keep it already written as well though so I can copy and paste when time becomes an issue.

    As far as things going off topic, that seems to happen at a lot of presentations I’ve seen and given, and I’m not quite experienced enough to know the correct way to handle it. Some presenters like to save all questions until the end, which makes it flow a lot better, but I prefer my talks to be more “interactive” especially since it’s a smaller group. When a discussion becomes off-topic or is detracting from the rest of the presentation, you need to put an end to it and move on, but at the same time you don’t want to give the impression that you’re ignoring the audience. I think I need to watch more presenters and study the way they handle these situations.

    Oh, and you should definately learn C#. It will make your code higher quality ;)

    Thanks Will,

    – Paul

    September 12th, 2006 at 6:42 pm. Permalink.

  2. Peter Drew replied:

    Hi Will,

    I attended the Sydney Dot Net Users Group last night and caught up with Paul. He mentioned this site to me and I was curious to see what you had on your blog…I’ve often planned to start one - but just never seem to have the time. Great work on your part.

    Paul gave us a great presentation on a topic that is actually quite advanced. I know a lot of people I’ve spoken to got something out of the presentation. I’ve already started converting some of the code I’m working on to take advantage of the flexibility of nullable types. Just today I was talking to one of my colleagues about binding to objects over our legacy code which uses datasets.

    I think the C#/VB rivalry will always be there (For a counter view to Paul, check out Billy Hollis’ site: http://www.DotNetMasters.com). But .NET does give the maximum flexibility to allow people to switch between different syntax. IronPython is the code name for Python .NET which is apparently on its way. Personally I think that the best tool you can get for learning the different strains of .NET is Reflector (http://www.aisto.com/roeder/dotnet/).

    Adding another string to your bow is always a good thing.

    Cheers,
    Peter

    September 22nd, 2006 at 12:30 am. Permalink.