Saturday, December 11, 2010

Error 80020006 on WP7 InvokeScript on the WebBrowser

^&$%...

If you hit this error...

Check you've set <phone:WebBrowser IsScriptEnabled="True" >

Doh! Another hour of my life gone!

Thursday, December 09, 2010

Switching to Azure SDK 1.3

I've had "quite a few" issues switching to the new SDK for Azure.

Most of these have been in big solutions where projects seem intent on continuing to reference the old 1.0.0.0 StorageClient - hopefully that's now all done (just that little flag to change which stops them referencing "Specific Version")

One configuration change concerned diagnostics - Neil McKenzie's post helps with this http://convective.wordpress.com/2010/12/01/configuration-changes-to-windows-azure-diagnostics-in-azure-sdk-v1-3 - but really the easiest way to update your diagnostics is to use the "properties wizard" for each role within the Azure cloud project in your solution.

Overall I quite like most of the 1.3 changes - the problems I've hit as a result haven't been fun, but I understand why the changes are needed... Forwards!

Tuesday, December 07, 2010

If you're fiddler POST posts aren't correctly getting the form variables...

... make sure you've set the header:
Content-type: application/x-www-form-urlencoded
Couldn't see why my POST wasn't working - it was just a missing header - doh!

Wednesday, December 01, 2010

My "presentation" to the Windows Phone User Group

I did this "presentation" using Notepad - it was all a bit last minute....

The theme of it was about how I've just built my first WP7 app - RunSat - and the lessons learned

I think (hope?) the presentation was better when it had a demo attached!




Timeline
- last November Samsung gave me a Omnia II.
- then I bought an iPhone
- then Samsung gave me a Bada phone
- 12 days ago I wrote my first Silverlight/WPF app
- then last Thursday Paul Foster lent me a WP7 phone







1. Wp7 development is a pleasure compared to:
WP7 dev was a pleasure
- PC dev, 
- WinCE (MFC, then CF2) on Wm6.5, 
- Monotouch, 
- Obj-C xCode, 
- Bada C++
- a teeny bit Eclipse/Android






2. Installation of the tools was super quick 
Zune for PC installation was a bit slow...










3. Device-based dev is super fast, reliable and painless  
- debugging support is great 
- really miss wifi debugging from MonoTouch








4. Emulator-based dev is a bit slower! 
And lack of GPS in emulator is a pain
Some workarounds available - e.g. reactive










5. Silverlight/XAML 
as a non-user 10 days ago, I've found this very easy to pick up 
- but I'm a world away from mastering XAML.
- efficiency doesn't seem to matter ?

- Blend makes blood come out of my ears





6. Tombstoning is actually pretty easy

- unless your data doesn't really fit 

- mine didn't









7. When you Google (Bing?) around for sample code, it's definitely a bit confusing working out what WPF/SL3/SL4 code/xaml will work on WP7

- but there is lots of good blogging available :)








8. Bing maps integration was super quick and super nice :)

- didn't support MVVM perfectly









9. Fighting the Appstore guidelines - I hate the app stores

- app store approval gotchas...
--- pivot control abuse?
--- GPS - request access yourself and supply privacy
--- run idle - request access yourself
--- help and support
--- dark/light theming



10. Cross platform 
- this app came from WM6.5
- it went to Monotouch
- it went from Monotouch to WP7
- next up is MonoDroid (preview 7 already)







Details of cross platform

- GPS integration - just effected one module
- File IO - main IO just worked
- BUT open/close/exists/delete code needed changing for IsolatedStorage
- DateTime (clock) source information
- XML serialisation - XMLDocument not available on WP7 - had to port code across to XDocument - not a biggie - also used JSON.Net
- Web services calls - legacy ASMX didn't work... had to hand craft my XML :( - Would probably have been quicker to change the server api's to newer WCF services.









Cross platform

- big story is how much I haven't rewritten...

- UI - lots of new code to write

---- tables/lists
---- WP7 Pivot/Panorama controls against tables and paged scrollviews
---- notifications

- MVVM pattern made this very manageable (UIDialog on MonoTouch also made my life much simpler) 
- will be much easier again in 2 days time?

- app lifecycle management - still working this out - tombstoning is quite straight forward but requires thought...

- tests... nunit runs on all platforms