Wednesday, March 10, 2010
 
   
 
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. 

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.

Decompiling Silverlight Apps
By David Hanson on Sat, 29 Mar 2008 20:48:08 GMT

Did you know you can decompile Silverlight apps? As with ever other .NET app, if you have the assemblies you can pretty much load them into reflector and view the source.

So when it comes to silverlight how do you get the assemblies in the first place? Well it turns out when you develop your app all the assemblies are packages into a XAP file which is then downloaded to the client.

An XAP is actually just a zip file with a different extension. Therefore, all you need to do is the following.

1.) Locate the XAP file on a web page or file system by looking at the source.

2.) Place into the browser and download the XAP package.

3.) Once downloaded, change the XAP extension to .ZIP

4.) Extract the package using whichever tool you like. I use WINRAR.

5.) Locate the assemblies in reflector and view the source.

Comments (0)

Multiple Browser Compatibility
By David Hanson on Mon, 24 Mar 2008 17:40:49 GMT

Rockford has an interesting post about a website called http://browsershots.org. The idea is, you submit a url and they will check how your website renders in 45+ browsers on multiple operating systems and provide screenshots for you to download. They also do some cool javascript testing as well.

Below is an a screenshot of the initial results page for the home page of my site.

And here is what my site looks like in Opera running on linux. V.cool.

 

Comments (0)

WPF Easter Egg
By David Hanson on Mon, 24 Mar 2008 09:47:02 GMT

Ok I'm sure you were hoping I was going to announce something cool like the hidden flight simulator in excel.

Sorry, here is some XAML instead.

 Windowless Easter Egg

<Window x:Class="WindowlessForms.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="400" Width="600" WindowStyle="None"
        AllowsTransparency="True" Background="Transparent" WindowStartupLocation="CenterScreen">
    <Border>
        <Ellipse Stroke="Black">
            <Ellipse.Fill>
                <
Comments (2) More...

Robotics gone wrong
By David Hanson on Thu, 20 Mar 2008 20:42:05 GMT

Something has definately gone wrong here.... A quick browse for robots on the web turns up a robot trying to be human and a human trying to be a robot.

Robot Albert Hubo
Robot Albert Hubo

Robot Dance
Robot Dance

Comments (0)

Web 3.0 and search engines
By David Hanson on Thu, 20 Mar 2008 10:01:31 GMT

Take the following statement.

Googlebot processes each of the pages it crawls in order to compile a massive index of all the words it sees and their location on each page. In addition, we process information included in key content tags and attributes, such as Title tags and ALT attributes. Googlebot can process many, but not all, content types. For example, we cannot process the content of most Flash files or dynamic pages.

You can find this text in the google indexing FAQ site here. What I find compelling about this statement is that of the last line..

we cannot process the content of most Flash files or dynamic pages.

This raises an interesting question with regard to the future of search engines as we enter the web 3.0 era. As HTML has slowely reached the limits of what it can offer, we are starting to see the rise of new rich/smart client style applications based on technolgies such as silverlight, Flex and Flash.

Tim Berners-Lee has predicted that web 3.0 could possibly be based on vector graphics platforms. These technologies offer rich vector graphics with runtime libraires that are delivered direct to the desktop. With these runtimes comes the use of custom binary formats that allow code to be run within the browser and peform functions that standard HTML/Ajax apps would dream of. 

So with the winds of change coming....how will search engines continue to perform effective indexing of site content when its delivered in custom binary formats?

  • Will we see new standards defined that will be specifically used for the publication & management of site content for indexing?
  • Will search engines implement new techniques for indexing binary files?
  • Will our Web 3.0 apps always require HTML equivalents for supporting search providers?

I dont know the answers to these questions yet but I am looking forward to seeing how it pans out.

Comments (0)

User Agents for February
By David Hanson on Wed, 19 Mar 2008 19:28:58 GMT

Looking through my logs I decided to compose a list of useragents/browsers visiting my site during feb.  I was amazed to see that there were still people using  IE2 out there! I mean.... really???

These results are shown below.

Netscape Navigator 6+
Internet Explorer
Internet Explorer 6
Netscape Navigator 4
Internet Explorer 5
Internet Explorer 4
WebAlta Crawler/2.0 (
http://www.webalta.net/ru/about_webmaster.html) (Windows; U; Windows NT 5.1; ru-RU)
MSNBOT
msnbot/1.1 (+http://search.msn.com/msnbot.htm)
Internet Explorer 2
Feedfetcher-Google; (+http://www.google.com/feedfetcher.html; 3 subscribers; feed-id=10707310861055891819)
Feedfetcher-Google; (+http://www.google.com/feedfetcher.html; 2 subscribers; feed-id=10707310861055891819)
ia_archiver
Netscape Navigator 3
BlogPulse (ISSpider-3.0)
BlogPulseLive (
support@blogpulse.com)
EnaBot/1.2 (
http://www.enaball.com/crawler.html)
freedir.co.uk/0.8 (+http://freedir.co.uk/directory/)
Opera/8.00 (Windows NT 5.1; U; en)
NewsGatorOnline/2.0 (
http://www.newsgator.com; 1 subscribers)
Opera/9.0 (Windows NT 5.1; U; en)
Opera/9.00 (Windows NT 5.1; U; en)
Opera/9.26 (Windows NT 6.0; U; en)
psbot/0.1 (+http://www.picsearch.com/bot.html)
SurveyBot/2.3 (Whois Source)
Technoratibot/0.7
Tgulhz enqb iwgovpdqc
Wkivtc bnfswe wvdu
Pxmtonqhj szftv djhiesuc
Opera/9.50 (Windows NT 5.0; U; pt-br)
Opera/9.00 (Windows NT 5.1; U; ru)
Opera/9.23 (Windows NT 5.1; U; en)
Opera/9.24 (Windows NT 5.1; U; en)
Opera/9.26 (Windows NT 5.1; U; cs)
Opera/7.50 (X11; Linux i686; U) [en]
Opera/8.0 (Macintosh; PPC Mac OS X; U; en)
Opera/8.01 (Windows NT 5.1)
Internet Explorer 3
Ajuqwt tdmy djrpagf
Java/1.6.0_02
Jyxgil mryhla ugxwa
Lwizpcxo mgvx lsxa

Comments (0)

FUN: Easters coming
By David Hanson on Mon, 17 Mar 2008 20:50:07 GMT

Looking through my emails I found a few easter related jokes bouncing around. This one particulary made me laugh so thought I would share.

Comments (0)

Silverlight 2 Control Template Browser Source Code
By David Hanson on Mon, 17 Mar 2008 20:30:07 GMT

Just been snowboarding in Austria for the last few days. Had some great snow and a litte stiff today. I just wanted to blog quickly to tell you that you can now download the source code for the Silverlight 2 Control Template browser. Please note, this version currently uses an embedded XML file to render each template. I am working on updating this to use a XAMLWriter implementation but this is still a work in progress.

Download

Comments (0)

Silverlight on the go.... Nokia gets the Jump
By David Hanson on Tue, 04 Mar 2008 12:50:50 GMT

Well it seems one of the big annoucments that was due to be made at Mix 08 is that Silverlight is coming to mobile devices and more importantly... Nokia handsets.

There is apparently going to be a demo of an S60 device running Silverlight mobile edition which I can wait to see!  Will post more when it arrives!

The Nokia s60

Comments (0)

WPF: Extending the Page & UserControl base classes
By David Hanson on Mon, 25 Feb 2008 22:50:15 GMT

When working with different .NET technologies it is often good practice to extend a number of bases classes for your own requirements.  There are couple of benefits for doing this.

  •  The derived classes provide a layer of protection/abstraction from the core framework so that changes can be managed more effectively. 
  • The derived classes provide the ability for you to extend base behaviour and share that throughout your application. 
  • You can increase testability.

Generally, when starting a new development, I like to do some of this infrastructure work upfront, this saves me a lot of refactoring down the line when I realise I need to extend a base class. Following this approach is particularly useful when working with .NET UI technologies such as WinForms, ASP.NET and WPF which implement a number of base classes upon which the majority of UI components are based. 

Below is an example of the standard WinForms model whereby each Form is derived from System.Windows.Forms.Form versus the model I implement when I intend to extend the base Form class.

 

FormEx implementation

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
 
namespace Extended.Base.Example
{
    public class FormEx: Form
    {
    }

}

Our StandardForm implementation

using System;
Comments (0) More...

WPF Ribbonbar and more coming in 2008!
By David Hanson on Thu, 21 Feb 2008 12:32:42 GMT

Scott Gu has shed some light on some of the changes coming to WPF this year. Notably, Scott inidcates that there will be new contols for WPF, one of which is a new a "Ribbon" control. I have thought that for a while that Microsoft needed to get this control to market as the Office 2007 styling has become quite popular.

There are a number of vendors that do offer a WPF ribbon these are shown below.

Also it seems more graphic intensive features such as shadowing etc are being pushed onto the graphics hardware increasing performance. V.cool!

Comments (0)

Silverlight 2.0! Cant wait!
By David Hanson on Mon, 18 Feb 2008 13:44:39 GMT

I have just finished listening to Scott Gu's comments on Silverlight 2.0. From what he is saying 2.0 should finally offer the level of functionality to truly make Silverlight a compelling option.

Just to summarise....Silverlight 2.0 will get the following.

  • Large suite of controls for developing LOB style applications
  • Databinding support
  • Styling and control templating
  • Flowlayout support
  • WCF Communications stack support

Good news!

Comments (0)

Alt.NET Seattle
By David Hanson on Fri, 15 Feb 2008 10:24:49 GMT

Having attended the Alt.net UK conference a few weeks ago I am disappointed by the fact that I cannot make the US event. There's going to be some great people there and the chance to discuss topics with them would have been great.

I am making sense of my decision using the following.

  • Its expensive to head over to the US just for a conference.
  • I am  getting married this year and need to save some money.
  • The "Mrs" gets jealous and thinks its a holiday.
  • There will be other events.

With that I rest my case.

Comments (0)

Random muttering: Visualising Test Coverage
By David Hanson on Mon, 18 Feb 2008 19:56:16 GMT

Ok, this one will is going to sound a little odd but bare with me. The other day I received a call from a friend who I used to work with. He’s now moved on to a new company and is responsible for managing a team of developers who have been focused on developing internal systems.  

Upon starting with the company, the IT director had expressed his concerns that the development teams were generally gun ho about configuration management and that on many occasions critical systems had been down for extended periods. Basically, my friends role is to get a grip with these kind of issues and improve the overall quality and professionalism of the team.

He told me that the systems had been written in .net 1.1 and very little progress had been in terms of migrating them to 2.0 and definately no 3.5. Another key issue he had identified was that the application had absolutely no code coverage and therefore developers were unaware of what impact their changes could have to the behaviour of the applications. I think more to the point, as we discussed the environment, it became apparent that the majority of developers had very little understanding TDD and the benefits it can bring to your project.  

Given the environment, my friend and I discussed a number of options that he could take forward in terms of educating the team in the ways of TDD and primarily some way of obtaining some level of test coverage of the application code. It was the later thread that sparked an interesting conversation about conceptualising a test and how you can get increase coverage from a small number of tests. He had explained that the architecture was fairly standard with a complex model that uses fine-grained interfaces for business entities wrapped up with a coarse-grained interface that is exposed to the UI.

 

Discussing the split between UI code and service/business code it seemed there was approximately 30/70 split. Therefore, we both felt the best place to start would be at the service contract layer. The service contract provides a single point of access into a complex system. This is a very key point, what it essentially means is that by using the service contract and multiple data scenarios we can cover large portions of code within the complex model. To help developers visualise this concept, we talked through a few analogies that would fit.  Below are 3 visualisations of this.

Lightning Forks

Ants nest paths

Tree root system

As you can see, each of these images can be used to visualise the many branches of code that could possibly be taken from the top down entry point. Exploring these different paths takes a multitude of data scenarios. Each data scenario being passed into the top level entry point results in decisions being made on that data at each ...

Comments (0) More...

Visual Studio Xmas tree settings
By David Hanson on Fri, 08 Feb 2008 15:55:53 GMT

Most developers spend the majority of their day with their head stuck inside visual studio,  I’m no different, so as a result I like to customize my editor so that I am as comfortable as possible.  Its in this area i’m a little old fashioned. I can’t stand the default white colour settings that visual studio offers, therefore I spend quite some time tuning them so they meet my needs.  Below is an example my code windows in visual studio. I really like these settings and I feel it makes the code far more readable and items such as strings, numbers, operators, keywords and regions are all specifically coded.

Many of my colleagues have commented that my settings make my code window look like a Christmas tree. So if your feeling like you want to be a little festive then you can grab them here.

Comments (0)

Print  
Tweets Minimize
Twitter / LordHanson
  1. LordHanson: Ok so I need to stay techie while away from a computer for a year. Anyone got any ideas.

    Published Mon, 22 Feb 2010 12:31:09 +0000 by
  2. LordHanson: Sitting in YHA Glebe Sydney waiting for the movie night to start

    Published Thu, 18 Feb 2010 08:13:10 +0000 by
  3. LordHanson: Madness today. We only booked our return tickets to bangkok on the wrong day! Luckily we managed to change them!

    Published Wed, 10 Feb 2010 15:54:37 +0000 by
  4. LordHanson: HTML5 the future? http://bit.ly/6yf9Bu

    Published Tue, 09 Feb 2010 13:43:48 +0000 by
  5. LordHanson: Last night in Bangkok! Good fun!

    Published Thu, 04 Feb 2010 18:09:38 +0000 by
  6. LordHanson: @trampussandal Dad? lol

    Published Thu, 04 Feb 2010 05:26:39 +0000 by
  7. LordHanson: Im sitting in a coffee shop in my home town of epsom thinking... Man the day has finally arrived. I can feel the stress lifting.

    Published Mon, 01 Feb 2010 09:05:13 +0000 by
  8. LordHanson: So what excuse will apple use to not allow flash or silverlight to run on the ipad this time I wonder.

    Published Fri, 29 Jan 2010 19:07:46 +0000 by
  9. LordHanson: Yay just manage to upgrade from vista ultimate to windows 7 enterprise by using the registry hack trick. No reinstalls.

    Published Wed, 27 Jan 2010 07:18:07 +0000 by
  10. LordHanson: @swhelband Sure am...http://bit.ly/aZ6Xvd

    Published Tue, 26 Jan 2010 19:05:18 +0000 by
  11. LordHanson: I finished work today in prep for travelling. I must admit as i left the office i felt a little emotional. Sign of a good job with great ...

    Published Tue, 26 Jan 2010 17:48:49 +0000 by
  12. LordHanson: So, today is my last day of work before i leave for australia. And it just happens to fall on australia day too. How very cool.

    Published Tue, 26 Jan 2010 08:51:42 +0000 by
  13. LordHanson: Well woke up at dads this morning. Didn't sleep too bad considering.

    Published Sun, 24 Jan 2010 10:08:25 +0000 by
  14. LordHanson: RT @BillGates: My new website is live check out www.thegatesnotes.com. Excited to share more about what I’m learning, hope you like it!

    Published Fri, 22 Jan 2010 14:11:24 +0000 by
  15. LordHanson: @DJTravelling need to watch out of people carrying illness over the next week. They are everywhere!

    Published Fri, 22 Jan 2010 08:22:24 +0000 by
  16. LordHanson: Lots of sick sounding people creeping onto the trains today. Stay away stay away!

    Published Fri, 22 Jan 2010 08:14:36 +0000 by
  17. LordHanson: @RoyOsherove come back to the conchango offices for some real fusball competition!

    Published Thu, 21 Jan 2010 22:49:34 +0000 by
  18. LordHanson: RT @connectifyme: #Connectify Blog: Announcing Connectify v1.1! http://bit.ly/5og7vI

    Published Wed, 20 Jan 2010 16:31:48 +0000 by
  19. LordHanson: LMAO RT @colmbrophy: so have you seen who owns http://wwwbing.com ? it's not microsoft

    Published Tue, 19 Jan 2010 17:35:43 +0000 by
  20. LordHanson: @HowardvRooijen What you buy?

    Published Mon, 18 Jan 2010 21:16:27 +0000 by
Print  
Archive Minimize
Print  
Contact me Minimize
Print  
Microsoft Certs Minimize







Print  
Silverlight News Minimize
Silverlight - Google News
  1. MSN decides to keep its makeover - CNET

    Published Tue, 09 Mar 2010 17:00:15 GMT+00:00 by
  2. Small Basic 0.8 and Silverlight - Softpedia

    Published Tue, 09 Mar 2010 11:59:10 GMT+00:00 by
  3. Windows Phone 7 to support .NET, Silverlight, XNA - Seattle Post Intelligencer (blog)

    Published Fri, 05 Mar 2010 02:23:29 GMT+00:00 by
  4. Flash on Microsoft's Windows Phone 7 Series - Digit

    Published Wed, 10 Mar 2010 08:03:59 GMT+00:00 by
  5. SEO Tips For Microsoft Silverlight - Mediapost.com

    Published Mon, 08 Mar 2010 20:26:37 GMT+00:00 by
  6. Microsoft banks Windows Phone 7 on Silverlight - Register

    Published Thu, 18 Feb 2010 06:02:11 GMT+00:00 by
  7. Adobe, Microsoft Spar Over Flash, Silverlight, HTML5 - InformationWeek

    Published Fri, 05 Mar 2010 21:48:08 GMT+00:00 by
  8. Windows Mobile 7 makes a clean break - Geek WIth Laptop

    Published Tue, 09 Mar 2010 15:29:56 GMT+00:00 by
  9. Android Could Soothe Microsoft's Silverlight Itch - AndroidGuys (blog)

    Published Sat, 06 Mar 2010 14:41:12 GMT+00:00 by
  10. Apprenda Announces Additions to Saasgrid - TMCnet

    Published Tue, 09 Mar 2010 20:21:16 GMT+00:00 by
Print