September 2005 Entries

Dan Fernandez has a nice post on how to go about writing your first extension method in C# 3.0.

I liken the concept of extension methods to a variation of prototyped based programming where you can assign a new method to any type just by adding it to the prototype. It's not 100% the same, but if you're familiar with that concept it should help get the concept of extension methods across.

I also just attended a chat session on C#3.0 yesterday (transcript not yet available) where they mentioned they were considering how to do extension properties as well. That would be very interesting since that would involve adding arbitrary state to an object as well.

posted Friday, September 23, 2005 11:59 AM | Comments | Filed Under [ .NET ]

Here's a great article from IanG on the what the “var” keyword is all about in C# 3.0. If you're still not quite sure you understand what all the fuss is about, this article will definitely help clear things up for you.

posted Friday, September 23, 2005 10:36 AM | Comments | Filed Under [ .NET ]

Still not sure what LINQ's all about or why it's “so freakin' cool”? Well check out the 101 LINQ samples up on MSDN.

WARNING: You may want to put a bib on before clicking through to the article as involuntary drooling may ensue shortly after you begin reading. ;P

posted Wednesday, September 21, 2005 5:22 PM | Comments | Filed Under [ .NET ]

I'm gonna come across as defending MS here, but really I just think this assesment of LINQ from Frans Bouma is just completely off base. LINQ has nothing to do with ORM at its core, instead it enables richer ORM scenarios with natural language query extensions for developers.

If you want to talk about DLINQ, well that's another story, but then you're talking about a layer built on top of LINQ and it is a completely separate beast and some of us have already had that discussion over on Paul Wilson's blog. That said, I realize that most of the demos were done with DLINQ so it can kind of blur the lines and make it hard to see the distinction between the two, but what's important are the core, abstract concepts:

  • Query any IEnumerable<T>
  • Can use natural query language syntax OR just use explicit delegates
  • Ability to do projection and still work with a static type (really this is just a feature of the language, but it absolutely core to LINQ's success)
  • Complete query API extensibility using custom extension methods
  • Expression trees enable product writers to proxy queries through to back end for efficiency (e.g. turn into SQL or XPath query for max efficiency over underlying store)

I don't understand why ORM product writers aren't absolutely elated over this technology. We finally get to do away with all our stupid, ugly query engines that we all do differently and force our customers to learn. Now we simply provide an expression evaluator for LINQ and developers can use the natural syntax of their favorite .NET languages (VB9 and C#3.0 on board so far) to query our entity layers. Isn't this a dream come true? What am I missing?

posted Monday, September 19, 2005 10:06 AM | Comments | Filed Under [ .NET ]
Now that BitmapEffects (formally ImageEffects) have returned in this build of WPF, some have already begun wondering why there are only two (drop shadow and blur). Well, fear not! At the final PDC session I attended, where the low level architecture of WPF was discussed in an open forum manner, the WPF team has said that they already have 48 effects under development and planned for the first release. Let's also not forget that the API is 100% extensible and Microsoft sees a market for third parties to develop effect libraries.
posted Sunday, September 18, 2005 6:54 PM | Comments | Filed Under [ .NET WinFx/Vista ]

Wow, the future sure looks bright for rich web application development. I like the approach they've taken to get client side data, using JSON, from Web Service method calls. They've also built a rich client side framework of utility classes. The server side story is also very good in that they have a suite of rich Atlas-specific controls/components which spare you having to do a lot of “glue”ing of UI elements to JavaScript if you want to avoid it.

My one complaint is that there are a lot of paralells in architecture between the Atlas and WPF and you can even see a lot of similarity in the APIs of the two, but the execution is completely different. For example the way templating works is close, but Atlas doesn't have DataTemplates (as far as I've seen) and they use an inverse approach of WPF's ItemsControl and Panel.IsItemsHost. I'm hoping that, once I get a deeper understanding of Atlas, I can provide some constructive feedback that might help nudge Atlas' approach to be in line with WPF's approach to solving the same problms. It would be great if there could be an even larger knowledge transfer/simpler transition when working between the two technologies.

posted Wednesday, September 14, 2005 6:39 PM | Comments | Filed Under [ .NET Web Development ]

Ok, so I just finished the C# 3.0 session given by Anders. Basically C# 3.0 is receiving functional style programming through the addition of lambda expressions. Even scarier is that the lamba expressions can be compiled into actual IL or into an expression tree which custom methods can turn into something like a SQL statement under the covers. Really hard to visualize just from me writing about it, but believe me it's HUGE.

At the same time it is also receiving the ability to do psuedo-prototype based declarations through the use of a technology called extensions which allow you to add methods to any type that already exist. This is done with what is basically a clever compiler hack. The really interesting thing is that none of the C# 3.0 features require any changes to the CLR. As such, it runs flawlessly on the Whidbey CLR.

NOW I CAN'T WAIT FOR 2008. :P

posted Wednesday, September 14, 2005 4:42 PM | Comments | Filed Under [ .NET ]

The hottest technology of the PDC so far is LINQ for me. I'm a huge fan of O/R mappers and have written my own and so it's quite interesting to see how DLINQ has come together. Anders just made a comment like “With DLINQ we allow you to return only partial object queries, no other O/R mapping layer can do that so easily!”. Well... uhh... yeah, but you changed the entire compiler architecture to do it! :)

The good news though is that everything they've come up with to implement LINQ is fully extensible. That means I'll be able to keep my existing O/R mapping layer and just extend it to support LINQ extensions. That way developers will be able to use LINQ over any existing custom entities. Great stuff!

posted Wednesday, September 14, 2005 3:14 PM | Comments | Filed Under [ .NET ]

I don't know how many people have begun digging into the Avalon/WPF bits that were released for the PDC, but there are a ton of breaking changes. The biggest breaking changes that are bound to affect any existing projects are in the Animation APIs. To that end, I'm working on a new change log to help give people who have been playing with previous bits a smoother migration. Keep your eyes peeled.

posted Wednesday, September 14, 2005 3:01 PM | Comments | Filed Under [ .NET WinFx/Vista ]

Quartz is the codename for an web development IDE, part of the Expression suite, that is targeted at web designers/developers. It's undeniably the best implementation of web development environment out of Microsoft ever. It blows VS.NET off the face of the Earth with it's support for designing web sites with respect to standards technologies (CSS, [X|D]HTML, XSLT, etc.). It also fully supports ASP.NET controls and master page design. As a VS.NET user I'm already jealous.

This product came as somewhat of a surprise (to me at least), but it's arguably the most immediately useful product I've seen coming out of the PDC so far. My only question is: How do I sign up for or where do I download the Beta!? :)

posted Wednesday, September 14, 2005 2:58 PM | Comments | Filed Under [ Web Development ]

Currently blogging from my little hotel room desk at the Wilshire Grand. I'm in room 446, my cell is 973.699.0532. Feel free to give me a buzz if you'd like to chat or grab some grub.

One thing I will say is that there is already a larger female presence here at this PDC than I've ever seen at any previous PDC. Unfortunately, just as I was reflecting on and being impressed by that, I was sadly reminded as to why there aren't more women in this business by some childish, chauvinistic guys cracking the usual slew of jokes on my bus ride back to the hotel from the conference center. *sigh*

Oh well, time to figure out what breakout sessions I'll be attending. It's really tough to choose. I'd love to go all WPF because that's my hobby technology, but the truth is that would be wasting my time here since I'm already ahead of the game on that. I'm really looking forward to the two Atlas sessions as well as the VS.NET tools sessions. Obviously Anders' C# 3.0 session can't be missed. Ahh technology... ain't it fun? Still can't believe I get paid to work with this stuff for a living. ;)

posted Monday, September 12, 2005 5:56 PM | Comments | Filed Under [ .NET WinFx/Vista Web Services Web Development ]