MSDN UK Team blog

Get all the latest Microsoft developer news, tools, downloads, tutorials and tips right here, every day.
Search Form
Unfiltered HTML
Developers code with microsoft

Roaring for the Lions: Creating a reusable, extensible app development platform using Windows Azure

Unfiltered HTML
Unfiltered HTML

Roaring for the Lions: Creating a reusable, extensible app development platform using Windows Azure

Rate This
  • Comments 1

The Project

In January of this year, Sequence teamed up with Microsoft to deliver an immersive, cross-platform mobile application for the British and Irish Lions promoting their 2013 tour of Hong Kong and Australia.

As we started to investigate the requirements for the project, it became apparent that what the Lions really needed was a way to be able to store and manage their content in one place, and then have that content pushed out to mobile apps running on a variety of different platforms. Not only did the content of the apps needed to be regularly updated, but also the structure too – we needed to be able to rearrange content, adding and removing hub pages and section pages without lengthy and time-consuming app store submissions. The content and structure had to be easy to maintain, regularly updated, downloadable over a 3G mobile connection and made available offline in case users were roaming outside of network coverage.

The Solution – Server Side

What we really needed was for our apps to behave like a traditional website, with a content management system allowing the user not only to create their content pages but also create new sections and organise them on their main navigation. So we set up an Umbraco CMS instance and hooked it up via the excellent uMapper plugin to a RESTful JSON Web API. This meant that the content tree in the CMS could, as well as being deliverable to the web via normal Umbraco content templates, also be delivered over web services as JSON-serialized .NET objects. Our apps then consume these web services and dynamically build their section and content screens based on the content tree in the CMS.

clip_image002

We wanted to host the server-side components within a cloud service in order to benefit from the scalability, simplicity and reliability benefits. The Azure platform offered us all the services we needed to manage and deliver our content while minimising the effort required to develop our custom services. The high level architecture of the final solution is as follows:

· The Umbraco CMS instance and Web API are hosted within an Azure Web Site instance, with the actual data stored in a SQL Azure database.

· A worker role performs periodic tasks such as the importing of data from 3rd party data sources, image processing and thumbnail generation. While much of The Lions’ content was created within the CMS, most of the news items and game data (team lineups, live commentary, game stats, etc) was pulled in from a RESTful JSON service provided by Sotic.

· We modified Umbraco so that images uploaded to the CMS are stored within Azure blob storage. A unique ID is generated for each image and placed on a blob storage Queue to be processed by the worker role, which generates several scaled down versions of the image. URLs to images are delivered via the WebAPI allowing the apps pull images from blob storage via the Azure CDN.

· We also modified Umbraco so that videos which are uploaded into the CMS are processed through an Azure Media Services workflow. This transcodes the video, creates thumbnails and generates HLS and Smooth Streams for delivering the videos to the applications.

· Rather than connect directly to the WebAPI provided by the Azure Web Site, the apps connect to an Azure Web Role which implements the same RESTful JSON interface and passes requests to/from the Web Site. This allows us to perform a number of optimisations which includes using the Azure CDN as this is not yet compatible with Azure Web Sites.

The Solution – the apps

This solution involved some fairly complex logic in the applications themselves, particularly around content caching – the apps needed to ensure their content was up-to-date without incurring undue data charges, and whilst ensuring the app remained responsive and usable offline. Since the Lions apps are available on seven platforms (Windows 8, WP7, WP8, iPhone, iPad, Android phone & tablet, and Kindle), we really didn’t want to have to write and maintain this logic in multiple native applications; but we wanted the apps to feel like native apps on each platform, to reflect the platform design principles, and to have access to platform-specific features.

With this in mind, we placed as much common application logic as possible into .NET Portable Class Libraries, which we then re-used across platforms using Xamarin and MvvmCross. This meant that we only had to write our web service integration layer once, and that we could use standard .NET JSON parsing libraries to do so.

Not only did this code re-use make the whole project more maintainable and extensible, but it also saved us weeks of development time. Given the very short time-scales for the Lions apps (less than three months from the first line of code to our first release), we simply could not have delivered a rich native experience across all platforms without the common core.

The Future

The Lions apps created a challenge for us architecturally, but at the same time created an opportunity for us - to turn the core architecture of the Lions’ apps into a reusable platform which would allow us to rapidly deliver cloud managed, multi-platform applications. This platform could even be made available to other developers in the future to aid them in building their own content-rich, updatable applications.

Now the tour is well underway and the application has received over 180,000 downloads, that is exactly what we are now setting out to do. We are building a core product that will work out of the box to allow CMS-driven creation of application structure and basic content pages with images and videos on all platforms. The product will be extensible, allowing us to add custom views and application functions that may be required for individual future projects.

Since we are using standards-based web services, it will also be possible to use our Azure-hosted services to power other bespoke applications including mobile apps and web sites. We hope to make these services available via the Windows Azure Store allowing anyone to benefit from the platform within their own applications.

About the Author: Stephen Dunford

Sclip_image004teve is a developer with nine years of application development experience. He works on the mobile apps team at Sequence, a digital agency in Cardiff, and has been part of the team responsible for the architecture and implementation of the British and Irish Lions Tour 2013 apps.

 

 

If you would like more information about the making of this app please pop over to the sequence website. http://www.sequence.co.uk/case-studies/british-irish-lions

  • Mobile apps are changing the business, social, and lifestyle landscape. The numbers are staggering, as you’ll see in this video, and the implications are stark. Without a mobile app to compliment your Internet presence, you are practically invisible.

    <a href="www.devicebee.com/">best Mobile apps developer dubai</a>

Page 1 of 1 (1 items)
Leave a Comment
  • Please add 4 and 3 and type the answer here:
  • Post