Monday, October 24, 2011

VSLive 2010

So I just got back from the Microsoft VSLive 2010 conference in Redmond WA and I have to say that I learned a lot of cool stuff.

Some of the hot topics included:
1. Workshop in WCF
2. LINQ (mainly around XLINQ and PLINQ)
3. Async CTP (.NET 4.5)
4. SWAG (all of the other goodies that goes with going to a conference)

WCF Workshop
So while I'd love to start with the WCF workshop we really covered far too much stuff to talk about in a basic blog. The majority of the basic WCF concepts are really around creating the data contracts, defining your service calls, and allowing WCF to really handle the rest of it. I also had a great opportunity to walk through our code and compare some of the design decisions that our guys made. I have to say that Bryan made a bunch of smart choices on how we wanted our WCF services to work. It lost a lot of the black magic feel after the workshop.

LINQ
This class was short, sweet, and AWESOME. While I was pretty familure with the majority of the LINQ calls I learned that all of the syntactic sugar was just that... sugar. Once you include the LINQ libraries you can just use the LINQ extentions on any collection that implements the IEnumerable interface. That means that on a collection of strings String[] myStrings you can make a simple method call like myStrings.Where(n=>n.Contais("hello")). which returns a new IEnumerable collection. This really means that you don't have to the "sugar" that most people use with LINQ. For example:

IEnumerable helloStrings = myStrings.Where(n=>n.Contains("Hello"))

which is the same as:

IEnumerable helloStrins = from n in myStrings where n.Contains("Hello") select n

Honestly while the second version makes sense for people that like SQL, the first version makes a lot more sense to me as a .NET programmer. And you can nest the calls with the method versions.

IEnumerable longHelloStrings = myStrings.Where(n=>n.Contains("Hello")).Where(n=>n.Length > 5);

which is the same as:

IEnumerable helloStrins = from n in myStrings where n.Contains("Hello") and n.Length > 5 select n

While they are about the same legnth in size, again the first one makes more sense to me as a .NET programmer and not a DB Query developer.



The rest of it...
Well I'll leave the rest of it for another blog. This covered some cool things with LINQ and hopefully you find it useful to not have to use the LINQ syntax.

Enjoy