Wednesday 29 October 2008

Windows 7 and my netbook

So as I said on previous posts, as well as my main laptop, I have a netbook for when I am on the move.

They reckon that Windows 7 has a much smaller footprint than Vista and has been run on netbooks with similar specs to mine.

I am pretty tempted to install the CTP on the second partition of my netbook and give it a go.  I think my try the .vhd first on my main laptop first however.

I do think this is a great move by Microsoft because I love Vista, I just don't like the footprint and the fact that I can't run it on my netbook and I have to run XP.

Will let you know how it goes

Tuesday 28 October 2008

Live Services

I haven't looked too much at the new Live Services stuff announced at PDC from a developers point of view.  However from a users point of view I love it.

I am now in the position where I have my main machine (a large laptop) which I use for developing and presenting, and my Netbook (asus eeepc) which i use for being mobile.

I am now experiencing the pain of having pictures, music, source code on one device but not another.  I see the synchronization between devices offered by Live Services as the real solution, very cool stuff.

When I get back, I'm gonna give it a bash and try and have my various devices sync'd up.

As soon as I do that, I can guarantee, I will start developing against it :)

Silverlight 2 for Mobiles

So I am in the session for Silverlight 2 for Mobiles at the PDC.

So the Public CTP of Silverlight Mobiles will be available Q1 2009, so my guess would be it will made available at Mix09.

We got loads of demo's at the PDC Session.  The good news is the same tools you use at the moment to create Silverlight 2 applications will work allow you to create Silverlight 2 Mobile applications.  After all it is Silverlight 2 on a mobile :)

YOU DO NOT HAVE TO DO ANYTHING TO MAKE YOUR SILVERLIGHT APPLICATION TO MAKE IT WORK ON THE MOBILE, NO RECOMPILING, NOTHING

The same app on the web will work on your mobile device.

The demo's given were a Silverlight application on a browser running in the Mobile Device Emulator (Windows Mobile Emulator).  Not only did we the demo's in the emulator we saw thee applications compiled and deployed to a windows mobile device, and demo'd

The demos we were given:

  • Hello World Button
  • Rich Vector Graphic Animation of a Duck (done in blend)
  • Baby Smash (by Scott Hanselman)
  • Slot Machine
  • Connect 4
  • Guitar
  • Dancing Man
  • Web Service Image Downloader
  • BBC IPlayer

Different User Experiences for Different Devices

This is not to say that all Silverlight applications are suitable to be run on the phone and desktop.  This is due to the sizing of the application.  An application that looks nice on a large desktop may not look so nice on a tiny phone, and vice versa.  So you can give smaller less rich versions to phones, and very rich versions to desktop applications. 

So you may wish to check the device and route them to a suitable version of the Silverlight application.  Request Headers give you this information today.  

Keyboard Interactions

Keyboard interaction is another area where you would want a different experience on the phones.  So for example you probably want to limit your app to numeric input for certain devices (especially important in games)

Gestures

One of the very cool things done, was a gesture helper.  This meant the mobile application supported gestures on the phone, by mapping mouse inputs to gestures, very cool.  I hope this code is made generally available or production quality code is provided with the CTP (or on codeplex) so everyone doesn't have to keep ripping off Gesture Helpers.

Devices

Mobile Devices will run effectively a Silverlight 2 plugin on the device (just like the browser)

Microsoft are trying to work deals so that Silverlight is bundled with Device Vendors, so the user doesn't have to download the Silverlight plugin.

Mobile Features

They are looking in the future to support mobile specific functionality, such as capturing camera input (this wasn't demo'd).

There are also plans to run Silverlight 2 applications outside of the browser for mobile devices (just as was announced for desktop applications).

Final Demo

The last demo we saw a Silverlight 2 Mobile application interacting with the cloud.

The chap controlled a WPF application on his desktop via the cloud, and navigating the application on his phone using the accelerometer of his phone.  He then was able to transfer object from his machine to his phone via the cloud.

Very cool demo.

Finally

So although Silverlight 2 will be supported on Mobile Devices you will wish to give different user experiences to different devices, so you must think about this, design for it, and test it on different devices.

Very Cool Stuff, just wish we had a CTP now.

However you can simulate a lot of this with todays technology, by rendering appropriately for various screen sizes.  You just can't test it on a device or emulator.

Silverlight Controls

Loads of new controls announced at the PDC, with downloads available 

AutoCompleteBox and Charts are the ones I'm most excited about.

See Shawn Burkes's Blog for full details

Small Basic: Hello World

So I've been messing around with Small Basic, it really is bringing me back to my childhood.

So I create a quick little console application which prompts for your name and says hello.  I also mess around with some color's.  I love it.

Code is Below

TextWindow.Write("Please enter your name: ")
myName = TextWindow.Read()
TextWindow.WriteLine("")
TextWindow.ForegroundColor = "Green"
TextWindow.WriteLine("Hello " + myName)
TextWindow.WriteLine("")
TextWindow.ForegroundColor = "White"

Sunday 26 October 2008

PDC Craziness begins

So this is my ultimate week.

Tonight, I celebrate my fathers 60th birthday with our now annual pilgrimage to Wembley stadium to watch the NFL.  Chargers vs Saints.  We went last year when we watched the Giants (my team) play the Dolphins.

After the game, I get up at 5.00am head across to Heathrow to fly out to LA.  I arrive in LA at 2.30pm (LA time), and then will head across to the conference center.

So i miss the keynote, and a couple of sessions but this way I get to spend time with my dad, watch the NF and go to the PDC.

After the PDC we head across to Disneyland for a few days.

I wonder how I will cope with reality after this week.

Friday 24 October 2008

Microsoft Small Basic

This is probably one of the coolest things I’ve seen in a long time.

It’s a simple language / programming language for kids / adults.  In fact anyone who wants to learn programming.

You can do seriously cool stuff:

  • Learn basic
  • Learn programming constructs
  • Get started in programming quickly and simply
  • Do graphics (fractals etc)
  • Turtle
  • Flickr

I am gonna download it this weekend and have a play, I thinks.

Hmmm, I wonder can I interop with C# :)

You can download it from here

Wednesday 22 October 2008

Free TechEd EMEA Developers Ticket

So here is a good reason to become a paid up member of NxtGenUG.

Essentially we are running a competition where you can win a TechEd Developers Europe Ticket (only members can apply).

For more details on how to win:

http://www.nxtgenug.net/NewsArticle.aspx?ArticleID=302

Friday 17 October 2008

Silverlight Next Version at PDC

So now that Silverlight 2 is shipped, I am now wondering what the shape of the next version of Silverlight will be like.

This post is completely conjecture, guessing and some information posted in blogs.

New Silverlight Bits at PDC

I know people must think I am mad but I like new stuff. The good news is that I believe we are getting a new preview of some new Silverlight stuff at PDC, the Silverlight team have been busy beavering at new stuff. How do I know this, well it all comes from Delay’s blog

So if we are getting new bits at the PDC what would I guess we will see? Well the new bits will be new features independent of controls (since the controls team is split off).

So I would think we will see the following:

  • H.264 Support (announced in other postings)

What I think we will also see (my own opinion, no inside knowledge, no views of private builds)

  • Camera Support
  • Microphone Support
  • Support for any of the new stuff being announced at PDC (Cloud, Mesh)

I kind of think we might see some early experimental 3D controls. may’be even Hardware Acceleration support (really I am just guessing)

I certainly think it will be exciting but to be honest we could see anything? I’m looking forward to it

New Silverlight Controls at PDC

So we now know that controls for Silverlight are now outside of the Silverlight team and is now done by a Silverlight Controls team who will be publishing new controls as they go along on CodePlex. This team is run by Shawn Burke , and in his blog he states that there will be a preview at the PDC. For more info on this team, look at this blog posting

Basically over the coming months we can expect more WPF controls to appear in Silverlight space, as well as all new Silverlight controls.

So what can we expect from controls:

  • DockPanel
  • WrapPanel
  • ViewBox
  • Label
  • HeaderedContentControl
  • Expander
  • TreeView
  • NumericUpDown
  • AutoComplete
  • Accordion
  • Again this list comes from Shawn’s blog.

    Silverlight for Mobile

    Lets not forget we should get a preview of Silverlight 2 on mobile devices (this info is from http://blogs.msdn.com/giorgio/archive/2008/09/19/pdc-2008-and-silverlight-for-mobile.aspx)

    Thursday 16 October 2008

    ASP.NET Performance Birmingham

    Thanks to everyone who came my session at NxtGenUG Birmingham on ASP.NET Front End performance.

    I had a blast and everyone seemed to have a good time and enjoyed the session.

    I've uploaded the slides and samples for the session on my skydrive.

    Thanks again for taking the time to come to this session and for all the great feedback :)

    Tuesday 14 October 2008

    SessionPageStatePersister

    So I use SessionPageStatePersister in one of my project to keep ViewState to a minimum.

    This really is a great class and great technique especially when dealing with developing countries.

    The downside is that strange things can occur with this (especially if you use popups).

    The Scenario

    So lets say I do something with my page, launch a popup, within the popup, load 9 different pages, and then return to my original page.

    What happens? I suddenly find my ViewState is trashed?

    Why is my ViewState trashed?

    If we reflect SessionPageStatePersister we will find there is a statement with the following condition:

    && (Count > 9)

    Which will then dequeue and remove the viewstate item from the session, effectively trashing my viewstate for that page.

    So how do I fix this?

    In your web.config under system.web you need to add the following:

    <sessionPageState historySize="100" /> (or whatever number you like)

    The following MSDN page should help you out:

    http://msdn.microsoft.com/en-us/library/ms228249.aspx

    Monday 13 October 2008

    Bring out the Fizzy Pop – Silverlight 2 is released

    The official press release is here:

    http://www.microsoft.com/presspass/press/2008/oct08/10-13Silverlight2PR.mspx

    Just waiting for the errrmm release now :)

    No doubt it will appear on http://silverlight.net later

    Sunday 12 October 2008

    Significant Silverlight Announcement on Monday

    So the real question is, is it the release of Silverlight 2, I guess we will find out tomorrow.

    It certainly looks like it though:

    http://www.microsoft.com/presspass/press/2008/oct08/10-10GuthrieSilverlightMA.mspx

    So my next question is what will we find out at PDC about the next version of Silverlight, what preview bits will we get :)

    Thursday 9 October 2008

    DDD7 - Welcome to the Cloud

    I'm very proud to have had my talk for DDD7 accepted, "Welcome to the Cloud".

    It is personally a very challenging talk for me as literally I have no idea of the content of the talk until I return from the PDC :)

    Thanks to everyone who voted in my talk and I am really looking forward to doing it.

    Tuesday 7 October 2008

    Mesh / Cloud Enabled Isolated Storage

    So I was thinking about Mesh and the Cloud for Silverlight, and started thinking wouldn’t it be cool if we could have Mesh / Cloud enabled Isolated Storage (this is my own little personal thought / dream)

    I thought the example I would give would be the Silverlight Spectrum Emulator.

    I realize we could sort of achieve this scenario already today using WCF Services but I think Mesh / Cloud is a better example with a better user and developer experience.

    The Scenario

    So I decide I want to play a spectrum game (lets say Dizzy), so I download the game and open it up in the emulator. I play for a while and have great fun, my wife shouts at me and says we have to go shopping. She is taking a while trying on various clothes, so I am standing around a womens clothes shop feeling very uncomfortable and very bored. So I whip out my mobile phone, and navigate to the silverlight spectrum emulator site, I want to play Dizzy again.

    Now because I have already played Dizzy before on my PC, my Isolated Storage is Synchronized from my PC to my phone, so I now have the very same Isolated Storage on my phone for this site as I do on my PC.

    This means that I already have Dizzy on my phone (even though I have done no logins to the site, and hopefully the developer hasn’t written any code, he has just set a property saying that Isolated Storage is Mesh / Cloud Enabled.

    The even cooler thing is that if I saved my game state on my previous PC, I could continue playing my game on my emulator from where i left off.

    This example is not just relevant to the Silverlight Spectrum Emulator but to any casual game (e.g. Silverlight Manic Miner on NxtGenUG).

    That was just my thoughts on it.

    NxtGenUG Cambridge Tonight – Workflow and WatiN

    If you are in Cambridge, England tonight, we have this months user group meeting.

    We have a nugget from Rich Allen (Southampton Coordinator for NxtGenUG and Winner of Ready,Steady, Speak at Remix08) on WatiN, and John McLoughlin (Southampton Coordinator for NxtGenUG) on Windows Workflow.

    We will also have Pizza.

    Register Here:

    http://www.nxtgenug.net/ViewEvent.aspx?EventID=162

    And I will see you there tonight.

    Sunday 5 October 2008

    I Love Silverlight RC0 for Performance

    One of the issues that I was having with the Silverlight Spectrum emulator in Beta 2 was the performance.

    Sometimes it would be okay, sometimes it would be really jerky.  There was definitely issues to do with what was going on in your machine and other processes.

    With RC0 they introduced the CompositionTarget.Rendering event, which is an event that occurs just before rendering of the UI, which makes this much better to use for scenarios such as Game Loops or for rendering of emulators (which is very similar to a game loop).  This is a much better method than using a Timer or a Storyboard.

    Bill Reiss has a great article on this.

    To be honest even without this feature the performance feels so much better.  Although I'm not a game writer in any shape or form (not that game writers have particular shapes), my experience with from writing the Silverlight version of the Spectrum Emulator and with my general Silverlight experience I can tell this will be a great platform for writing casual games :)

    Silverlight RC0: IsTabStop="false" makes TextBox uneditable

    I think this is a bug if not, i think it should be.

    If I set IsTabStop="false" on the TextBox then I can longer edit the control.

    I think this is wrong as it's conceivable that I don't want to tab onto it, but I still want to use the control.

    Saturday 4 October 2008

    Silverlight 2 RCO Version of Spectrum Emulator

    So, this will probably be one of the last versions of the emulator, as I want to play with other things.  I may however still mess around with it.

    Links

    This will only work on RC0, not Beta 2, and it should work on the release version when it comes out.

    You can use the emulator from here

    You can download the source from my skydrive:

    Thanks

    I give everyone permission to do what they like with the source, big thanks to Joe Stegman for his PNG Encoder, and the biggest thanks to Jan Jones who create the XNA version, which is what I used as my base code.

    There is loads that can still be done (Sound Support, Isolated Storage etc, may'be I'll have time, may'be somebody else will, either is cool).

    I have created a project on CodePlex, I just haven't uploaded the source, feel free to do it for me, and I'll give you permission on the project.

    Instructions

    Click your mouse within the emulator to begin

    Symbol Shift is the Home Key, Remember Shift 0 is backspace, and Symbol Shift (home) P is a quote mark.

    The emulator works with .SNA files, which you should be able to download from various sites and run via the Open File option, just search for .sna and whatever game. This link has JetPac, Atic Atac, SabreWulf

    Click here for an the layout of the spectrum keyboard

    Play with it

    More Silverlight RC0 Woes

    If I have a button, set IsHitTestVisible="false", and then select the button and hit the space bar, Silverlight RC0mcrashes most heinously.

    <Button x:Name="btnHack" Content="I am a hack" Margin="10" Width="100" IsHitTestVisible="False"/>

    RC0Crash

    Silverlight RC0 ComboBox aaaargh

    I've been updating my Silverlight Spectrum Emulator to work with RC0 (which so far has been brilliant).

    Unfortunately, as I soon as I drop the combobox onto the page, it routes the keydown, keyup for the Return Key.  All other keys are fine and route ok.

    I'm sure there is a simple way around this but in my current state of sickliness, i can't figure it.

    Even when I switch off hittestenabled or even disable the control, the mere presence of the comboxbox is enough to make me lose my return key.



    UPDATE: So i've figured out what is causing the problem and it's to do with Tab Stops. IsTabSpot="False" makes this control behave again, however I do think that if i disable the control, then it should not continue to steal the keyboard events.

    Friday 3 October 2008

    Wednesday 1 October 2008

    Search Perks

    I am a little cynical of such things normally and didn’t think this was a great idea at first.

    Live Search are loyalty points for using Live Search, you can sign up to this using the Search perks site.  Is this really much different from a nectar card, a Tesco clubcard, Hilton HHonors?  I don’t think so, infact I wish it was open to UK residents.  The perks look great.

    Converting to Silverlight 2 Beta 2 to Silverlight 2 RC0

    Just a couple of little gotchas (which I always forget), I know it seems obvious.

    If you are updating your Silverlight Beta 2 application to Silverlight 2 RC0, remember to update your version.

    ASP.NET Silverlight Control Minimum Version

    If you are using an asp.net page (with an ASP.NET Silverlight control), then make sure the minimum version of your silverlight control is updated to 2.0.30923 (RC0 version) rather than 2.0.30523 (beta 2 version).

    HTML Page Object Type

    If you are using the object tag for your silverlight application, make sure your type attribute is set to: type="application/x-silverlight-2", rather than type="application/x-silverlight-2-b2"

    Silverlight Streaming and RC0

    So I installed Silverlight RC0 last night on my laptop to have a little play.

    I have to say I was very impressed with it and it seems to having fixed some of the performance issues with the Spectrum Emulator (time will however tell).

    So I thought I’d stick the new version up on Silverlight Streaming, unfortunately at the moment RC0 is not supported.  You will be able to upload your application but unfortunately it won’t allow you to view it, as it will try and get you to install Silverlight Beta 2 instead.

    Ah well, I will probably stick the emulator up on one of my servers this week.  I imagine Silverlight Streaming will only support Beta 2 until Silverlight 2 is officially released.