Archive for November, 2006

Linq to XSD preview released

Last Monday, the Microsoft XML Team released the first Linq to XSD preview.

While the LINQ to XML programmer operates on generic XML trees, the LINQ to XSD programmer operates on typed XML trees — instances of .NET types that model the XML types of a specific XML schema (XSD). [...] LINQ to XSD is integrated into Visual Studio; so you just tag an XML schema as [a] ‘LINQ to XSD schema’, build your project, and the automatically derived object model is then part of your solution — just as if XML schemas were .NET types.

I only had a quick look, but I have to say it looks very promissing! Send them your feedback, but hurry, I want this to be included in Visual Studio Orcas.

Creating a Data Access Layer with Linq to SQL, part 2

Last time, we looked at how Linq To SQL might impact how we think about what a Data Access Layer (DAL) is, based on the dependencies between assemblies. This time, we’ll take a different approach: let’s look at typical Linq to SQL code, and try to decide where to put it. I’ll use a code sample from the “DLinq Overview for CSharp Developers” document included in the Linq May CTP (in C# 3.0, but the same applies to VB9).

Continue reading ‘Creating a Data Access Layer with Linq to SQL, part 2′

Amazing XAML

Since the .NET Framework 3.0 has been released, the interest is Windows Presentation Foundation (WPF) and XAML is growing. A good understanding of XAML and how it works is essential to understand WPF. A while back, Peter Himschoot wrote an excellent article about it: Amazing XAML.

Getting started with Windows Presentation Foundation (WPF)

Josh Smith compiled a list of links to WPF resources to help you get started. Oddly enough, he didn’t mention Microsoft’s Expression Interactive Designer, you might want to take a look at that as well. Thanks for the list Josh.

Creating a Data Access Layer with Linq to SQL, part 1

There is no doubt that Linq to SQL will have an enormous impact on the way we write data access layers. I wouldn’t be surprised to find out that the impact is so profound, that we might even have to reconsider the very nature of a data access layer. In fact, what is a data access layer (DAL) anyway?

Continue reading ‘Creating a Data Access Layer with Linq to SQL, part 1′

Tools I use for C# development

I’m often asked what tools I recommend for (general) .NET development, or at least which tools I use on a regular basis. Here’s a list:

  • Visual Studio Team Suite. I you can’t get Team Suite, get the Professional version. If you can’t get that one, use the Express version.
  • Code Analysis, which is built into Visual Studio Team Suite. FxCop does the same thing, and is free to download.
  • .NET Reflector. After MSDN Help (and possibly Google), this tool delivers the best documentation on the .NET Framework. Another free download.
  • The unit testing framework that is built into Visual Studio Team Suite. If you don’t have Team Suite, NUnit is a very good, free alternative, possibly in combination with NCover. TestDriven.NET integrates them into Visual Studio. All Free.
  • If I need to edit graphics such as icons or other bitmaps, I use Paint.NET with some additional plug-ins installed. Free as well.
  • Hardly needed at home, but for team projects at U2U we use Team Foundation Server.

There definitively are some other tools I should take a look at, for example WiX, or SandCastle and the SandCastle Help File Builder.

I you know of any must-have tools I didn’t mention, drop a comment.

Properties with property changed event, part 2

Last time I talked about properties with a changed event, I described the traditional pattern of having one event per property. But there is a disadvantage to that approach: since an event needs storage for a delegate, this technique wastes a considerable amount of memory if nobody subscribes to the events.

Continue reading ‘Properties with property changed event, part 2′

Paint.NET V3 looks great

I sometimes wonder how I do it, but in the middle of Tech·Ed I found the time to look at the third alpha release of Paint.NET. And I must say, it looks really good. The gradient effect, or rather the user interface to it, blows Photoshop out of the water. Those handles work really well, and not just on this effect by the way. The line/curve tool has them too, and I hope Rick adds them to the rectangle and ellipse and what have you tools as well. The Freeform Shape tool could use a bit of reworking along those lines too.

It looks like the plug-in API didn’t change, or at least my old plug-ins are still working. (reminder to self:) I need to check that out a bit further and maybe talk to Rick, because I believe there is room for improvement in that area, both in terms of functionality as well as performance.

But don’t get me wrong: this tool is great, and I encourage everybody who has ever touched up a photograph or made a drawing to download it and have a look. It’s good, fast, cheap on memory usage and cheap on money too (free!). You can even download the (C#) source in case you’re interested.

First day at Tech·Ed

It’s been an exciting day today at Tech·Ed.

I went to see Mike Pelton’s session on WPF, and I felt like a kid in a toy store, saying “Mammy, I want that too!”. It really looks nice, very developer friendly and powerful. This will definitely change the nature of Windows applications. And I don’t think it will just impact games and little nice tools that your grandma uses to burn DVD’s. The ease with which you can compose user interfaces will have a profound impact on business applications too, even if those don’t need the fancy graphics and 3D animations. That good old combobox will never look the same again.

The other session that was really impressive was the one on LINQ by Anders Hejlsberg. I had read about LINQ and knew it would be impressive, but the power of this thing was still amazing. I guess it’s a bit like a chainsaw, sometimes you need one but you don’t give it your kids to play with, too dangerous. But the thing is, if you handle it carefully, its’ a real powertool that can save you many hours of work. Especially if, like mine, most of your applications have that database in the back and add lots of XML to the mix.

Tomorrow will bring even more LINQ and WPF, but first I have to go to a party. Talk to you later.

Preparing for Tech·Ed: Developers in Barcelona

After a busy week and a bit of a flue, I’m getting ready to fly to Barcelona tomorrow. The entire U2U crew are going, so I’m looking forward to a week of fun and learning. What’s on my agenda?

I’ll definitely check out the sessions by Anders Hejlsberg. He’ll talk about LINQ and the other new features of C# 3.0.  The .NET Framework 3.0, WPF, WCF and WF are high on my agenda too. Add SQL Server and Office 12 to the mix and top it off with some architecture, security and performance sessions, and we have a week full of learning fun.

Obviously I’m looking forward to the parties as well, especially the country drink in the Habana Bar that U2U is organizing on Wednesday together with Microsoft Belux. I expect to meet some “long time no see” friends there.

With all that stuff going on, I’m not sure I’ll find the time to blog about it. But if I do, you’ll read all about it right here!