Mix 08 WPF Scheduling Application

imageMix 08 seems to be much more mature than ever before. In previous years there were a lot of ideas being spoken about; this year there are much more implementations of those ideas available to look at. It seems like a lot of people have been working on the new technologies over the past year or so. Hopefully that will lead to the ripening of many technologies (especially WPF) to a point where we can actually use them.

As an example, there is a scheduling application available for Mix. Unfortunately it only runs on Vista, but I captured a video and made a few screenshots for you.

This is the opening screen, with an agenda for the 4 days of the event:


(Click the image to make it larger.)

More »

Silverlight for Nokia Phones

image BBC News has just released an article referring to a deal made between Microsoft and Nokia to put Silverlight on mobile phones.

Yet another reason to get polishing those WPF skills.

Mix 08 Online Presentations

My favorite conference is about to start: MIX 08.

It’s a great conference for Microsoft developers with an interest in the web. Last year they had some great talks about user experience and architecture. There’s always something interesting to learn.

Unfortunately I can’t be there (as usual), but all the sessions will be online. Tim Sneath just posted details of where and when you can watch them:

  • The keynote with Ray Ozzie, Scott Guthrie will be available live at 9:30am Pacific / 5:30pm GMT on three streams: 750kbps, 300kbps, 100kbps.
  • The breakout sessions and panels will be online within 24 hours of each session at MIX08 sessions.

ExtensionMethod.net – An Extension Methods Database

While surfing around tonight, I came across ExtensionMethod.net, a database of useful Extension Methods for C# 3.0 and VB 9. I thought it might be useful, so I added a few of my own extension methods.

There aren’t many there yet, but there are one or two on there from Scott Guthrie.

Have you got any code you could put up there? You could be one of the first if you go now.


I just read a fantastic quote about LINQ from the book Pro LINQ: Language Integrated Query in C# 2008 by Joseph C. Rattz, Jr.:

I prefer to think of LINQ as a data iteration engine, but perhaps Microsoft didn’t want a technology named DIE.

I think they already built the technology for such a product, and put it in Vista. :)

It’s a great book. The first LINQ book I’ve found with a really detailed explanation of LINQ-to-SQL and the SQLMetal generation tool.

Remove and Sort Those Ugly “using-Statements”

Visual Studio 2008 has lots of goodies in it, like LINQ syntax, CSS editing, and testing tools. There’s a lesser-known feature which I really appreciate though – the “Remove and Sort Usings” command in the C# editor.

You activate the command by placing your cursor over the using statements and clicking on the right mouse-button.


More »

Refactoring C# Series: Aggregation of IEnumerable

I was recently reading Programming Ruby: The Pragmatic Programmers’ Guide, Second Edition, and came across this piece of example Ruby code:

[1,3,5,7].inject(0) {|sum, element| sum+element} -> 16
[1,3,5,7].inject(1) {|product, element| product*element} -> 105

Inject is a method which acts on an array by aggregating or accumulating the values within that array. It loops through the array, and for every item in the array, it performs a function. It then saves the result for the next iteration of the loop and eventually returns the aggregated value.

In C# 1.0 you would probably write such a method like this:

int sum = 0;
int[] list = new int[] { 1, 3, 5, 7 };
foreach (int item in list)
  // Perform some function, then save the result
  sum = sum + item;

It’s a bit long-winded, and if you wanted to make it reusable, you’d have a hard time.

In C# 3.0, you can do it just like you can in Ruby.

More »

A Pure ASP.Net Grid with Grouping

One of my favorite bloggers is Matt Berseth. Nearly once a week he comes up with a post where he does something amazing with the standard ASP.Net controls. I usually read his posts in awe. He’s really good.

But he’s not only is a good developer, he’s a great writer. Even though his posts are concise and straight to the point, most of them are pages long. You can really learn a lot from following his instructions.

He’s so good, in fact, that he regularly gets a mention on Scott Guthrie’s posts.

One of my favorite posts of his was where he used LINQ-to-SQL, a LinqDataSource control, and an ASP.Net ListView control – all new in .Net 3.5 – and made a grid with grouping functionality. He did it all in a standard way, and didn’t use any funny tricks.


Here’s a link to the article:

Building a Grouping Grid with the ASP.NET 3.5 LinqDataSource and ListView Controls


Start Learning Silverlight 2.0 Now

Now this is exciting. (Well, if you’re a geek.)

Silverlight 2.0 is on its way, and Scott Guthrie has posted 8 tutorials about using it.

I’m off to read them now…

The LinqDataSource and the Hidden Viewstate

Yesterday I thought I’d learn about the LinqDataSource in ASP.Net 3.5, and got an interesting surprise.

The new LinqDataSource can also be used with a LINQ-to-SQL model to perform updates. You simply add the DataSource to your page, set the table name, and set EnableUpdate to true. Then, using a standard DataControl, you can make updates to your data entities.

The question is, how does this work? It appears to be a bit magical. More »