Blog header

This year I was asked if I could build the official Windows Phone 7 companion app for the Microsoft TechEd Australia conference.

The app is available from the Windows Phone marketplace http://www.windowsphone.com/en-us/store/app/teched-australia-2012/7bad938d-047f-41b4-bb80-5f9f7dbf776a
And the full source code available on Github https://github.com/DavidBurela/TechEdAusWinPhone

The application was powered by the Infragistics NetAdvantage for Windows Phone control suite, which greatly simplified the development process and helped me complete the application in time.

Post-mortem

Due to timing constraints, I was only given a week to build the entire application to ensure that we had 1.5 weeks lead time for the certification process. This meant I had to leverage as many frameworks and controls to complete it on time.

Ensuring the basics work

I started off by utilising the Windows Phone starter kit for conferences to give me a basic framework for the application. The framework was built to get the data from a custom JSON service the original author was using, however the TechEd data feed was coming from a WCF OData service. I discovered at this time that although the Windows Phone can directly consume the OData service, it only supports XML and not JSON formatted data. The size of the JSON data vs XML data was 300k vs 950k. There was not enough time to try and access the OData feed via manually constructed HTML webclient requests and manual parsing. Instead I specified in the OData LINQ query just the fields that were required for the app. This took the data payload down from 950k to 600k, a massive data transfer reduction over a mobile network and not bad for just an hours investment in tweaking the LINQ statement.

Working on features

After I had confirmed I was able to successfully download the session data and populate the collections locally, I moved onto thinking about what I would want in a conference companion app. The most important features/scenarios for me were:

  • I have just walked out of a session, and I need to look up what talks are happening next.
  • What are all of the MVVM sessions that are happening during the conference.
  • Speakers will regularly recommend other talks to go to. Being able to look up the session codes quickly is important.
  • The delegate handout only has a list of session times and titles. The abstracts aren’t listed. Give the delegates a way to look up a session for more information.
  • Who is the speaker for this session I am in right now.
  • I want to look up a speaker a like, and see what talks they are doing.
  • Being able to favourite a session so I can get a quick overview of when sessions I want to attend are on.
  • Cache the sessions for 2 hours to reduce network usage on data plans.

XamList

Using the NetAdvantage XamList helped me to implement the vast majority of my feature wish list without writing any code. After downloading the session data, I simply used databinding to connect it to the XamList control. The control automatically supports searching through the data in the list, and will look through all the properties that you ask it to (session title, session code, abstract, room location, etc.). That immediately took care of searching for a session based on a number of criteria.

session searching

I created another pivot to allow the delegates to see what sessions are on during each time slot. The XamList also supports grouping of data automatically. After defining that the data should be grouped based on session time, I straight away had another requirement completed again without requiring any code.

schedule grouping

Implementing the remaining features

With the XamList ticking of the majority of my requirements, it left only 2 major features left that required coding:

  • Caching
  • Favourites

Favouriting sessions had already been roughly implemented in the conference starter kit. However it only saved sessions when the app is tombstoned, not when you closed an app or under a few other conditions. I fixed up the favourites code, changed some icons, etc.

To solve the caching feature, I simply stored the collection holding the session data direct in isolated storage and then loaded it back up the next time the app started

IsolatedStorageSettings.ApplicationSettings.Add("SessionData", sessionCollection); 
IsolatedStorageSettings.ApplicationSettings.Save();

 

Final thoughts

If I had enough time, then I would have re-written this from scratch, rather than used the template. I ripped out a lot of the custom code in the template and replaced it with the features built into the XamList. It wasn’t until the 4th day, after replacing all the features that I realised “Oh, I didn’t actually need anything in this template, except for the favourites code (which I modified anyway). But as there was only 2 days until the deadline it was not worth it just for the sake of “application purity”.

Next time I’ll definitely be asking for a bit longer lead time / access to the OData feed. It was a mad rush to try and get it all completed in time, and resulted in lots of shortcuts to get things done in time which I still feel dirty about (e.g. messy code).

 

Screenshots

TechEd splash screensession searchingschedule groupingSession infospeaker info

By David Burela