 |
|
 |
|
|
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...
|
|
|
|
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.
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)
|
|
|
|
|
|
|
|
|
|
|
 |
|
 |
|
Twitter / LordHanson
Published Sun, 04 Jul 2010 22:07:55 +0000
by
Published Sun, 04 Jul 2010 22:05:28 +0000
by
Published Fri, 25 Jun 2010 23:01:45 +0000
by
Published Fri, 25 Jun 2010 22:54:54 +0000
by
Published Mon, 14 Jun 2010 05:08:43 +0000
by
Published Mon, 14 Jun 2010 00:04:45 +0000
by
Published Sun, 25 Apr 2010 04:39:48 +0000
by
Published Wed, 10 Mar 2010 10:29:19 +0000
by
Published Mon, 22 Feb 2010 12:31:09 +0000
by
Published Thu, 18 Feb 2010 08:13:10 +0000
by
Published Tue, 26 Jan 2010 17:48:49 +0000
by
Published Fri, 22 Jan 2010 08:14:36 +0000
by
Published Tue, 19 Jan 2010 17:35:43 +0000
by
Published Sun, 17 Jan 2010 19:01:29 +0000
by
Published Sat, 16 Jan 2010 16:38:58 +0000
by
Published Sat, 16 Jan 2010 16:34:00 +0000
by
Published Fri, 15 Jan 2010 18:55:38 +0000
by
Published Fri, 15 Jan 2010 08:28:47 +0000
by
Published Tue, 12 Jan 2010 15:28:29 +0000
by
Published Sun, 10 Jan 2010 21:49:44 +0000
by
|
|
|
|
|
|
|
|
|
 |
|
 |
|
Silverlight - Google News
Published Thu, 29 Jul 2010 23:21:01 GMT+00:00
by
Published Tue, 06 Jul 2010 18:54:39 GMT+00:00
by
Published Mon, 26 Jul 2010 20:32:23 GMT+00:00
by
Published Fri, 30 Jul 2010 13:13:57 GMT+00:00
by
Published Fri, 30 Jul 2010 14:19:22 GMT+00:00
by
Published Fri, 30 Jul 2010 08:50:54 GMT+00:00
by
Published Thu, 29 Jul 2010 09:36:57 GMT+00:00
by
Published Mon, 26 Jul 2010 11:56:30 GMT+00:00
by
Published Tue, 27 Jul 2010 20:28:37 GMT+00:00
by
Published Tue, 27 Jul 2010 12:39:37 GMT+00:00
by
|
|
|
|
|
|
|
|
|