Mike Taulty's Blog
Bits and Bytes from Microsoft UK

November 2007 - Mike Taulty's Blog

Blogs

Mike Taulty's Blog

Elsewhere

  • LINQ (to XML) and Dictionaries

    Someone asked me today about how to go from a piece of XML which contained key/value pairs to a Dictionary<K,V>. This was the best I could come up with; Dim xml = <items> <item key= "one" value= "A" /> <item key= "two" value= "B" /> <item key= "three" value= "C" /> </items> Dim result = xml...<item>.ToDictionary( _ Function (k) k.@key, _ Function (v) v.@value) Written here in VB as it's so nice for XML work.
  • LINQ to XML and IXPathNavigable

    Something I've been pondering. Living over in System.Xml.XPath is an extension method to XNode (from LINQ to XML) called CreateNavigator . So, given something like an XElement ; XElement x = new XElement( "foo" ); I can go ahead and get an XPathNavigator from it; XElement x = new XElement( "foo" ); XPathNavigator nav = x.CreateNavigator(); So, how come we do this with an extension method rather than have XNode implement the existing IXPathNavigable ? I found that a bit odd and would be interested to know if someone has an explanation. It's not particularly hard to write a ToNavigable() extension with perhaps something like this (scribbled very quickly); public static class Ext { private class Navigable : IXPathNavigable { private XNode node; public Navigable(XNode n) { node = n; } public XPathNavigator CreateNavigator() { return (node.CreateNavigator()); } } public static IXPathNavigable ToNavigable( this XNode n) { return ( new Navigable(n)); } } and writing that had me thinking about how it would have been ...
    Filed under: , ,
  • Parallel Extensions

    Yet more news! The parallel extensions for .NET Framework V3.5 now have a Community Tech Preview. You can find the download here to try and Daniel has been busy making videos on this already over here with some notes over here . I've not read up on this particularly at this point because I'm still on Beta 2 of Visual Studio 2008 (mostly because I'm on Beta 2 of the ADO.NET Entity Framework) but I imagine that I'll take a close look when I get to the RTM of VS 2008. I saw a little of Joe Duffy's session at TechEd Europe and what I saw there largely looked like a nicer abstraction than what we have in the .NET ThreadPool so it'll be interesting to see what else is in there.
  • Silverlight V2.0

    And only yesterday, MikeO were still calling it V1.1 at our Silverlight event in Birmingham. Get the news from ScottGu ! If I read it correctly; Extensible control model Layout support (hopefully that's extensible too :-)) Data binding Control templating Actual Shipping Controls - see Scott's list :-) Various comms options beyond what we have today with JSON-only encoding including WS-*. and more. There's a beta coming in Q1 of 2008 with a Go-Live license - wahey and Visual Studio will get an update too for Silverlight dev. Scott's post also says that the ASP.NET 3.5 Extensions are coming next week including the MVC bits and the Dynamic Data bits.
  • Expression Encoder, Silverlight, Windows Live Writer

    I've just tried for the first time the killer combination of; Expression Encoder The plug-in for Expression Encoder that lets you encode a video and publish it directly to Silverlight Streaming The plug-in for Windows Live Writer that lets you automatically publish a Silverlight Streaming application into a blog post. Together, these 3 produce one of the coolest things I've seen in quite a while - I can just take any old video and get it onto my website in the quickest, easiest manner with a full Silverlight application. This is very, very slick. It's so slick that I thought I'd use Camtasia to record a quick screencast of me uploading this particular blog-post so you can see exactly how slick it is. Not 100% sure how well this will come out because I was a bit "hasty" in the transcoding... Update - this post was updated on 11th March 2010 - apologies but this video got lost over time and is no longer available.
  • Finally, the truth is out

    Martin sent me this . I guess it's probably "old" by now but I liked it.
  • Free Silverlight Training at Lynda.com

    There's 4.5 hours of free Silverlight training up at Lynda.com. Go here for the materials, the topic list looks pretty comprehensive to me; 1. Understanding Silverlight 2. Discovering Silverlight Experiences 3. Silverlight Tools: Expression and Visual Studio 4. Getting Started with XAML, JavaScript, and HTML 5. Advanced XAML 6. Advanced JavaScript Techniques for Silverlight 7. Asset Preparation for Designers 8. Working with Media in Silverlight 9. Creating a Media Player with Silverlight 10. Creating Programmatic Animations 11. Silverlight Deployment
  • 3D Desktop Management

    Quite a while ago I played with a bit of free software called Yodm3D which provided a 3D virtual desktop manager for Windows and worked on Vista. This is being turned into a commercial product called DeskSpace and I've just installed and tried their trial version and, so far, it's greatly improved over what was Yodm3D. The main thing I notice is the perf - radically different (i.e. better) than what you used to get with the Yodm software. I'll try this for the next 14 days and see how it goes. I've been using some kind of desktop manager for talks for a little while as it provides an easy way to switch between slides/demos without having to press ALT-TAB and minimize/maximize windows and so on.
  • Singularity

    I found this research site fascinating although I'm currently struggling to read the whitepaper because the PDF reader keeps crashing on me :-(
  • UK Visual Studio 2008 Resources

    An internal MS person today asked the perfectly reasonable question of "Where can I find some resources on Visual Studio 2008?". I know that we've done quite a lot of "stuff" in the UK team and Daniel's recent post is a good place to start . Beyond that, I thought it'd be easy to gather the UK materials together but it turned out that it's not (we have a couple of web-site "issues" from what I can see with our Screencasts and Events pages) so, in the meantime, I thought it'd be good to link to have a post which brings together some UK resources around VS2008 (of course, there are many, many more resources out there too :-)). Blogs There's probably too many posts here to do them justice individually. There are 4 people in my team - me , Daniel , Martin , Mike . You can catch up with the combined outputs by checking out the feed that I publish here . Videos We made a couple of videos out at TechEd about VS 2008 and .NET Framework V3.5. This is just myself and Daniel chatting about the topic and it was meant to be...
  • LINQ and DML

    One of the things that I've heard quite a few times (and I heard it again yesterday) is "how come LINQ doesn't define DML?". This is an interesting one for me. Across data sources we have the pretty consistent query expression pattern. from a in b join c in d on e = f where g = h etc. but when it comes to making changes to data we have different approaches such as; ObjectContext.Add( ) DataContext.InsertOnSubmit() // used to be called Add() before RTM XElement.Add() so, whilst query has become "normalised", the insert/update/delete operations haven't. They're left to the specific way that the API you're using defines them. You could imagine that DML could have been implemented with LINQ, e.g. XElement foo = new XElement("foo"); insert foo values new XElement("bar"); delete foo from foo.Descendants("x"); or something along those lines although as soon as I start to ponder what that imaginary syntax might look like for these operations I start to see that it'd be hard to make the syntax as terse as what we have...
    Filed under:
  • Visual Studio 2008 on MSDN

    Ok, so I'm hardly going to break the news here that Visual Studio 2008 is now available for MSDN subscriber downloads. Also, SQL Server 2008 November CTP is now available for download . However, one thing I'd add to all the (very understandable!!) excitement is that if you're anything like me and you've been building things with Beta 2 then you might have installed things such as; Expression Blend 2 Silverlight tooling for Visual Studio ADO.NET Entity Framework Beta 2 ADO.NET Entity Framework Tooling CTP1 and so on and (as always happens when products RTM) you might have to wait a little while for all these other bits and pieces to come into line with the newly RTM'd Visual Studio. So...for now I'll keep working with Beta 2 and give it a few more weeks before I go around the whole cycle and upgrade everything but it'll be very nice when I finally get there :-)
  • Interactive web pages

    I liked this advert (yep, weird thing to say isn't it :-)) that I saw on MSN this morning for "Pirates of the Caribbean"; There's 2 bits of embedded content and the bottom right ship is firing a cannonball towards the ship at the top left. Certainly attracted my attention.
  • Links

    Couple of blog-posts that I came across; Behaviour of variables in LINQ to Entities and, unrelated, but very cool if you've used Expression Encoder and zipped the files yourself for Silverlight Streaming; Silverlight Streaming Plug-In for Expression Encoder
  • Silverlight Talk in Manchester

    Thanks to all the people who came along to our Silverlight talk in Manchester today and a special thanks to putting up with the 3, yes 3, projectors that we had to work our way through before finding a satisfactory solution. I can promise you, we did try and if you'd seen the A/V guy (thanks to him too) putting cables through the ceiling tiles you'd have been impressed :-) If you're looking for the PowerPoint slides that we used t hen they are here If you're looking for the demos that we used then they are over here on Mike's web site . This is an unusual talk for me in that we developed it together. That is, we sat down and structured it, wrote some demo code and then have been out and about delivering it together. Makes a nice change from the way that I usually work on talks which is to sit down and write everything from scratch in isolation - that's easier (no-one to disagree with :-)) but less fun.
    Filed under:
1 2 Next >