Tuesday 28 April 2009

Silverlight: Toronto Code Camp Slides + Samples

A big thanks to everyone who came to my session on Silverlight Communication at Toronto Code Camp.

Also a big mega thanks to everyone I met, and everyone involved in the organization.  What a great event.

My slides are available here and my samples are available here

Sunday 19 April 2009

Silverlight: Multiple Http Requests Screencast

It's important to remember that Silverlight is a browser technology and is therefore subject to the limits imposed by the browser.

This is especially true in the networking stack and Silverlight is limited to the number of connections it can make just as the browser is.

I show you this is the case in my latest screencast, Multiple Http Requests in Silverlight

The video is embedded below for you to view also:


Saturday 18 April 2009

Silverlight: Who cares if Binary Encoding is not interoperable?

I know the title of this post is a little tongue in cheek but actually who cares?

Just to put this in context in SL3, Microsoft have added support for binary encoding of soap messages for communication between Silverlight 3 applications and WCF Services.

Binary encoding means that the server can process messages faster, meaning higher throughput and the ability to handle more clients than the SL2 text encoding for SOAP.

The downside that the binary encoding is a proprietary Microsoft format (not MTOM), infact its the same one used by NetTCPBinding.

Since performance doesn't seem to be worse than text encoding in any situation, Microsoft have made this the default encoding for building Silverlight enabled WCF Services.

Does it matter if the default encoding is not interoperable?  No, because you can always set it back to a text encoding if you need interoperability.

Also, Silverlight by default does not encourage interoperability.  To allow other browser clients to connect to your webservice you need to set you cross domain policy file.  By default cross domain browser clients are shut out.

Finally if you are building a truly public interoperable api, you probably wouldn't make it SOAP based anyways, you would be likely to build a REST api

Good Move Microsoft, Binary Encoding Rocks!

I wish I was at WebDD

I have to admit, I wish I was at WebDD as an attendee or a speaker.

I decided not to submit a session (not because I didn't want to), but because I am working on my session for Toronto next week, which is the same reason I can't attend.

Looks like it was a cracking day, lots of webby things.

Thursday 16 April 2009

Silverlight: Toronto Code Camp Session

I guess I’m getting a little excited about going to Toronto Code Camp next week.

At the same time, things are hectic, lots of preparation to do :)

I am presenting a session on Silverlight 3 Communication. Funnily enough although the title suggests that I will be focusing on the new Silverlight 3 WCF Features (which I will be), this is not the complete story.

In order to truly understand the improvements made to networking in Silverlight 3, you need to understand the networking stack as it relates to Silverlight, the design decisions made and the effects these decisions have on the Silverlight 2 networking story, and how some of these things have been resolved in Silverlight 3.

Finally having this understanding allows you to build better applications, allows you to design the right system, and to understand why you hit certain walls and how to get around them.

Since this stack is at the heart of all Silverlight networking, this means that if you are using technology such as .NET RIA Services, or ADO.NET Data Services for Silverlight, these core fundamentals ring true.

So as much as I cover the new features of SL3, more of the focus will be on the underlying networking stack and allowing you to understand the fundamentals. So this will help you both in Silverlight 2, Silverlight 3, and Silverlight of the Future.

Anyways, I’ve had a lot of fun building this presentation, and I hope you will enjoy the session at code camp.

I also plan to bring this session to the UK in June for NxtGenUG Fest09 :)

Hope to see you there

Monday 13 April 2009

I'm a PC (thankfully)

This Easter bank holiday weekend, I decided I wanted to learn some new stuff.  So since I have been sporting my new IPhone for the last few weeks, I thought learning how to develop on the IPhone would be cool.

So I have borrowed my mates MacPowerbook Pro, and I picked some books on IPhone development and Objective-C.

I haven't developed any IPhone apps yet, as I thought I would concentrate on the Objective-C language, which I feel I have a good grip of now.

So later today, I will attempt to create my first IPhone application, however I just want to say one thing.  I am a PC (and thank God I am).

Using XCode, and Objective C is like taking a step back 7/8 years.  I so much prefer Visual Studio over XCode and I so much prefer C# over Objective-C.

Don't get me wrong I can see the influences of other languages (such as Objective-C) that have shaped C#, and I can see features in Objective-C that are now coming to C# or that I would love to see in C#, but I have to say I prefer C# and the .NET Framework.  I will probably expand up on this in future posts.

The one thing I want to say about Objective-C is that it is a little weird having to go back to explicit memory management (it really is like stepping in a time machine).  However at the same time it feels kind of nice, going back to the core (just not sure I would want to do this everyday).  I can easily see that with Mac Development most of your time will be spent thinking about Memory Management (which is just something we don't worry about so much these days).

Anyways, no matter what, after spending the weekend with Objective-C, I feel like a better developer but boy it makes me a appreciate Visual Studio, C# and the .NET Framework

Silverlight: Toronto Code Camp

I'm pleased to say that I will be presenting at Toronto Code Camp in a few weeks time.

I will be doing a session on Silverlight 3 communication, covering lots of WCF stuff, Local Messaging and the new networking api used for Out of Browser.

I'm really looking forward to my first trip to Canada and meeting lots of cool people.

I hope to see you there.

Friday 10 April 2009

Enabling Hardware Virtualization on a Sony Laptop

This post is important to me as this was a real pain for me.

So virtualization is increasingly important today, and today I was needing to run a VM, and it turned out the VM was running a little slower than I was expecting.  This is because my laptop didn't have Virtualization enabled on the bios.

This is normally very simple, just go to your bios settings on bootup and enable it, however I own a Sony.  I love Sony Vaio's however you can't switch on hardware virtualization easily.

In the end I had to hack the bios (very scary).

To do this I created a boot disk on a usb stick (another painful thing), and then run the following tool from dos

symcmos.exe -L

I then opened the literal.txt file and changed register 0285 from 0000 to 0001 (using Edit in dos). 

I then ran

symcmos.exe -v2 -uliteral.txt

This register is specific to my laptop with BIOS (R2090J8) so unless you have the same bios it won't work.

I then powered off my laptop, and hardware virtualization was enabled.

The following posts were very useful to me:

http://www.linuxformat.gr/?q=content/how-unlock-and-enable-hardware-accelerated-virtualization-technology-vt-sony-vaio-laptop-and

http://forum.notebookreview.com/showthread.php?t=189228&page=14

If you have the same problem there is a lot to do, and it's very scary but it's worth it.  Don't follow my instructions literally as it might fry your laptop, and I'm not responsible for that.

Read the posts, and then decide to do what is best for you

Tuesday 7 April 2009

Silverlight: DDD Belfast Silverlight 3 talk

A big thanks to everyone who came to my session at DDD Belfast on Silverlight 3 at the weekend.

I really enjoyed presenting in Belfast and I had a great a time all round, and glad that it went so well.  In the end I pretty much covered nearly every new feature of SL3 (which was a challenge).  I worked out that it took me about 80-100 hours to prepare that presentation.  So I think I will now take a few evenings off this week to relax.

The slides are available here:

http://cid-f6bb92b5df4cfec0.skydrive.live.com/browse.aspx/Public/Speaking/SL3Peek

A big thanks to Barry, Martha, Craig, Phil and everyone else I have missed out for putting together a great day.

Monday 6 April 2009

Silverlight: Screencast: Silverlight 3 Derived Styles

In this short screencast, I show you how to quickly get started with style inheritance in Silverlight 3.

You can download the video from here, or watch below

Thursday 2 April 2009

Demo Gremlins

So everytime I build a new presentation, I try and find an unsuspecting audience to try it out on before I present it for real.

I have a brand new presentation on Silverlight 3 in Belfast, and today I did my dummy run in Cambridge for a company that I work with.  They are a very forgiving audience :)

So I got really great feedback and it went really well (even though I was still changing things last night).  However the demo gods did strike on more than one occasion.  As I said they are very forgiving.

Again this proved how useful this strategy is, and on Saturday I will put the appropriate steps in place to stop the demo gremlins.

Just in case you are wondering Visual Studio 2008 and the Web Development Server kept locking up.  In the end I went for an open browser, building and refreshing (rather than clicking the play button).  This seemed to please the demo gods more.

I also discovered that doing a demo on network addresses changing (when you are not connected to a network), is not a clever thing to do.