Wednesday, August 27, 2008
 
   
 
Welcome to my site

First let me say thanks for stopping by my site. My name is David Hanson-Graville and I am a IT consultant working in the UK. Let me make it clear, I am passionate about technology and specifically .net and its various forms. I've programmed in a range of langages, but I can say, I am now at my happiest when coding with c#. I hope my blog is an enjoyable & educational read and please feel free to email me at David.Hanson@OnTheBlog.net if you have any questions. 

Search Minimize
Print  
Archive Minimize
Print  
Dipstick Survey Minimize
What technology are you most excited about?











Submit Survey  View Results
Print  
Contact me Minimize
Print  
Silverlight News Minimize
silverlight - Google News
  1. The Mojave Experiment website gets a Silverlight revamp - Ars Technica

    Published Wed, 27 Aug 2008 16:26:19 GMT by
  2. Silverlight surfing - Broadband TV News

    Published Tue, 26 Aug 2008 16:31:42 GMT by
  3. Microsoft invests in Move Networks - C21Media

    Published Wed, 27 Aug 2008 11:30:37 GMT by
  4. Flash vs Silverlight in Olympics race - TechRadar.com

    Published Wed, 27 Aug 2008 10:28:20 GMT by
  5. Olympics set the stage for emerging Web tech fight - guardian.co.uk

    Published Fri, 22 Aug 2008 21:09:05 GMT by
  6. Looking At A different approach to AJAX / Silverlight front-ends - ITProPortal

    Published Tue, 26 Aug 2008 15:14:23 GMT by
  7. NBC Viewers Not So Into Silverlight - Wired News

    Published Fri, 22 Aug 2008 20:24:43 GMT by
  8. Microsoft Investment in Move Networks: How Silverlight and Move ... - Beet.TV

    Published Tue, 26 Aug 2008 00:45:03 GMT by
  9. Why the UK was Wrong to Ban the iPhone “Just the Internet” Ad! - the iPhone Blog

    Published Wed, 27 Aug 2008 21:03:09 GMT by
  10. RE[3]: Speeding up javascript is a hit to MS? - Newmobilecomputing.com

    Published Wed, 27 Aug 2008 12:25:08 GMT by
Print  
OnTheBlog Minimize
Author: David Hanson Created: Wed, 02 Jan 2008 20:28:49 GMT
All things .net, wpf, XAML, C#, Workflow Foundation and many more.

Free Download Manager
By David Hanson on Sat, 21 Jun 2008 11:35:45 GMT

Over the last few weeks I have been using the following product found here (http://www.freedownloadmanager.org/features.htm) which provides some cool features for downloading. Since using it I am starting to get the most of out of my 20mbps cable connection. The reason is due to the fact that the when downloading, the software creates multiple HTTP connections to the file. Check this download speed for the Silverlight 2 Beta 2 tools. Awesome.

Great speed for downloads

Key features

  • Multiple HTTP connections for a single download (Make downloading ALOT faster)
  • Automatically resumes on broken connections
  • Torrent support
  • Media Previews for partially downloaded files
  • Download only certain files held in a zip file.
  • Download entire sites

Screen shot

Comments (0)

Cross-Platform DRM Support for Silverlight 2 Beta 2
By David Hanson on Sun, 08 Jun 2008 16:32:14 GMT

I was having a read through of the feature set for Silverlight 2 Beta 2. One of the items that instantly stood out for me was the fact that with Beta 2 Support for DRM (Digital Rights Management) has made it, and more importantly...........IT’S CROSS BROWSER AND CROSS PLATFORM! Now let me be clear on this, I am not a fan of DRM as I believe as a consumer I have the right to use the content I have paid for in anyway I choose. I’m not suggesting copying and passing on too friends is fairplay but I do feel I should be able to duplicate the media for all the devices in my home. That said, although I am not a fan of DRM personally, I can greet this news with optimism and here is why.

About 18 months ago I was working on a contract for Siemens who were developing the packaging and delivery of the BBC IPlayers content. This was interesting work and really opened my eyes to the amount of effort that must go into launching a platform like the IPlayer. 18 months ago none of us working on the project had any idea as to how successful the IPlayer would be, therefore the application was built with performance and scalability in mind. A good thing too given the way it panned out.

While working on the project, one area I felt was seriously lacking was the cross platform support. All content delivered via the VOD system is encrypted using Windows DRM. As the name suggest, the result that decision was that all content inevitably becomes locked into the windows platform. Therefore unless you’re on a windows platform, the IPlayer would be useless to you.

The BBC were not the only ones to adopt this approach, SKY, ITV and Channel 4 have all built their VOD platforms on the Kontiki P2P system using Windows DRM. So as a guy with a Mac (Yes I run windows vista on it) I could consider myself up shits creek! So the question is, why is this good news? It’s good news as whether we like it or not DRM is essential for large media conglomerate when it comes to delivering their content over the web. Whether we like it or not, I still cannot see them dropping it due to public demand. Therefore, with Silverlight providing the tools necessasary for cross-platform DRM, adaptable streaming and the ability to generate amazing RIA’s there are very little hurdles left to overcome.

I expect to see the BBC move this way as they have previously confirmed that Mac support was on their todo list. Also some of the demo’s from MIX07 with the BBC Radio 1 site delivered via Silverlight show the potential. I am hoping to have a play with the new Silverlight 2 Beta 2 features in the next few weeks so expect some posts then.

Comments (0)

Isle of Wight Festival and my technology addiction!
By David Hanson on Sat, 07 Jun 2008 17:37:29 GMT

I'm off to the Isle of Wight festival this week and as usual I have spent the weekend getting all the essentials together. I've got my tent dusted down, wellies, wet wipes beer and much more ready to go. However I am starting to think that I am a little to addicted. Here is a rundown of the gadgets i'm taking.

  • IPod Touch
  • ITrip
  • Stereo to transmit music from IPod too.
  • Solar Charger
  • Camera
  • Mobile Phone
  • Walkie Talkes
  • Windup torch
  • Smartphone

Something tells me I may need to lock my tent up!

Comments (0)

The power of Silverlight vectors
By David Hanson on Fri, 23 May 2008 10:58:53 GMT

As you probably know the power of WPF and its subset Silverlight is its ability to render images using vector graphics. I am not a graphic designer myself, I can usually get a decent design together but it’s usually more evolutionary rather than revolutionary.

As all images in vector graphics are expressed using mathematics they provide computers with some superior processing capabilities that are not possible with common binary formats. We can transform them, scale them, animate them to name just a few . However, with the advantages of having an image represented in mathematics, we also suffer with increased complexity when trying to create them from scratch.

With the current release of Silverlight, we have the power in the framework to represent near photo realistic images purely in vectors. Take for example the photo of me  shown below, this image, running in Silverlight, has been built using only vectors. You can see this running in Silverlight here.

Bad Mood

If we take a closer look at the structure of the eye, we can see that the complexity of the XAML path objects, which are the basic building blocks used to compose the image, are far beyond the capabilities of any human designer using tools such as Blend or Visual Studio.

The image was actually constructed using the cool site  vectormagic.com. On this site you can upload any photo and it will convert the image to vectors. This covered off the majority of the grunt work of converting the image into vectors.  VectorMagic offer you two free downloads in a range of formats.... but no XAML option. Therefore, I downloaded the file in Adobe Illustrator format, from there it was a simple process of exporting the image into XAML using Mike Swanson’s awesome AI-XAML converter.

Hope this quick example has helped illustrate the power of Silverlight’s graphical capabilities and gets you thinking about what other assets you could convert into XAML.

 

 

 

Comments (0)

.NET 3.5 SP1 & Visual Studio 2008 SP1 Beta released
By David Hanson on Tue, 13 May 2008 08:31:57 GMT

It seems .Net 3.5 SP1 and Visual Studio 2008 SP1 beta are now available from Microsoft for download. This release brings a number of fixes for hundreds of bugs that have been reported by customers.

This download installs Visual Studio 2008 SP1 Beta. Visual Studio 2008 SP1 includes support for SQL Server 2008, new ADO.NET features such as the Entity Framework, improvements to the WPF designers, WCF templates for Silverlight projects, debugger support for the .NET Framework public symbols and source release, control improvements such as the DataRepeater for Windows Forms and Office 2007 Ribbons for C++, and several general updates for debugging and IntelliSense. SP1 also enhances the stability, performance, and security of many features.
 
The included .NET Framework 3.5 Service Pack 1 adds many new features and fixes, including the following:
.NET Framework Client Release (“Arrowhead”)
·         ASP.NET Dynamic Data
·         ASP.NET Routing
·         ADO.NET Data Services
·         ADO.NET Entity Framework

I’m just hoping that it resolves the constant OutOfMemory exceptions I get when working with the WPF designer. You can find the downloads here.

Comments (0)

Oldest running code?
By David Hanson on Mon, 12 May 2008 09:08:03 GMT

Slashdot poses an interesting question asking what is the oldest code still running today. Of the 600+ comments so far I have cherry picked a few that I thought were good choices.

·         The software on the Voyager and Pioneer SpaceCraft 1977
·         Digital watches
·         Heavy machinery used from the late 50’s
·         Babbage Difference Engine (Currently running in the science museum London)
·         Worryingly – Air Traffic controls system code from the 60’s
·         DNA – At least 2 billion years old! J
 
 
But my personal favourite!
 
1 "Let there be light"
2 create universe()
3 while (1)
Comments (0)

Cosmic Crashes
By David Hanson on Tue, 29 Apr 2008 19:51:56 GMT

 

I was catching up on some podcasts during my drive to work recently and came across an interesting topic on the BBC's Digital Planet podcast. The discussion was regarding the “impact” cosmic rays can have on our desktop computers and more importantly very expensive grid platforms such as IBM’s Blue Gene. Computer crashes can be annoyng to the average user but on grid platforms running simulations that require accurate data they can be very costly. During the podcast they had interviewed with an Intel researcher (who's name I have forgotten sorry) who was discussing his strategies for counter acting the effects these highly energetic particles can have.

Before I outline his proposal it’s probably worth explaining some rudimentary physics.
 
What is a cosmic ray?
Answer: A cosmic ray is a particle with mass greater than zero that has been been accelerated to a speed that is approaching the speed of light.
 
How does it get that fast?
Answer: A range of cosmic events can cause this but let’s just say for this blog, a star exploded millions of years ago and that it is this explosion that caused the cosmic ray.
 
I heard that most cosmic rays just pass right through us.. How come?
Answer: Well thanks to Mr Einstein we know that with increased mass comes an exponential increase in energy in order to accelerate the matter towards light speed. Therefore cosmic rays are generally low is mass. As a result, they can pass through the atoms in your body undisturbed. (Well mostly)
 
So how do cosmic rays cause computer crashes?
Answer: Computers processors are based on logic gates which manage the flow of electrons on the processor. When a cosmic ray hits the processor a surge or peak of energy is releases in the form of electrons which can result in the processor providing inaccurate results. (Hence it crashes).
 
So with the details out of the way I can get on to explaining what the Intel researcher was planning to in order to resolve this problem. Basically, his view on cosmic crashes was that it’s going to be almost impossible to stop them from happening,  insulating the processor with cosmic ray impenetrable materials is going to be very hard, very large and expensive. So, instead he proposed that what we should do is build detectors which can identify the surge of electrons associated with a cosmic ray and then instruct the processor to rerun the previous calculation that may have been affected.
 
 I must say... I like his thinking.
Comments (0)

LINQ to Reflection Part 3: Updating Fields
By David Hanson on Mon, 28 Apr 2008 13:30:07 GMT
In part 2 of this LINQ 2 Reflection series I took you through how we go about querying fields that may existing within an object graph. Before we proceed, it’s important to remember that a call to object.Field<T> will return an instance of type Linq.Reflection.Field. As part 2 focused purely the reading fields it’s about time we take a look at how we can go about updating them. If we look at the intellisense that Visual Studio provides for the Field<T> class we can see that this class has an Update<T> method. Shown below.
 
 
Firstly, as the Update<T> method is contextual, there is no requirement to pass the name of the field we wish to update as this can be inferred from its parent. Secondly, As the Field<T> returns a generic class of type T it also allows us to infer the Type of value we wish to update. Below is a simple update statement on a person entity.
 
person
    .Field<string>("_firstName").Update("James")
    .Field<string>("_lastName").Update("Brown")
    .Field<DateTime>("_dateOfBirth").Update(DOB);
 
The Update<T> method of the Field<T> class returns an instance of the parent object we are currently working with. Internally the Field<T> class passes the parent context down our chained methods. Therefore we have the ability to move up the object graph if so desired. In this situation, where we are updating 1 of many fields on the parent context, its important that the return value from Update<T> is that of the parent object.
 

As that’s pretty much it for updating fields using LINQ to Reflection. You can call the Update<T> on and Field<T> or Property<T> accessor. As this point in our series you have the information you need to drill down any object reading and writing property/field values to suit your tests scenarios.  

In part 4 we will start looking at how we can leverage the power of these extensions methods by showing how we can mock internal objects without breaking the rules of encapsulation.

Comments (0)

LINQ to Reflection Part 2: Reading Fields
By David Hanson on Fri, 25 Apr 2008 11:34:23 GMT
In part 1 of my LINQ to Reflection series I outlined some of the key drivers behind me creating a set of extension methods that can be used to query any CLR type. I also outlined that I am looking to extend this further with support for reading/writing of data, mocking, invocation, interception and other useful behaviours.  This post is purely focused on the reading of field data using the LINQ to Reflection extension methods.  
 
Before we get into the details of how we query data, we first need to create some tests data that will be used for each sample. Below is a method that is used to build object graph that is comprised simple and complex types with multiple child objects.  Note: We are already starting to use our LINQ to Reflection methods in order to create tests data.
 
        ///<summary>
        /// Sets up an object graph for our different test scenarios.
        ///</summary>
        public static Person GetTestData()
        {
            Person person = new Person();
            return FillPerson(person,3, 4);
        }
 
        ///<summary>
        /// Fills the person with test data.
        ///</summary>
        ///<param name="person">The person.</param>
        ///<param name="levelsDeep">
Comments (1) More...

WPF: Could not create an instance of type '{0}'
By David Hanson on Fri, 25 Apr 2008 09:10:57 GMT

If you get this error in your designer when working with XAML in Visual Studio 2008...make sure you dont have any visual elements that inherit from an abstract class.  May seem obvious but can be easily missed.

Could not create an instance of type '{0}'

Comments (1)

Print