We caught up with the team at Future Platforms who built the Domino’s Pizza app for Windows Phone and asked them all about how they designed, built and tested their app.  They also go into some detail on how they have implemented NFC and voice activation.

Where does the story start?

In 2012 Domino’s Pizza added Windows Phone to its range of m-commerce platforms available to their customers, with a Windows Phone 7 app we built for them. The app’s successful development was so popular with Domino’s that it became a prototype for the company’s mobile work going forward.

clip_image004

So in January 2013 we began work on a Windows Phone 8 version for them, looking to make the most of the platform’s advantages. We wanted to not only create a ‘Domino’s store in your pocket’, or even an e-commerce store in your pocket, but to take advantage of the new Windows Phone functionality available on WP8. For example, the menu is rendered within the Windows Phone panoramic interface, live tile notifications notify users of the latest meal deals on offer in their nearest store, NFC tags are activated and voice recognition technology can activate the app with commands such as ‘Domino’s, feed me’ or ‘Domino’s, I’m hungry’.

What technology did you use for developing the app?

The main development tools used were Visual Studio 2012 and Eclipse. VS2012 provides the development tools for coding and designing the interface as well as the tools for unit testing your code. Eclipse provided the development environment for the Java components and JavaScript components of the application.

GIT was used as the source control platform for the application code along with GIT Extensions on Windows as a UI to the GIT repository.

The Windows Phone Emulator provided with the Windows Phone SDK performed the bulk of the development testing although real phones were used for key features such as NFC and Voice Activation as well as being used by the test team.

JIRA was used to manage the sprints and story cards for the application and provide the general burn down etc. for the development.

What’s the dev team’s background? EG JavaScript/.NET etc.

Pascal, Delphi, COBOL, C/C++, VB, Java, C# - Main languages over the past 25 years!

JavaScript, HTML, Silverlight, Applet, ASP, ASP.NET, MVC, JSP, JSON/AJAX, PHP – Web languages

SQL Server (SSIS, SSRS too), Oracle, DB2, MySQL – Databases

TFS, VSS, GIT, SVN – Source control

There’s been lots of tech over the last 25 years but all of these one’s have at least earned me the odd penny or two! Sadly there’s even been some assembler in there too.

 

I understand you re-implemented the WP7 Dominos’ app onto your multiplatform JS architecture. So there is a managed code wrapper hosting cross-platform JS in the WP8 app. Can you give us more detail on this?

Developing applications that are functionally consistent and can run on multiple platforms whilst being able to capitalise on the enhanced features of each platform requires some consideration of architecture. Pushing too much business logic into a service tier can restrict and limit the capabilities delivered by the application in regards to the phones features while writing core logic specifically for each platform reduces code re-use. As core logic needs to be shared across platforms a common layer was needed to work with the Dominos web service layer (.NET with SQL server). By using GWT, Java code is compiled to execute as JavaScript functions on each platform providing a common and consistent wrapper around the service information. The benefit of this is that the interpretation of the service data is the same regardless of whichever platform is being used. Rather than using a web UI through a browser interface the native and more functionally rich UI layer can be written using native techniques with the benefit of using platform features. This offers a very high level of re-usability, reduces the amount of testing required, reduces the amount of maintenance, allows for new functionality to be implemented more rapidly and delivers a very stable middle tier in the application whilst allowing for the benefits of rich platform features such as Live Tiles, NFC and Voice Activation on the Windows platform. This also means we can take advantage of all the platform tools for development and testing too.

 

How did you implement the voice activation? What were the challenges?

Voice activation itself is straight forward to implement and the technology examples and documentation provide reasonable information on the process for supporting voice activation. Testing was quite funny to see as various members of the team shouted various commands at their phones - I’m not sure I could emulate an Irish accent myself though!

As part of the implementation we wanted to provide the capability to dive into the application with deep linking too so commands such as “Dominos give me a deal” could be implemented in the future to take the customer directly to current deals for example. This aspect provides the app with a fun feel for the user and hopefully makes them feel happy when they use this feature to interact with the application and their device.

How did you implement the NFC functionality? What were the challenges?

As a relatively new technology the implications of what can be achieved are not fully realised at present. There are two primary ways in which the technology can assist the user and in the Dominos application we have both approaches in play; firstly as an embedded tag scan which allows the user to scan a tag at a specific point in time - when they’re on the voucher view. Secondly, as an application launch tag which can be used to launch the application – in this case to save a voucher for use later or to take the user to a meal deal. There is a lot of potential for this capability so the features provided by the application may be expanded in the future. Being able to save multiple types of voucher to save money on orders or perhaps being able to drop products into the basket by simply scanning a menu demonstrate how the technology can assist with the users experience of building and placing an order – making it easier.

The implementation itself relies on the same deep linking capabilities mentioned earlier. As with the voice activation features good information exists to assist with the code required to implement the NFC features. The bigger challenge is thinking about how the feature can aid the user and how to make that relevant and if possible fun for the user.

In order to develop and test this feature we needed two extra components that don’t currently come out of the box with Visual Studio or the emulator. The first is the tags themselves as the emulator doesn’t appear to provide any capabilities for mocking an NFC event so you need some real tags to test with. The second component is being able to write the information we desire to the tags. Some third party tools are available for this but we found the example tag writers provided on the MSDN better for our purposes.

Each time we demonstrated the apps NFC features they were received very well and our tags left with the audience and copies of the app!! It’ll be great to see some posters or menus that use these features.

 

What are the key things you need to consider when building an app on any platform?

The UI needs to be consistent through-out so the user is always sure and comfortable with the choices available to them and what they can do to interact with the application and achieve their desired objectives. XAML provides great support for UI consistency with templates and styles that allow for re-use. These assets can also be re-used on other Windows platforms too.

Consider how the interesting technologies provided by the platform can assist your user with how they interact with your app; to make tasks quicker and easier or to make tasks more fun and interesting. “Shake me” to add some sides might be a useful short cut in the application but it might also frustrate the user if it happens in error so don’t use a technology feature just because it’s there.

If it can’t be slick then make it easy; in some places you may need to collect a reasonable amount of information from the user so try to make it as painless as possible.

As with any application the internal architecture of the application itself is important so the application remains responsive every time the user performs a task. Consider your deep linking functionality upfront as this will also help to keep your implementation cleaner and more focused. Async, async, async – make sure everything that can be performed in the background is performed in the background.

Had you built on the Windows platform before the Windows Phone 7 app?

No, this was my first real foray into the Windows Phone platform but it won’t be my last. The use of XAML for presentation, the ability to build using Visual Studio and the power of using SOA platforms to deliver data along with the fun features of the phone itself present interesting options for extending desktop applications to mobile users. With the added benefit of being consistent with Windows 8 and the emerging surface hardware it should be an interesting and fun time for .NET developers.

What was your preconception of working with Windows? How did that differ from the actual experience?

Visual Studio has been the best development IDE for me for the past 10 years so I was expecting the development process to be straight forward and consistent as with any other .Net development. The emulator was nice to work with although some features appear to be missing from this at the moment. Next for me will be a game for my son!

What would you say to other JavaScript developers who might be sitting on the fence as far as Windows 8 development is concerned?

Get involved. Currently Windows Phone has a smaller market share than other platforms but that’s also a great opportunity to get your app recognised on the platform early. The devices running Windows Phone 8 have been improving too so they really can compete against the phones that run other platforms. With the added benefits of the Windows desktop market and the Xbox gaming platform your app can reach a very wide and diverse audience not being restricted to just the phone and tablet. That said the tablet themed devices such as Surface Pro that can run a full Windows 8 desktop are starting to appear so we now have a tablet that can do more than play games, surf the internet or read email.

I can imagine it won’t be too long before I can order a pizza directly from my Xbox, flick through the menu by gesturing at the Kinect and then back to my movie!

What's different about Windows from other platforms you've built on (good and bad)?

Tools for me have been a key feature of the Microsoft technology stack. Visual Studio is slick and efficient and provides just about everything you could think of for developing just about any type of application you could imagine. For business applications the ability to develop secure and scalable back-office applications with front-office components built in the one technology and then deploy those features to users through a range of different devices from Phone and Xbox to tablets, laptops and desktops – it represents a very unified corporate world.

What would you say was the one big thing that surprised you about developing an app for Windows Phone 8?

It’s really, really straight forward. Anyone that has any level of .NET knowledge should be able to get up and running very quickly. The tools help make the development process more fun than building Android or iOS although the tools for these have both improved massively in the last couple of years.