Sunday, 31 August 2008

Silverlight Spectrum Emulator

UPDATE: Latest version is here:

So I've just finished version 1.0 of my Silverlight spectrum emulator.

At the moment there is no keyboard interaction, or ability to load games (it is currently only running KLAX), but it proves Silverlight can emulate a spectrum

I will figure out this side of things so that a fully fledged emulator will work in time.

I will put up the code at some point to CodePlex. I used the ZX360 project on codeplex as my base code. Thanks to them for posting their code, and thanks to Joe Stegman for his blog article on Dynamic Image Generation (which allowed me to figure the final bits).

I also have a WPF version which I will post at some point. Emulator can be viewed at

More versions and details to follow but enjoy for just now.

Tuesday, 26 August 2008

I Love ADO.NET Entity Framework

I have been building a new application / website in my spare time(more details in the future), and I am using it as a bit of a testing ground for playing with technologies I want to play with.

Unfortunately in my day job we are not using ADO.NET Entity Framework, so this application has been a perfect chance to play with it.

I have to say is my initial thoughts, is that I love it :)

There are some very cool aspects to this technology that I love and there are somethings that I think it would be great if they could support, but so far I love it.

The good news is that the things I don’t like about it and wish they would implement seem to already been in the plan for version 2.0.  I can’t really say fairer than that :)

I will post a little bit later more of the cool things I am really loving about it (and not liking also)

Monday, 25 August 2008

ASP.NET Silverlight (A Vision - Part 2 - Validators)

So in my last article, I outlined my vision (own personal opinion, not any inside knowledge) of where I think ASP.NET might be heading.

In this article I discuss how existing controls (validators in particular) could be modified to support Silverlight.

ASP.NET Existing Validators

ASP.NET at the moment has a bunch of standard validators

  • RequiredFieldValidator
  • CompareValidator
  • RegularExpressionValidator
  • CustomValidator
  • etc.

All these validators support the ability to validate both server side and clientside.  If clientside validation is selected some javascript will be injected onto your page to perform the validation.

Silverlight Validation

In the future I can see this being extended to support Silverlight validation.  If the validator is configured to support Silverlight Validation and ASP.NET detects your browser supports Silverlight then it will use Silverlight rather than Javascript to perform client side validation.  If your browser doesn't support Silverlight it could revert back to Javascript.

This would be especially cool with the Validation Summary control which doesn't really work well in ASP.NET as is.

The controls could also support templating so you could use your own XAML for the validation.

Custom Validation

The power of a Silverlight custom validator would be immense, you could write a C# validation routine and have that perform client side.  This would bring much more power to validation rather than doing simple regular expressions, or complex Javascript.

For example you could right a client side custom validator which performs a dictionary check against a dictionary web service.


This would mean that you could start to setup your existing websites to use the power of Silverlight without necessarily building an entire website in Silverlight.  This would also be a very cool addition to the capabilities of the ASP.NET Framework.

In my next article I will discuss where else this sort of technique could go.

ASP.NET Silverlight (A vision - Part 1)

At the moment ASP.NET and Silverlight are two different sets of technology.  If you want to build an ASP.NET application you would use an ASP.NET Project, if you want to build a Silverlight application you would use a Silverlight project and integrate with ASP.NET.


Silverlight could fit in really well with ASP.NET (but currently doesn't).  However in ASP.NET 3.5 this started to change.  There are now 2 Silverlight based ASP.NET controls which you can drop onto your regular Web Form (Silverlight and Media Player).

ASP.NET The Future (my guess)

If I were to take a punt into the ASP.NET Silverlight future this is where I would guess the ASP.NET framework is going (p.s. I have no actual insight into this, I am just taking a guess).  Slowly but surely I reckon more and more Silverlight based ASP.NET controls will be made available to drop into your designer.

A real easy guess is that a Deep Zoom control will become a standard control on the ASP.NET designer.  There is no reason that you couldn't start to develop such controls yourself (and I encourage you to do so), however I think/hope that one day they will be made available as standard controls.

Next Articles

So in my next article I will discuss in more details where else I think ASP.NET will change to accommodate Silverlight (including modifications to existing controls) not just new ones.

Friday, 22 August 2008

JR Screen Ruler

This is a seriously cool little utility.

A simple online ruler which allows you to measure pixels on a screen.  Very handy when developing Web applications and you want to keep within tight space constraints.

I’ve joined Facebook

I am an early adopter in many areas, unfortunately Facebook is not one of those areas.

I’ve decided to join Facebook so if you want to connect with me that would be very cool (link is below):

This is probably a good way of connecting especially if you are interested in Silverlight or heading to the PDC etc..

Wednesday, 20 August 2008

I love extension methods

Sometimes a feature can just help you out so much.

I have an existing .NET Framework 2.0 assembly which I don’t want to convert to a .NET Framework 3.5 assembly.  It would have ramifications on other projects / deployments.

However I have a .NET Framework 3.5 assembly which uses the .NET Framework 2.0 assembly where i need to use XElement off that class (ok I don’t need to but I want too).

I don’t particularly want to create a new class which inherits the old class, gets messy.  However by just simply creating an extension method for the original class from my .NET Framework 3.5 assembly, the whole issue goes away.

I can use my XElement based method in my .NET Framework 3.5 assembly and continue to use the existing object.  :)

One day when the original assembly is moved to .NET Framework 3.5 we can move this method to its rightful home but for just now job done :)



Behind on blog posts

I’m massively behind on blog posts.  I think I have around 40 things I want to blog about.

Unfortunately time is more of a critical factor.

I’m currently preparing 2 presentations + a new application + an event (very hush hush) + user group + my day job + my home life .

I’m glad I’m on holiday next month, kick back read some Daredevil + Spider-Man (notice the hyphen).

Anyways, I will try and step up the blogging.

Wednesday, 6 August 2008

Going to the PDC

Just confirmed, I’m off to the PDC this year :)

This will be my second PDC, my first PDC was in 2003.

So Excited

Sunday, 3 August 2008

NxtGenUG Silverlight Manic Miner

So my buddy Richard Costall and Pete McGann have just released their version of Silverlight Manic Miner.

I've been wasting so much precious time playing this very cool game.  I just totally love it.  It plays exactly the same as the original.

Go check it out:

Abstract below:
NxtGenUG Co-Founder Richard Costall & Member Pete McGann are pleased to announce their “Silverlight” Manic Miner game Beta is now live on the NxtGenUG site. Manic Miner was originally written by Matthew Smith, under games company Bug-Byte in 1983. The game was a landmark title in the history of gaming.

The original classic features 20 caverns to negotiate, and Pete and Rich had lovingly created 9 of these so far, with more to follow shortly.

Silverlight Manic Miner shares a custom built ‘time based’ engine with an XNA version of the game. A library of c# files is shared between the two systems. The Silverlight edition is also integrated into the NxtGenuG site, through Application services, and registered visitors can have their high scores recorded and shown in a leader board which refreshes every 60 seconds.
Pete and Rich will be telling their story at NxtGenUG Coventry on August  11th 2008

Silverlight, XNA and Gaming
Matthew Smith did it in 6 weeks in the early 80's, now over 20 years later Pete McGann and Richard Costall have built Manic Miner in .NET, with an engine which works for Silverlight and also XNA. In this session Pete and Rich, talk about the .NET engine, implementations and issues on the two platforms - before Pete steps up to take the ultimate gaming challenge...

Friday, 1 August 2008

Presenting at SQLBits

I got confirmation this morning that my session has been voted in for SQLBits

Thanks to everyone for voting it in :)

I guess I’ve got some work to do now

Useful Sql'y stuff that I've picked up over the years


“This session is for your average .NET Developer who does SQL rather than those who are dedicated SQL Developers (that's not to say you won't pick up interesting tips). This is some of the stuff that I have learned over the years which you might find useful. This session is completely from a .NET developers perspective and the things that have helped me out when working with SQL Server. We will be looking at T-SQL, parts of the SQL Server Toolset, SQL Server commands etc. Hopefully by the end of this session you will come away with some useful stuff that you will be able to use in your day to day life. I will try and skip theory and best practice, and go with loose observations as much as possible.”