Nick's .NET Travels

Continually looking for the yellow brick road so I can catch me a wizard....

i-mate SPL

While I was in the UK last month I decided to find a replacement phone for Meg, who has been using a Smartphone 2 for the last couple of years. After much consideration of all the new devices on the market I decided to go for the i-mate SPL.  At the moment this runs Windows Mobile 5 but I'm hoping that since it is such a recent phone (like it hasn't even been released here in Australia yet) that we might see an upgrade path to Windows Mobile 6.  Regardless, I don't think not having an upgrade will really phase Meg.

Anyhow after a week or so of tracking the package using the Expansys and DHL websites it eventually arrived today.  My first impressions are that it is a slim and lightweight as I was hoping.  Here are just a few screenshots:

The i-mate SPL Top and Bottom

Screen and Camera

USB port (open) and Wriststrap connection point

 USB port (closed) with Photo Button, and Sound Controls

Microphone (in the base) and the Sound Controls

Now we're talking - Inside and the SIM tray

Other than taking me a while to work out how to turn the keylock on (which by the way you can do by holding down the home button) my first couple of hours with this device have been a real pleasure.  I must admit I'm not really a Smartphone kinda guy but I might consider using this device for a short while (at least until my K-Jam comes back from its road trip to the US).

Visual Studio vNext (aka "Orcas")

I've started trawling the web for any information I can get about the next version of Visual Studio.  As you can guess, it's about time for me to start considering the next version of [VS2005] (clearly with a bit of a name change!).  Anyhow here are a couple of posts I just came across the outline some of the new features:

  • Team Foundation Server (TFS) Roadmap
  • Occasionally Connected Systems Designer
  • Visual Studio Team System Roadmap
  • Visual Studio Orcas Overview
  • Visual Studio Orcas Features List (not a full list I might add looking at the features for device developers versus what is already available in the March CTP)

Authentication with Windows Live Id Client 1.0 SDK

I just noticed that you can download the Alpha (interestingly they use that instead of the usual "Community Tech Preview") release of the Windows Live Id Client 1.0 SDK.  This comes with documentation and a simple application that demonstrates authenticating using your Live credentials. Scott's got a great article on getting started with the SDK.

Across on the forum there have already been questions raised about whether this can be used to authentication for websites and on mobile devices.  My burning question is whether they have planned to support occasionally connected applications?  What happens when my connection fails - does it log off immediately? do I need to log in again? Can I logon when I'm offline (assuming I've previous logged on using this computer in the same way as the operating system)?

Intilecta on Deepfish

Last week there was quite a bit of hype around a new browser concept coming out of Microsoft Research, Deepfish.  I was luck enough to be included in the beta so I thought I'd share some comments. 

Before we look at Deepfish I thought I'd test out Windows Mobile 6 to see what the [Intilecta] website looks like.  One area where Microsoft have made signficant improvements with WM6 is with the web browser - this is clearly evident if you take a look at the following screen shot:

 

WM6

Next we look at Deepfish:  As with most other mobile applications you install Deepfish on the desktop, then the next time you connect your device it will be installed via ActiveSync/WMDC.  The following screen shots are how the website looks after navigating to the website using Deepfish.

Deepfish - Initial page load, Zoom square, Zoomed in with Cuemap

The initial screen shows the website rendered as it would be on the desktop.  Despite being quite small it is easy to determine where everything is and get an appreciation of what part of the site you want to read.  In order to read the text you need to zoom in - clearly this part of Deepfish has been designed for the smartphone as it SUX for the pocket pc.  To zoom in you press the Enter key, then use the stylus/direction pad to move the zoom square around.  IMHO I think this would be much better if you could use the stylus to select a rectangular region on the screen to zoom in on.

Once zoomed in, the experience for the pocket pc user isn't much better.  An ideal experience would be for the user to be able to drag the stylus around the cuemap and for the screen to follow - instead you have to select a new spot on the map and then the screen moves there; similar but not the same.

First impressions: great start, but a long long long way to go!

When Versioning goes Wrong

As most software developers understand moving from v1 of a product to v2 causes all manner of grief.  In particular it is usually the first time that you think about how you are going to version your product.  I don't mean just giving it a version, I mean how you are going to upgrade v1 users, how you are going to increment version numbers etc.

I was talking to Bill last week about v2 of the Device Emulator.  This was originally incorporated into Visual Studio as part of the extensions for device developers but since [VS2005] it has been available as a standalone emulator that can be used for demos, testing etc.  Bill wanted to know whether installing the standalone version overwrote the version which gets deployed with Visual Studio.  For the record the answer is yes it does but this is definitely not evident from looking at the file system:

  • Firstly, to ensure that v2 does infact replace the version that Visual Studio launches it is installed into the same location on the file system (namely: C:\Program Files\Microsoft Device Emulator\1.0)
  • The file version (which is also the version reported in the About dialog) is 8.0.60801.0

Clearly there wasn't much thinking about versioning when the team were planning this one?

Camp Architecture, NZ Style

Alex pinged me a week or so back asking me to spread the word about the Architecture Camp that the NZ community is running.  I must confess that I completely forgot and it wasn't until I saw this post that I remembered.  Anyhow, for anyone interested in talking shop architecture for a weekend, in a similar style to Code Camp Oz, you might want to start planning now!

My First Hour with the Smart Device Framework v2.1

Normally I wait until I can get a copy off the back of a truck before I both playing with a new piece of software but in this case I've been so eager I figure I'd bite the bullet and purchase a license to the new [OpenNETCF] Smart Device Framework v2.1 (with [VS2005] Extensions).  The other reason I felt I should make this purchase is that it is only $50 (single license) and that I figure it would help these guys continue their great work.

Although I haven't really got down to playing with the various controls and classes I am suitably impressed with the level of integration and the setup process they have.  Here are just a few shots of me "opening the box".

Installer package even has the correct icon

The installation process

Integration into Splash Screen

New Project types

New Controls, already added to the Toolbox

Integrated Help

Check out the list of contributors

Impressive Documentation

Appropriate listing in the Start Menu

OpenNETCF SDF v2.1

Neil has just announced that version 2.1 of the [OpenNETCF] Smart Device Framework has just been released. Although they now charge for this framework it is no longer just a class library that gives you missing desktop functionality.  With tight integration into Visual Studio 2005 this framework is essential for all windows mobile developers. 

Once I start playing with the new version I will endeavour to post about some of the new features I come across.

About time - Free Wireless

On Friday I heard an unconfirmed rumor that wireless was soon to be made free in the Qantas Club.  This morning I thought I'd put it to the test and sure enough: It's Free. You still need to connect via the Telstra redirect site, but that's as simple as clicking the button.

All I can say is - About Time!  Now all we need to do is convince the hotels that charging $20+ a day is just extortion. 

Now Why Didn't I think of That

I was just reading a post by Steve Lasker in which he describes how you can create a SQL Server Compact Edition database and how you can detect if the database already exists.  One of my complaints about the introduced "|DataDirectory|" substitution is that it isn't understood by System.IO.  Luckily it doesn't need to as the .Database property on the SqlCEConnection object returns the path to the database with the appropriate substitution made:

My.Settings.LocalConnectionString:= Data Source ="|DataDirectory|\Another.sdf"; Password ="SomePassword";

Dim localConnection As New SqlCeConnection(My.Settings.LocalConnectionString)

If Not System.IO.File.Exists(localConnection.Database) ...

WM6 ROM for K-Jam

Having unsuccessfully attempted to image my device to WM6 I thought I'd check with i-mate to see if they had plans to release a WM6 ROM for this device:

Jose> Welcome to club i-mate support. My name is Jose, how can I help you today?
Nick> Hey Jose - quick question regarding the k-jam
Nick> given this device is a little over a year old I was wondering whether there is going to be a WM6 ROM made available for this device?
Jose> yes there is going to be upgrade
Jose> but there is no date of release

Looks like there will be a ROM out for the K-Jam (aka Wizard) but no idea on the timings.

Code Camp Oz and the Waterpolo

This weekend has been full of lots of action and adventure.  After negotiating the Melbourne traffic on Friday afternoon I managed to pick up Phil and make the drive out to Wagga Wagga (only got slightly lost around Albury). One of the best parts of Code Camp is the first evening when everyone has just arrived and ends up at the same restaurant.  Although it took about an hours to get any food it is the perfect opportunity to catch up with what everyone has been doing.

I came to the conclusion that the world is all too small. Two members of the French team that won the 2004 Imagine Cup, Aymeric Gaurat Apelli and Francois Beaussier, now work for Readify.  I remember these guys as their level of innovation set them apart in a competition where every single entry would put most commercial organisations to shame.  It's great to see that an Australian company is recruiting some of the best up and coming international talent!

Unfortunately I wasn't able to stay for the entire camp but I was their long enough to see Damian and Paul give their Ajax session, to give my session on Synchronisation (hopefully audio (from the Perth user group) and the slides will be available later this week) and to see Grant's (who is now an MVP) session on TFS.

Here are just a few shots of Code Camp 2007 (taken with my K-Jam before I flashed it to WM6 WM5 - turns out the image was only WM5 - Doh!):

Fellow Perthite, Stephen Price (I think that's me in that photo!), made the journey too!

Damian looks on while Paul shows how to use an Updater Panel.

Mitch gets a shot with his JasJar while his Tablet PC sits idle.  

Following another 4.5 hour drive back to Melbourne on Saturday afternoon Meg and I went out to watch the George Coleman, Jr Quartet at Bennett's Lane Jazz Club.  Truly awesome and I'm so looking forward to the Herbie Hancock concert in Perth later this month.

Yesterday afternoon Meg and I went to the final session of the FINA World Championships to watch the Waterpolo. This was held at the Melbourne Aquatic centre and they had setup more security than most international airports.  We thought they were going to confiscate the coffee we were taking in, but it became apparent that they were looking for more dangerous articles. When the bronze game got started we knew we were in for an entertaining afternoon as Serbia were playing Spain.  While I have a lot of respect for all nations competing, the Serbian fans are nothing short of thugs.  They are the only nation that frequently booed the opposition - talk about poor sportsmanship!

The other interesting thing was that they had setup these flamethrowers (careful Sandi, don't get too excited) at either end of the pool that would go off whenever a goal was scored.  Even back in the stands you could feel the heat that these things gave off. 

Code Camp {where}

For some reason this week seemed to disappear.  After getting back from my trip around the globe last weekend I was excited to launch back into work.  Dave and I are now working out of the Perth Annex - the Perth extension to the R & D Centre for [Intilecta] based in Wellington.  Part of my time while I was in NZ was to help with the transition from SourceSafe to Subversion.  This was only one part of a much larger initiative to upgrade our internal infrastructure.  Already we have noticed a massive improvement in our ability to work remotely.

This leads me to my next point which is that I'm again on the road, this time at the Qantas Club in Melbourne on the way to Code Camp Oz.  This is definitely one of the developer highlights of the year, although being in Wagga Wagga it is a pain to get to for people who don't live on the East Coast - not only do we have to fly to the East (Sydney, Canberra or Melbourne), we then need to organise transport to Wagga, not to mention the additional days leave in order to get to and from the event.  For future, guys (Mitch and Greg) I think it is time to rethink this decision and move it to a more hospitable location.  This would also encourage international developers, such as Alex, to come across.

. " , ' ; ! - ? _ Are all examples of ...... Often Misused Punctuation

Rod has an interesting post about where and when you should use apostrophes (arguably the most misused punctuation).  If you were ever curious, and want a good laugh while being educated, you should read "Eats, Shoots and Leaves".  This book contains hundreds of illustrations of where you should and shouldn't use a range of punctuation and IMHO should be a core teaching requirement for all high schools!

Hosted Exchange 2007 for SoftTeq

Yesterday morning didn't start out particularly well for me.  If you have ever played around with adding/removing mail accounts from Outlook you will probably know that if you remove your Exchange mail account it removes your primary mailbox (ie the OST file).  Normally this isn't a problem because you can setup your mail accounts, reconnect to the exchange server and sync your mailbox.  Unfortunately the reason I was playing around was because the SoftTeq mail server had died so I couldn't reconnect.  Luckily I was able to download a OST to PST application that did the trick.

The real reason for this post is that I then went looking for an alternative to us managing our own server (basically we were only using the exchange portion of SBS anyhow as SoftTeq is no longer a commercial venture). This is when I came across ExchangeMailHosting, which is actually run by IT Solutions Now.  I was looking for a hosted exchange solution that was relatively cheap, that used Exchange 2007 and supported RPC over HTTP (so I could sync on the run and from my mobile device).  For $9.95 per mailbox per month this service is quite good value.

It gets better - if you want a baseline to compare service against then these guys are quite high up there.  I filled in their online application form and within an hour I had an email saying that the service was up and running.  Within 2 hours I had setup Outlook (as per instructions in the welcome email), I had accessed their web access site and I had sync'd to my mobile device.  When their application form said that someone would contact us within 24 hours I'd assumed I'd get a phone call at 3am to complete the process - but instead "It All Just Works"!

Lastly I want to point out a great new feature in Exchange 2007:  After Windows Mobile 5 was released there was a service pack for Exchange 2003 which allowed an administrator to remote wipe a device that was syncing with the Exchange server.  Clearly this was a little inefficient since it requires an admin to get involved at 3am when a drunk employee realises they left their phone in the Taxi.  The new and improved Outlook Web Access in Exchange 2007 has the ability for the user to Self-Serve through the Options -> Mobile Devices screen, as shown in the following image.

Synchronisation Strategies

The author of sync-mobile has added another post that discusses scheduling strategies for synchronisation of data.  In this post they outline three strategies for scheduling or kicking off a sync:

  1. SMS - There is definitely a risk that messages can be delayed or might never reach the target but on most networks this latency/risk is pretty low.  In fact in NZ they use SMS as a mechanism for paying for parking - the latency is 5-10 seconds which is usually adequate for most scenarios.  Don't forget that Windows Mobile 5+ now has the notification engine means that you can write managed code using the .NST Compacty Framework to intercept SMS messages, even if you application isn't running!
  2. HTTP/TCPIP - Their main point with this strategy is that battery life is a premium which I would have to agree with.  There is also the additional cost of network traffic (for those countries like Australia/NZ where data is still expensive).  This said, since the release of the Security and Messaging Feature Pack for Windows Mobile 5 we have had Direct Push email - this basically establishes a connection to the Exchange server that remains open even when the device goes into standby.  There is a great article on MSDN that discusses how you can use this technique in your application.  In my experience the drain on battery power is actually not that bad using this technique.
  3. Scheduled Sync - Ok, now we are talking - this is a technique I have used a couple of times.  The biggest issue here is that in managed code any sort of timer you use has the issue that it won't be triggered if your device has gone into standby (which it is likely to do in order to extend battery life).  This is where you really need the power of the Smart Device Framework from the guys at OpenNETCF so you can use the Large Interval Timer in order to wake your application up.

It would be great to hear what other techniques people use in order to trigger synchronisations - do you monitor network availability, sync on application startup/usage or do you have other business rules that drive when you synchronise.  Do you detect what type of network you are connected to and determine whether you should sync based on the cost of the network (see the Mobile Client Software Factory - Disconnected Service Agent and Connection Monitor blocks for quite a nice implementation of this)

Why having a Database Engine in ROM is a good idea

Yesterday I came across an interesting site dedicated to Mobile Synchronisation and noticed they had a post regarding Symbian and the fact that in the next version of their OS (v9.5) they will follow Microsoft's path of including a database engine (SQLLite fo Symbian, SQL Server CE for Windows Mobile) in ROM.

The author attempts to make the point that he doesn't understand why you would want to include a database engine in ROM, or a runtime such as .NET CF for that matter. They point out that you "still need to install your mobile application so what is the big deal of reducing your install size by a few 100KB?".  IMHO there are a couple of compelling reasons to include both the runtime and database engine in ROM:

  • Firstly it means that you don't need to package it with your application - although the size saving isn't that great, it is just another thing that you have to include in your installer (better that someone else deals with this). 
  • It also means that the database engine is only deployed once (since SQL Server CE can be deployed as a set of dlls, in theory you could have multiple applications all with their own instance of the database engine).
  • I think the most significant reason for including the runtime and database engine in ROM is to make the OS more appealing to developers.  If I know that all WM6 devices are going to be able to run my application because it has the runtime and db engine included then I am likely to target that device for any new applications.  This is similar to the decision to include the .NET Framework v3 in Windows Vista (in contrast to previous versions of Windows where the .NET Framework is an optional install).

I was also intrigued by the author's comment regarding the inclusion of SQL Server Express in [VS2005] a marketing ploy.  Perhaps it was but developers still have the choice as to whether it gets installed (as with other components of VS) and it does mean that developers don't need to worry about downloading/purchasing a database engine in order to build database applications.

Get your WCF on the run

Mark Prentice of the .NET Compact Framework team has just posted an introduction on how you will be able to work with the WCF-over-email solution that will come out as part of v3.5 of the .NET CF.  At the MVP Summit we saw this in action and enough to say it is way cool.  Although I can't see Steve getting all enthusiastic about using Sync Services across this binding, I think there is a huge potential here for organisations to start leaveraging their investment in Outlook/Exchange by building peer-to-peer messaging based applications.

 

BIG NEWS for TFS users - Microsoft Acquires DevBiz

Anyone working with TFS will be over the moon to know (as per Brian Harry's post) that Microsoft has just acquired DevBiz.  This is a significant gap stop in a fundamentally v1 product where simple web accessibility was not readily available.  Team Plain was almost a no brainer, despite the additional per seat cost.  Now with the Microsoft acquisition you have no excuse.  Of course, don't forget the per seat CALs you need to access TFS!

Must have coffee....

I'm glad to hear from various sources that the weekly coffee gathering we started a month or so ago is still going strong in my absence.  I just want everyone to know that I'm back in town and keen to catch up with everyone. 

Don't forget:

    Every Tuesday, 1:30pm @ Tiger Tiger

Windows Phone 7 Navigation Memory Usage

Nick's .NET Travels

Continually looking for the yellow brick road so I can catch me a wizard....

Windows Phone 7 Navigation Memory Usage

Following Brendan’s post regarding memory usage in Windows Phone 7 applications I thought I’d take a look at some very basic scenarios to get a better feel for where memory is consumed.

Let’s start with a simple application, and I mean simple. Start a new project and basically rip out anything that isn’t required so that you end up with a blank page. In my case I even ripped out the splash screen. I’ve got a simple timer that executes every two seconds and reports current and maximum memory usage for the application. Here’s the first chart, followed by an explanation of each series.

image

- Single page (GC): This is the application with just the empty MainPage.xaml. The GC indicates that GC.Collect is called before querying the memory usage.

- Single Page (1) and (2): This is the application with just the empty MainPage.xaml but without the GC.Collect calls. You can only see two of these series as the others are identical so aren’t visible as they sit behind the other two.

- Two Pages: This is the application with a second (again empty) page added. This page is not navigated to.

- Two Pages (with 1 navigation): This is the application with a second page that is navigated to after approximately 6 seconds.

- Two Pages (with return navigation): This is the application with a second page that is navigated to after approximately 6 seconds and then navigated back to the MainPage at around the 12 second mark.

Whilst moderately interesting, there isn’t much useful information contained here. Let’s move right along to the next set of lines:

image

- Two Pages (iterative nav): This is the same application this time we’re navigating back and forth between the MainPage and the second page every approximately 6 seconds.

- Two Pages (iterative nav) (GC): Same again, but this time we’re calling GC.Collect before each query of the memory usage (this stops at 200 second mark as I got bored because the line wasn’t going anywhere…)

Ok, so now this is interesting. Remembering that your application has to sit below the 90Mb threshold for Marketplace certification it is apparent that an occasional call to GC.Collect may be in order to free up some resources. This is completely in contrast to the recommendation that you should never call GC.Collect!

Pingbacks and trackbacks (3)+

Comments are closed