Saturday, June 10, 2006

WinFx is dead, live .NET Framework 3.0

According to the latest rumors, Microsoft decided to rename WinFx (a new set of technologies including Windows Communications Foundation, Windows Presentation Foundation, and Windows Workflow Foundation) to .NET Framework 3.0. Moreover, 3.0 wil ship as part of Vista.

Thursday, June 08, 2006

Windows Vista Beta 2 attempts

The weekend Vista Beta 2 was released, I downloaded it from the MSDN subscribers site and tried to install it on my desktop PC (P4, 2GB of memory, 500GB HD). The installation went quite well in fact. Even my two RAID configurations did not cause any problems since the old XP drivers still worked. Also, I was quite happy to see that the old DOS-style installation UI has been replaced by a genuine windows-based UI. You can even pop-up a command prompt with SHIFT-F10 at any point within the installation. Most other drivers are built-in, but I downloaded the latest NVidia driver for my Geforce 6800GT to get the most out of the Aero theme (which looks amazing). I was actually planning to replace my XP installation with the Vista (I have been using XP since it was beta 2), until I ran into a driver problem. Apparently, Creative does not have properly working drivers for the Audigy 2 ZS card I own. And, without it, Vista is useless, so that’s that…

Then one of my colleagues mentioned that he had installed Vista Beta 2 on his company laptop, a Dell Latitude D800. He was quite fond of it and convinced me that it was working like a charm. He already replaced his standard XP and installed all the other stuff as well (Visual Studio 2005, WinFx beta stuff, WWF, WCF, Office 2007 Beta 2). After a week or so, I decided to try it as well. The installation did run like a charm. All the drivers were installed automatically, even WiFi and Bluetooth. With XP, you need to install a long list of drivers to get it to run properly. I then installed all the common packages and components I use for daily work. But then the trouble began….

After a few BSODs while trying to get my laptop to sleep (closing the lid), several forced kills of the explorer.exe process, and the WiFi connection failing intermittingly, I decided to put my XP installation back. My girlfriend uses the laptop for daily browsing and wasn’t quite happy with all these problems. Let’s wait for beta 3.

Although I do see the potential of Vista (and many of you will too), Scott Finnie wrote an enjoyable article highlighting some of the things you may not like.

Web 2.0? Does the web have a version number?

While we were visiting Redmond, one of the presentations mentioned the phrase Web 2.0. Since then, I’ve been trying to grasp the concept of that, but apparently I’m not the only one who couldn’t get a clear picture. In fact, the whole concept is as vague as possible, and none of the articles I’ve read did a good job of making the concept more clear. Tim O’Reilly was the first to write an article that made sense to me. Make sure you check it out…

WCF MasterClass

Next week I'm going to attend a WCF MasterClass at Microsoft Netherlands. Since Gijs de Jong is currenly most visible as the WCF expert here, I presume he will be the tutor for those two days. I'm looking forward to it, but I hope I haven't spend to much time reading all those articles...

C# 3.0 is Cool

I’ve already mentioned this article, but I decided to give it another thorough look, and I must say, C# 3.0 is really cool! The article is written by the infamous Don Box and it provides a comprehensive step-by-step tutorial on how each of the new C# 3.0 features can be used in practice, and eventually, how they are all meant to support the new query expressions. I already knew about LINQ, but until now, I wasn’t aware of its full potential. Many people have stated that it’s just an attempt by Microsoft to get a share in the ORM market. But in the same sense the foreach keyword is merely a shortcut for using the IEnumerable/IEnumerator interface, query expressions are really a SQL-like shortcut syntax for concatenating various query-like operations. You can perform query expressions on collections, databases (DLINQ), XML structures (XLINQ), and any other data source that conforms to the query expression pattern. Most of the new C# 3.0 features have been introduced to make this syntax compact and readable.

Thursday, June 01, 2006

C# 3.0 Specifications for May 2006

If you have visited the Future Versions page of the Microsoft Visual C# Development Center, you may have already browsed through the C# 3.0 documentation that is already available. Since I have been studying the May 2006 version of the C# 3.0 Specification, I’ll quickly provide a summary of the most important aspects.

  • Implicitly typed local variables and arrays. With the use of the var keyword, the compiler will try to determine (infer) the appropriate type of the variable without the need to expliclty specify the type of variable. This works both for simple variables and arrays. Although that sounds really convenient, I’m afraid this feature will be error prone. I already see a coding standard rule appearing…
  • Extension methods. This allows you to add new members to existing classes even if you do not have the source code. For instance, you can add a new member to the built-in String class without deriving from it or modifying its existing code. Quite a cool and handy feature.
  • Lambda expressions. Introduces a new syntax for defining a delegate handler with less code than anonymous methods already require. It supports defining both statements and expressions in one line (e.g. x => x+1).
  • Object initializers. In a similar fashion as arrays can be initialized, we can now initialize any object during its construction. C# 3.0 introduces a new syntax that allows calling the default constructor while initializing one or more of its properties in one statement.
  • Collection initializers. It was already possible to initialize an array with a collection of values, but now we can also initialize collections as well as long as they implement ICollection.
  • Anonymous types. With the combined efforts of the var keyword and the object initialization features, you can now create an instance of an anonymous class that is defined when you create it. Nevertheless, since you cannot refer to that instance other than through the variable, I’m not sure how it is useful other than in the LINQ stuff (see below).

Although most of those new features can be quite useful on its own, looking more closely at the syntax and examples of the new Query expressions (LINQ) reveals that they have been introduced for facilitating the query expressions. This new syntax allows a developer to use a kind of SQL statement right into your code. The compiler will translate this syntax into a hierarchy of method calls on a type that supports the Query Expression Pattern, a set of methods and properties required for supporting query expressions. This potentially allows a developer to perform queries on multiple data sources such as databases, XML documents, or other relational data structures. Check out this article to get a feeling on what you can do with it. (It’s from September 2005 though, so some stuff may have changed already).