Wednesday, October 25, 2006

CodeTidy Update

Listening in catch-up mode to past DotNetRocks podcast shows as I commute into work in the car (Milton Keynes to TVP takes about 1.5 hours each way each day), I came across a recent episode with Mark Miller of Developer Express in which they referred to a DotNetRocks TV episode he did showing off DevExpress's DXCore plugin framework for Visual Studio.

I didn't even know they did the DNR TV , but it sounded like it might contain something useful on doing tools for the VS IDE, so I took a look at the show and was amazed to watch as they used the DXCore framework to basically build a first-cut of CodeTidy! The DXCore basically contains a whole bunch of classes that wrap the IDE and provide access to code and code windows in a nice, comprehensive and logical way. Mark took less than an hour to put together an add-in that could sort the members of the current class/type in the editor window by visibility (private, public etc.) and type (properties, mem vars etc.) and a bit of sub-sorting of one category within another.

The design approach he took wasn't quite how I would have done it, but that is not important; what was important was how easy the DXCore framework made it to do things like grab a method and all its attached XML comments and queue up a delete/move operation on it along with all the others to make the sort operation consistent and undoable - all courtesy of calls to DXCore. Incredible.

So...I have grabbed the sample code that they thoughtfully made available and have gotten hold of a copy of the DXCore install (it is free) and plan to refactor/build on it to make a CodeTidy I can use in daily coding.

The session also allowed Mark to show off the tools that DevExpress actually charge for - Refactor and CodeRush - which looked pretty impressive too. Refactor does what it says on the tin and CodeRush is like intellisense on steroids with masses of customisable keyboard shortcuts for frequently used actions like newing up class and vars, creating if, while, for/foreach blocks etc. Could be a purchase coming on...

Essential WPF - Chris Anderson

I have been looking at draft chapters for Chris Anderson's forthcoming WPF book and it looks like it is going to be a great tech reference - lots of under-the-hood stuff and a nice logical progression through the major concepts.

More XAML-oriented than Charles Petzold's Applications = Code + Markup which I thought was (understandably) very code-behind oriented and procedural. Given that I think the most exciting thing about XAML and WPF is the declarative programming aspect, I think that books that focus on this side make more sense.

Original and Best - Chris Sells and Ian Griffiths original Programming WPF had the approach spot-on and I am really looking forward to their WPF-release update next year.