<<

JSON Document management application to support a real-time mobile quiz application.

A dissertation submitted in partial fulfilment of the requirements for the degree of Bachelor of Science (Honours) in Software Engineering

by

Julian Wreford

15st January 2016

BSc – Software Engineering Cardiff School of Management Cardiff Metropolitan University, Llandaff, Cardiff, South Wales, United Kingdom

i

Declaration I hereby declare that this dissertation entitled Systems of Logic Based on Ordinals is entirely my own work, and it has never been submitted nor is it currently being submitted for any other degree.

Candidate: Julian Wreford

Signature:

Date:

Supervisor: Stuart McNeil

Signature:

Date:

ii

Abstract With the growth of mobile devices and availability of mobile applications from games to utilities they have become part of everyday life. Real time mobile quiz applications have also been increasing in popularity over recent years and are now available across all smartphone and tablet devices.

This project introduces quiz topic category specialisation to a real-time mobile quiz application and covered the developed of a document management application that produces and manages quiz question documents in JavaScript Object Notation in support of the quiz. This project also produced a fully functional mobile quiz application and a server- side component to support this. The aim of this project was to develop a document management application to produce JavaScript Object Notation question documents and answer the question could the document management application produce these question documents in a way that can support a real-time mobile quiz application.

Development methodology combined a mix of the Spiral Model and Software Prototyping and this project used user testing and performance testing evaluations in assessing its success.

From the user testing results it was found that using the document management and mobile client applications proved quite challenging due to difficulties users had navigating and using them. This fact highlighted future work to improve this. Other results from user evaluation revealed that the mobile quiz application worked well and to expected standard in terms of performance speed. Technical evaluation speed tests carried out on the server application, corroborate user evaluations, it found the server was able to query a database and produce question documents to facilitate a mobile quiz game within the expected times.

iii

Acknowledgements

I would like to thank my project supervisor Stuart McNeil, for his advice and support during this project.

I would also like to thank the participants who dedicated their time and gave valuable feedback for the purposes of project evaluation.

iv

Table of Contents Table of Contents ...... 1 Figures and Tables ...... 4 Chapter 1 - Introduction ...... 7 1.1 Project Overview ...... 7 1.1.1 Project Aim ...... 7 1.1.2 Project Objectives ...... 7 1.1.3 Minimum Application Functional Requirements ...... 7 1.1.4 Minimum Application Performance Requirements ...... 9 1.1.5 Project Deliverables ...... 10 1.2 Project Outline ...... 10 1.2.1 Development of Ideas ...... 10 1.2.2 What’s New? ...... 11 1.2.3 Project Timeline ...... 12 1.2.4 Evaluation Approach ...... 12 1.2.5 Project Planning ...... 13 1.2.6 Project Methodology ...... 14 1.2.6.1 Spiral Model ...... 14 1.2.6.2 Software Prototyping ...... 15 Chapter 2 – Background Research ...... 15 2.1 Mobile and Application Industry ...... 15 2.1.1 Mobile Application Market ...... 15 2.1.2 Smartphone Market ...... 16 2.1.3 Mobile Industry Trends...... 16 2.1.4 Monetisation Business Models ...... 16 2.1.7 Quiz App and TV Trend ...... 16 2.1.8 Areas for Future Growth ...... 17 2.1.8.1 Industry Predictions ...... 17 2.2 Mobile Application Development Platforms (MADP) ...... 18 2.2.1 Native Development ...... 18 2.2.2 Cross-Platform Development ...... 19 2.3 Real-Time Mobile Quiz Application Technologies...... 21

1

2.3.1 Study of Existing Real-Time Mobile Application Quizzes ...... 21 2.3.1.1 Quiz Up ...... 21 2.3.1.2 Trivia Crack ...... 22 2.3.1.3 Quiz Clash ...... 23 2.3.1.4 Conclusion ...... 24 2.5 Mongo NoSQL Database ...... 24 2.5.1 Documents ...... 25 2.5.2 Collections...... 25 2.5.3 Arrays and Indexing ...... 26 2.6 JavaScript Object Notation (JSON) ...... 26 2.6.1 Data Types ...... 26 2.6.2 Key Value Pairs ...... 27 2.6.3 Documents ...... 27 2.7 Integrated Development Environments ...... 28 2.7.1 Microsoft Visual Studio Professional 2013 ...... 28 2.7.2 Unity IDE ...... 28 2.7.3 Eclipse IDE ...... 29 2.8 Programming Languages ...... 29 2.8.1 C# Programming Language ...... 29 2.8.2 Java Programming Language ...... 29 2.9 Unified Modelling Language (UML) Class Diagrams ...... 29 Chapter 3 –Application Design & Preparation ...... 30 3.1 JSON Document Specification and MongoDB Hierarchy ...... 30 3.2 Document Management Application ...... 38 3.3 Mobile Quiz and Server Application ...... 39 3.3.1 Agile Software Development and MoSCoW ...... 39 3.4 User Application Testing Scenarios ...... 40 Chapter 4 – Application Development ...... 40 4.1 Overview...... 40 4.2 Functionality ...... 41 4.3 DMA Development ...... 41 4.3.1 Additional Reference Libraries ...... 41 4.3.2 TV Show Episode Lists and MetaTags ...... 41

2

4.3.3 Generate C# Objects from JSON Specification ...... 44 4.3.4 Saving and Reading JSON Documents ...... 46 4.3.5 Additional Functionality ...... 47 4.4 Server Development ...... 48 4.4.1 Additional Reference Libraries ...... 48 4.4.2 Server Initialisation and MongoDB Connection ...... 49 4.4.3 Game Zone and Game Rooms ...... 51 4.4.3.1 Game Zone ...... 51 4.4.3.2 Game Rooms ...... 52 4.4.4 Turn Based Game Management ...... 53 4.5 Client Development ...... 55 4.5.1 Establishing a Connection ...... 55 4.5.2 Starting a Quiz Game ...... 57 4.5.3 Playing a Quiz Game ...... 57 Chapter 5 – Evaluation ...... 59 5.1 Observation methods ...... 60 5.1.1 DMA and Mobile Client ...... 60 5.1.2 Data ...... 61 5.2 DMA Results ...... 61 5.2.1 Evaluation Results ...... 61 5.2.2 DMA Questionnaire Results...... 62 5.3 Client Results ...... 64 5.3.1 Client Evaluation Results ...... 64 5.3.2 Client Questionnaire Results ...... 64 5.4 Server Evaluation ...... 66 5.4.2 Server Results ...... 66 5.5 Discussion ...... 67 5.5.1 Aims ...... 67 5.5.2 Objectives ...... 67 5.53 Minimum Functional Requirements ...... 68 5.5.4 Conclusion ...... 68 Chapter 6 – Future Work ...... 68 6.1 DMA ...... 68

3

6.2 Server...... 68 6.3 Client ...... 69 Bibliography ...... 69 Appendix A – Personal Reflection ...... 73 Appendix B – External Materials ...... 74 Appendix D – Ethics Approval ...... 74 Appendix D – Client Prototype UI Drawings ...... 84 Appendix E – Client Prototype Mock-up Screens ...... 88 Appendix F – Client Screenshots ...... 92 Appendix G - Document Management Application Screenshots ...... 97 Appendix H – UML Class Diagram ...... 102 Appendix I – Return List of Buddies in Server Zone Code ...... 104 Appendix J – Query Database Code ...... 106 Appendix K – Extract Ten Questions Code ...... 108 Appendix L – Generating Java Objects from JSON Code ...... 110 Appendix M – Game Room Timer Tick Code ...... 111 Appendix N – Server Directory Structure ...... 112 Appendix O – Project Task List...... 113

Figures and Tables Figure 1 Main Categories & Figure 2 Specialist Categories ...... 11 Figure 3 QuizUp Menu & Figure 4 QuizUp Game Screen ...... 22 Figure 5 Trivia Crack Profile & Figure 6 Trivia Crack Game Screen ...... 23 Figure 7 QuizClash Turn Screen & Figure 8 QuizClash Game Screen ...... 24 Figure 9 Simple JSON example ...... 25 Figure 10 JSON example 1 & Figure 11 JSON example 2 ...... 26 Figure 12 JSON example 3 ...... 27 Figure 13 JSON example 4 ...... 28 Figure 14 MongoDB hierarchy ...... 31 Figure 15 JSON question example ...... 33 Figure 16 Game event sequence ...... 34

4

Figure 17 JSON graphic 1 ...... 35 Figure 18 JSON graphic 2 ...... 37 Figure 19 JSON graphic 3 ...... 38 Figure 20 DMA show details ...... 42 Figure 21 DMA episode number arrays ...... 43 Figure 22 DMA episode name array ...... 43 Figure 23 DMA MetaTag ArrayList ...... 44 Figure 24 DMA MetaTag UI display ...... 44 Figure 25 DMA question forward and backward buttons ...... 45 Figure 26 DMA RootObject class code ...... 46 Figure 27 DMA Question class code ...... 46 Figure 28 DMA de-serialise JSON code ...... 46 Figure 29 DMA admin login panel ...... 47 Figure 30 DMA upload JSON options screen ...... 48 Figure 31 Server configuration file ...... 49 Figure 32 Server client Singleton initialisation code ...... 49 Figure 33 Server client options code ...... 50 Figure 34 Server MongoDB connection code ...... 51 Figure 35 Server room creation code ...... 52 Figure 36 Server get database and collection code ...... 52 Figure 37 Server query and timer code ...... 53 Figure 38 Server byte message code ...... 54 Figure 39 Server broadcast byte message code ...... 55 Figure 40 Client initialise connection code ...... 55 Figure 41 Client initialise listeners code ...... 56 Figure 42 Client join room code ...... 57 Figure 43 Client user joined room code ...... 57 Figure 44 Client begin quiz message code ...... 58 Figure 45 Client de-serialise JSON question code ...... 58 Figure 46 Client read question data code ...... 58 Figure 47 Client send players answer code ...... 59 Figure 48 Client build answer byte message code ...... 59

5

Figure 49 DMA task flow diagram ...... 60 Figure 50 Client task flow diagram ...... 61 Figure 51 DMA task #1 speed results chart ...... 62 Figure 52 DMA task #1 error results chart...... 62 Figure 53 DMA Functionality questionnaire results chart ...... 63 Figure 54 DMA Tasks questionnaire results chart ...... 63 Figure 55 Client task #1 speed result charts ...... 64 Figure 56 Client task #1 error result charts ...... 64 Figure 57 Client functionality questionnaire results chart ...... 65 Figure 58 Client task questionnaire results chart ...... 66 Figure 59 Server question generation speed chart #1 ...... 67 Figure 60 Server question generation speed chart #2 ...... 67

6

Chapter 1 - Introduction

1.1 Project Overview

1.1.1 Project Aim Although mobile quiz applications are very popular, they lack any specialised category topics of questions for a player to choose from. To date, no specialised mobile quiz applications have been released that offer this specialisation. This aim of this project is to develop a document management application (DMA) to support a mobile device quiz application with specialised quiz topics. The DMA will produce and manage complex quiz question documents in JavaScript Object Notation (JSON) in support of the quiz. This project will also produce a fully functional mobile quiz application and a server-side component. The mobile quiz application will allow a player to not only be able to select a quiz topic to play but also offer sub-topic specialisation within that chosen topic. E.G. if a player chooses Breaking Bad as a category they will also have the option to select a sub-category within that category such as some of the favourite characters from the show, a particular season or trivia around the production of the show.

1.1.2 Project Objectives The objectives of the project are a number of specific tasks that will need to be completed to produce a fully operational mobile quiz application. The project deliverables will be three application solutions which are a client-side mobile device application, server-side application and a document management application.

1.1.3 Minimum Application Functional Requirements Document Management Application (DMA) The DMA will be used to create the quiz question data that is required for a quiz. Question data comprises of the question, -tag data relating to the question, answer and two other possible answer options. This data will be save to JavaScript Object Notation documents (JSON) to the local machine on which it is run. The DMA will manage and package all question data for a particular TV show. Packaged JSON documents will contain all the question data for a season of a TV show. The season is comprised of each episode for that season, each episode will contain all the question data for that particular show.

 Allow the question, answer and two possible options to be inputted

7

 Allow meta-data relating to the question to be inputted  Allow a user to select which episode they want to create questions for  Allow a user to select which season they would like to create questions for  Allow a user to save question data  Allow a user to edit a question  Package all question data to JSON documents in the specified schema  Include English dictionary spell checker  Limit the question length to 120 characters  Warn user when they get close to question length limit  Limit answer and the two possible options to 45 characters  Allow a user to cycle forward or backward through any previously created questions and update the UI with the question data  Display a question counter for each episode  Display message to user when the have reached the required number of questions needed for each episode Server Application The server application component will be responsible for handling and responding to requests from the client. The server will interact with client side apps using binary protocol running over TCP. The server will listen for incoming requests from a client requesting a game and then allocate the client a room where another client will be waiting to play or to wait while another client is allocated the same room. When the game room is full the server will then notify the clients that a new game is starting and broadcast questions simultaneously to both clients.

 Receive new game requests from clients and allocate them to a room  Create and delete rooms when required  Retrieve quiz question data from a Mongo database  Broadcast question data to client s during game  Receive client responses to questions during game  Allocate scores and announce a winner at the end of a game Client Application The client application will display a number of quiz topics and its sub-topics for a players to choose from. Players will be able to select their favourite topics to play from the list. The client will then communicate a new game request and transmit this to the server who will then allocate them to a room. The client will then display the game screen, question data and wait for a players answer. The client will display the winner of the game.

 Display a list of quiz and sub-topics to players to choose from  Request a new quiz game to the server  Accept question data from server and display in UI  Accept player answers to quiz and transmit this to server  Receive game results from server and display in UI

8

1.1.4 Minimum Application Performance Requirements Document Management Application

 Effectiveness The DMA application has to deliver its main functionality of creating and managing JSON documents to support the quiz application. The JSON documents should be formatted to the JSON document schema specification outlined and contain all the question data specified.  Scalability The application should scalable. The application should allow its functionality to be extended and have the ability to accept new modules.

Server Application

 Connection Resiliency With data connectivity being an issue on mobile devices the server must have the ability to recover from a lost connection. When a client connection error occurs the server will raise an error indicating whether the error is recoverable or not. If the error is recoverable error and if connectivity has been restored the client should be restored to its last state. Additionally the server should also notify the other client in the room that the other user has been paused or having connectivity issues. After a specified time, if the client is unable to be restored then the server should notify the other client in the room that they have left.  Client response time The client and server should communicate using a TCP binary protocol when exchanging messages. The TCP protocol should be used because it can guarantee delivery of packets efficiently and in order. (Tcpipguide.com, 2016).  Database response time The server should be able query a remote Mondo database seeking question data under approximately 200 milliseconds.

Client Application

 Connection Resiliency With data connectivity a major issue on mobile devices the client must have the ability to recover from a lost connection. Client should attempt to recover a recoverable connection with the server when a connection error is raised. If connectivity is not restored straight away then the client should try to reconnect every 60 seconds for a maximum or three attempts before terminating the connection.  Response time The client and server should communicate using a TCP binary protocol when exchanging messages. The TCP protocol should be used because it can guarantee delivery of packets efficiently and in order. (Tcpipguide.com, 2016).

9

 Interoperability The client application should be built for the Android platform but should be developed with interoperability between platforms. As a cross-platform app further work will enable deployment to additional platforms.

1.1.5 Project Deliverables The main aim of this project involves the development of a document management application to support a mobile quiz application. The outcome of this project will result in three applications: DMA, server and client. Project deliverables:  A DMA application which allow users to create questions for a quiz.  A web server that serves as match maker and manager of real time turn based quiz game.  A mobile Android quiz application developed with the minimum functionality achieved.  The project report which contains the research and development of the software implementation and how it was evaluated.

1.2 Project Outline

1.2.1 Development of Ideas The idea of a mobile device application for playing opponents in real-time quizzes is based on existing applications that utilise client – server technology. The concept of using mobile devices to play opponents in real time quizzes is no longer new. With familiarity of the client server technology this project introduces new features to existing real-time mobile quiz applications. At the start of this project a set of aims were listed to help define the project ideas. The keys to this project success is dependent on being able to deliver a real-time mobile device quiz application that has additional features to commercial products and the development of a document management application that is able to produce the JSON documents to support this. The technological scope of this project:

 Development of the document management application that will allow a user to create quiz questions. The application will manage these questions and save then locally in the JSON schema specified.  Development of a Java server application which will be hosted remotely on an Amazon Web Service. The server will provide all the functionality of player matchmaking and management of quiz games. The server will access a remote Mongo database to retrieve all question data for a quiz.  Development of the mobile application which will provide a user interface for users to be able to select a quiz topic of their choice and then select a specialised

10

sub-topic for the quiz. The application will also allow a user to challenge a random opponent in a real-time head-to-head match of 10 rounds.  Management including setup of a Mondo database which will be remotely hosted on an Amazon Web Service. The database will store JSON question documents that were created with the document management application and allow the server access to these for the purposes of a quiz.

1.2.2 What’s New? The project introduces quiz topic category specialisation to the mobile quiz application. Users are presented with a list of quiz categories to choose from. When a category is selected users are then presented with a list of specialised quizzes from within that category. This category specialisation offers a greater number of quiz topics within a category for users to choose from. Figure 1.1 displays an example of a list of main categories topics. Figure 1.2 displays an example of a list of sub-categories displayed to a user if they selected Game of Thrones.

Figure 1 Main Categories Figure 2 Specialist Categories

The idea of topic speciality adds a major benefit to the quiz application, question cross population. This means that a question can be added to more than quiz sub-category. For example, a quote question spoken by Arya Stark in the TV show Game of Thrones (see Figure 1.1 and 1.2) can populate sub-category quizzes in the Game of Thrones

11 category for ‘Arya Stark’, ‘House Stark’ and ‘Quotes’ quiz topics. The benefits of cross population of questions are given below:

 Questions only need to be stored once while being able to populate many quizzes  Users have a greater choice of playable quizzes to choose from In determining the quiz applications operability and functionality critical comparisons were made against existing mobile quiz applications to identify potential areas of improvement or possible new features. Detailed reviews of existing mobile quiz application are discussed in Section 2.3.

1.2.3 Project Timeline The project spanned a total of 29 weeks.

 Devise possible user case scenarios for mobile and documenting management applications usage (to be completed by week 8)  Complete specification of JSON schema format for question data (to be completed by week 10)  Complete development of document management application (to be completed by week 12)  Test and deploy Mongo database to remote server ((to be completed by week 15)  Complete development of server application (to be completed by week 18)  Complete development of mobile client application (to be completed by week 20)  Integrate server, database and client applications (to be completed by week 22)  Evaluate quiz and document management applications operability and functionality (to be completed by week 25)  Final submission (to be completed by week 29)

1.2.4 Evaluation Approach There are several approaches to ensure that the necessary requirements of a software project objectives are met. As the nature of this is very much based on the physical implementation and development of the idea of creating a document management application to produce JSON documents that contain question data, to support a mobile quiz application. The approach used to assess successful metrics are based around application development. They include performance testing and getting feedback from user evaluation and using gold standard approach (Dellshaft and Staab, 2006) to compare against existing commercial applications.

12

Highlighted below are the two methods of project evaluation that will be carried out, full details of the evaluation methods will be discussed in section 5 of this report. User Testing Evaluation The major evaluation of this project will involve user testing. Users will be observed performing a set of tasks on the mobile client and DMA application developed. These users will then complete a questionnaire to gain quantitative information on how these applications were used to assess their performance and practical use. Users will be asked to carry out a set of specific tasks to determine application specific functionality, usability and possible improvements. Performance Testing Evaluation This evaluation will look at the client, database and server applications. This includes minimum performance requirements. This stage will also look at the issues regarding performance metrics such as application speed, response times and lag time. This information will provide a reliable indicator to ensuring that the applications run to expected standards.

1.2.5 Project Planning In order to plan and manage the project to meet the objectives, it was decided to use the Step Wise project planning method (Hughes and Cotterell, 1999: 19-36) was utilised. The step wise approach to planning software projects is a framework which uses a number of steps that need to be taken when planning. This technique was used as a guide during project planning but only some of the steps of the methodology were needed. These include:

 Identify project scope and objectives At this stage of project management the objectives involved and the project scope must be agreed on by all parties. Identification of effective practical measures concerning meeting these objectives must be identified at the stage. Initial discussions with my supervisor tried to establish a goal that is achievable and measurable.

 Identify project infrastructure This stage it is important to identify all groups involved in the project to ensure clear structure and responsibilities. In the case of the project, stakeholders are made up of myself and my supervisor. I have direct managerial control over the entire project lifecycle. Other groups involved are test users who fulfil the role of application testing.

 Analyse project characteristics One of the objectives in this step of project management is to distinguish the project as either objective or product driven. As this major objectives and aims of this project is mostly product driven the underlying objectives need to be met.

13

 Identify project products and activities This stage of planning involves identifying the project products (or deliverables) and the activities that will be needed to take place. Identifying these products/deliverables helps ensure the activities needed to be carried out have been identified. One of the main functional requirements of the document management application is that it must be able to package question data to JSON documents in the specified schema. In the case of producing the document management application the following activity has been identified: . Specification of JSON document format for saving question data

1.2.6 Project Methodology To establish a standard method and guidelines a project methodology was chosen. This would encourage a discipline in a consistent purpose driven manner. The project is heavily based on developing software applications to meet objectives so decided to choose a combination of two methodologies. It was decided that a mix of the Spiral Model and Software Prototyping (Hughes and Cotterell, 1999: 67-71) would be used to manage the project.

1.2.6.1 Spiral Model The spiral model combines the idea of an iterative development approach similar to the basic waterfall model and sequential linear development model. It allows for an iterative approach to the project application development and offers refinement through each iteration around the spiral. The continuous refinement through each repetition of each of the four phases proves crucial in software development. One of the advantages of the Spiral model is that it allows for additional elements to be added to software project during development. As the project grows there may be situations where additional functionality may need to be added. The four phases of the spiral model are:  Planning phase Requirements are studied and gathered including feasibility study  Risk analysis phase Requirements are studied to identify potential risks  Construct or Build phase Actual development and testing of the actual product  Evaluation phase Analysis including estimating, identifying and monitoring risks (www.tutorialspoint.com, 2016)

14

1.2.6.2 Software Prototyping Software prototyping is becoming popular as a development model, as it provides developers with an opportunity to demonstrate the functionality of the product at an early stage. A prototype also helps validate understanding of the system requirements without having to implement exact logic of the software. The idea for the project is to develop an early Evolutionary Prototype (Hughes and Cotterell, 1999: 67) and iteratively modify until it has reached a state of full functionality. This approach was chosen because of the following reasons:

 Improved user involvement as they are actively involved in design decisions  Improved learning of the system as it is available for testing early on, this is not possible with other systems  It allows validation, at an early stage, of requirements and provides a method of determining correct system functionality

Chapter 2 – Background Research

2.1 Mobile and Application Industry Dr Joel s. Engel of Bell labs received the first mobile phone call from Martin Cooper of Motorola on the 3rd of April 1973. The device measured (23 x 113 x 4.45) cm and weighted 1.1kg. (Rajput and Rajput, 2015). Today, the Willcom WX06A is considered to be one of the world’s smallest mobile phone. Its dainty dimensions measure (3.2 x 7 x 1.7) cm and weighs in at 32grams. (Compare My Mobile, 2014).

2.1.1 Mobile Application Market With the combination of mobile devices and availability of apps they have now become central to our everyday lives from productivity and utilities to commerce and entertainment now available across multiple devices. In 2015 Google Play US download numbers surpassed those of iOS App Store for the first time with game downloads a major driving factor with game downloads at 1.5x iOS downloads. The UK has also saw a significant increase in Google Play downloads rising 40% to 45% over year which narrowly overtook those of iOS in 2015. Dating apps such as , Pairs and Couples were popular with Tinder steadily amassing a large user base before finally launching subscription model Tinder Plus in 2015. Video streaming on mobile saw huge revenue growth with demand for streaming video via the Internet and app. HBO NOW launched which soared to the top of the worldwide revenue charts for iOS in April 2015 while YouTube and Netflix also launching subscription services in October 2015. (App Annie 2015 Retrospective, 2016).

15

2.1.2 Smartphone Market The global mobile phone industry continues to grow and evolve with cheaper and better phones now available at the fraction of the cost they were 10 years ago. As devices are becoming more affordable its impact is reaching an ever widening market with ownership is at an all-time high. The smartphone grew in 2015 Q2 by 13% year on year, with 341.5 million shipments, according to a Worldwide Quarterly Mobile Phone Tracker report from International Data Corporation (IDC). Android is the biggest platform with an 82.2% share. (www.idc.com, 2016).

2.1.3 Mobile Industry Trends The mobile economy is constantly growing and becoming an important sector that is slowly penetrating the global market. The app market in Indonesia, Turkey and Mexico saw significant growth in 2015 with Mexico and Turkey now in the top ten countries worldwide by downloads. (App Annie - The Next Horizon of Emerging App Markets, 2016). With Mexico being the largest of these markets the Turkish market made rapid gains with its adoption of smartphones, which is expected to reach 15 million by the end of 2015, and its thirst for digital content. (Sirt, 2016). Mexico saw a rapid rise in device ownership, in 2015, which resulted in an increase of 75% of total time spend using apps. This rise could be the result of the growth in the Mexican economy in 2015 who saw employment fall and its debt upgraded. (Gillespie, 2016).

2.1.4 Monetisation Business Models According to a survey released by App Annie and IDC in March 2015, the freemium model is the most popular business model to generate income from apps with in-app advertising following closely behind in second place. The third most popular method is paid-app purchases. (App Annie & IDC Mobile App Advertising and Monetization Trends, 2015).

2.1.7 Quiz App and TV Trend Quiz apps are among the most popular mobile apps, evidenced by the download rate that saw QuizUp got 3 million users within the first three weeks (Forbes.com, 2016) eventually QuizUp generated over 20 million users (Lawler, 2016) and Trivia Crack was the first game to have spent 60 consecutive days at the top of the U.S. download charts. (Grubb, 2015). Broadcasters are increasingly looking at ways to engage their audiences with online mobile content with several companies now offering online catch-up services and apps such as the BBC iPlayer, HBO Go, the Nick App, D17 Connect and developing show specific apps such as the WWE iPad/iPhone apps, Bones app, The Walking Dead Story Sync, The Vampire Diaries App, Team Coco. Broadcasters, partnerships are appearing between marketeers and app development companies as they look for new ways to engage audiences by using sites and apps (, , ,

16 tvtag, Telfie) and by partnering with third party apps to offer unique experiences linked to their shows like Shazam and QuizUp which augments what the audience is watching on the screen on additional devices. (Clark, 2016). French music television D17 introduced its audience to a new app that forms a major element to its second screen strategy. The app features can identify the TV show being broadcast on the main screen and deliver relevant content, in real-time, to the device which includes playlists, quizzes, contests and biographies of artists. (Kantarmedia.com, 2016).

2.1.8 Areas for Future Growth With the growth of emerging markets luring app developers and smartphone adoption investment is expected into their mobile technology infrastructures, but developing for these markets is not straightforward as old infrastructure frameworks still remain. Developers must design apps that perform on low bandwidth and also aware of cultural characteristics to maximise opportunities in these markets. (App Annie - The Next Horizon of Emerging App Markets, 2016). Apps are eating the web as they are increasingly becoming where users are spending more of their time. has been popular for companies who have yet to build their own app but with large retailers in North American and Europe have reported that basket spend in their app is far greater than the basket spend on the web and new device platforms, like Apple Watch and TV having no browser. Googles new surfacing and deep linking technology Now On Tap, indexes and links to content within app in an attempt to make apps behave more like the web. This new technology is expected to make the Android platform more attractive and market share for the platform is expected to increase. In 2016 growth is expected for 3rd party gaming and video streaming apps on tvOS The platform is expected to grab a significant share of user’s time and developers will look to tap into this emerging market with revenues expected to be much higher per app per user. (App Annie - Top App Predictions of 2016, 2015).

2.1.8.1 Industry Predictions With large young populations and growing smartphone market, Indonesia, Turkey and Mexico have solid investment options for technology investors and app publishers according to the App Annie Intelligence report “The Next Horizon of Emerging App Markets”. (App Annie - The Next Horizon of Emerging App Markets, 2016). The large growth predicted in these developing economies and a strong share in mature economies the global mobile gross revenue is predicted to grow to $51 billion in 2016 and exceed $101 billion in 2020. The adoption of smartphones is also the main factor for the predicted app download numbers which is expected to reach 284 billion in 2020 with much of this growth expected

17

to include both globally popular and locally developed apps. Apps will become a strategic importance of companies who want to drive engagement and loyalty as smartphones and tablets are expected to double from 2.6 billion in 2015 to 6.2 billion in 2016. With Apple and Google the driving force behind apps for technologies such as wearables, virtual reality, TVs and smart home devices there is an expected new wave of from factors on the horizon as these technologies are expected to mature. (App Annie - Where will the app economy be in 2020? 2016)

2.2 Mobile Application Development Platforms (MADP) Various mobile application development platforms (MADP) are available for developers to choose from for their projects. Which one they chose will depend on the app functionality requirements and what they want to achieve. Generally MADP’s are based on three technologies listed below:

 WebApp A WebApp are not really apps they are standard mobile that behave and is used like a native app and its build on web technologies. They are cross-platform and the advantage is cost, the downside is performance and poor UI compared to their Native App alternative.  Native App A native app is developed for a specific platform and used the frameworks technologies such as its specific SDK or development language. These include iOS, Android and etc. the downside is that developers need to build an app for each of the platforms separately, the benefits are developers have full access to the capabilities of the platform and able to provide a full rich app experience.  Hybrid App A HybridApp is an app that is developed in one language before being compiled to a platforms specific code. Generally they can offer the best of both worlds.

2.2.1 Native Development Native apps are specifically developed to target individual platforms. Developers the native platforms specific SDK and can take advantage of all the device capabilities such as compass, notifications, GPS, camera, contact list etc. as well as incorporating gestures.

 Native iOS Mobile Apple devices run the iOS operating system. Developers typically use the xCode IDE, which is free, to write software for Mac OS X such as iOS devices (iPhones, iPads and iPods), the Apple TV, and now the Apple Watch. The xCode IDE uses Apples Swift or Objective-C and C programming languages. (Developer.apple.com, 2016).  Native Android Developing applications for the Android mobile platform requires the Android software development kit (SDK). Androids SDK is available as a stand-alone tools

18

package. It is also included with the Android Studio IDE. Android Studio is Androids official IDE that is based on the IntelliJ IDE. (Developer.android.com, 2016).  Native Windows Phone To create a native app for Windows Phone developers will need to install the Windows Phone SDK. Developers use the Visual Studio IDE to write apps for Windows Phone 8, 8.1 or Universal Windows Platform (UWP). Visual Studio allows developers to produce apps using C++, Visual Basic or the C# programming languages. Development of Windows Phone Apps also use Extensible Application Mark-up Language (XAML). XAML is the code that sits behind the UI. (Msdn.microsoft.com, 2016).

2.2.2 Cross-Platform Development Cross-platform application development allows developers to target multiple platforms from a single development rather than building different native apps for each of the different platforms. In the past opting to develop cross-platform mobile apps often meant they would not be able to perform as well as their native alternative. But now with some of these performance concerns being addressed by the latest generation of cross-platform frameworks it is considered these compromises are minimal to non- existent. (Castle and Castle, 2015).

With some cross-platform development tools having limitations in terms of what they can deliver many focus on different specialities from gaming, security or for performance speed. Which platform a developer chooses depends on their app requirements, needs and goals.

List of some popular cross-platform development frameworks:

 PhoneGap PhoneGap is a free open-source framework that allows developers to produce mobile applications using web-development languages like, Hyper Text Mark-up Language (HTML), Cascading Style Sheets (CSS), and Java Script. PhoneGap is now supporting the Blackberry, Windows Phone, Android, iOS mobile platforms. It creates a web based application that operates as a native application but without a browser frame around it and have access to a set of native functions that make them work like native apps. (Phonegap.com, 2016).

App Type: . Hybrid App Benefits: . Simple Development: No need for complicated languages for coding skills in web technologies are enough . Plug-in Architecture: App functionality can be easily extended with its plug- in architecture . Code Re-use: Single code base for all platforms

19

Disadvantages: . Poor performance: especially if there are graphic elements in the app . Single Threaded: Built on JavaScript which is not multi-threaded so does not support background processing

 Unity Unity is a game engine which makes it a powerful tool for developing cross-platform applications for mobile, game consoles, desktop and the web. Unity comes in three formats, Personal (free) and Professional or Enterprise Editions. Unity mainly supports three programming languages UnityScript, C# and Boo and also supports Native Oculus Rift, Gear VR, and Playstation VR (Dotnetfoundation.org, 2016). On the 1st of April Microsoft announced that Unity is joining the .NET Foundation. This means that the latest .NET APIs, tools, and language features will be available to Unity developers. (Chambers et al., 2016).

App Type: . Hybrid App Benefits: . Platform Support: Great support for a wide variety of platforms . Great Graphics: Support for audio and advanced graphics that can be easily scaled down for mobile devices . Good performance: Great architecture that offers good performance . Code Re-use: Single code base for all platforms Disadvantages: . Complex Development: Time consuming and difficult to learn . Complex IDE: Can get easily unorganised with hierarchy structure and directory with too many folders and asset files

 Appcelerator Titanium Appcelerator is an open-source cross-platform JavaScript framework for mobile development platforms. Currently Appcelerator supports iOS, Android, Blackberry, HTML and Windows Phone platforms. Appcelerator offers three IDE’s they are Appcelerator Studio, Titanium Studio and Aptana Studio which are based on the Eclipse platform. (Wiki.appcelerator.org, 2016). There are three purchasing options available for developers to purchase licence seats they are: Indie, Team and Enterprise. (Appcelerator, 2012).

App Type: . Native App Benefits . Code Re-use: Can reuse between 60% to 90% of base for all platforms . Web Oriented: Beneficial for situations where the app has to interact with web services . JavaScript Based: Uses the common JavaScript programming language

20

Disadvantages . Memory Issues: If an application reaches a certain level of complexity developers complain of memory management issues and crashing apps

 Xamarin Xamarin offers a universal cross-platform IDE for building native apps for multiple platforms using a shared C# codebase. Xamarin supports Windows Phone, Android and iOS mobile platforms. Development with Xamarin is compatible some of the design patterns such as MVVM (Model View View Model) and MVC (Model View Controller). According to Microsoft Developer Network Xamarin shared codebase can achieve between 75% and 100% code reuse between platforms. (Msdn.microsoft.com, 2016). On the 31st March 2016, Microsoft Executive Scott Guthrie, announced Xamarin will join the .NET family and be included for free with all editions of Visual Studio. (Howse, 2016).

App Type: . Hybrid App Benefits . Native Access: Gives access to the native capabilities of each mobile device . Performance: Delivers high performance compiled code . API and UI: Uses the same APIs and UI controls which are used to build Android, iOS and Mac apps in their native platform specific languages Disadvantages . Resources: lot of operational overhead due to the linking of codes and referencing between the target operating system and the .NET framework . Non-Portable: Code will not transfer and cannot be reused for native or HTML5 applications for Android or iOS

2.3 Real-Time Mobile Quiz Application Technologies

2.3.1 Study of Existing Real-Time Mobile Application Quizzes Real time mobile quiz applications have been increasing in popularity over recent years and are now widely used across all smartphone and tablet devices. Several successful real-time quiz application experiences have been launched since 2012 which include QuizUp, Trivia Crack & Quiz Clash.

2.3.1.1 Quiz Up QuizUp is a developed by Iceland-based Plain Vanilla Games and released for iOS November 2013 with the Android version released in March 2014 and has generated over 20 million users worldwide. (Lawler, 2016)

21

QuizUp is a trivia app similar to the game Trivial Pursuit. It is a single player game where players compete against others, in real-time, during seven rounds of timed multiple choice questions. (Support : QuizUp, 2016). Highlights: • A huge variety of topics • Hundreds of specialised topics • Live chat with opponents or friends • A comprehensive overview of user stats

Figure 3 QuizUp Menu Figure 4 QuizUp Game Screen

2.3.1.2 Trivia Crack Trivia Crack was developed by Argentinian based company Etermax. Trivia Crack is a trivia game where users spin a wheel to decide which category a player will have to answer. Questions need to be answered in six different categories including Geography, History, Art, Science, Sports and Entertainment. In order to win a player must collect all of the characters, that each correspond to each of the categories. Trivia Crack was the first game to have spent 60 consecutive days at the top of the U.S. download charts. (Grubb, 2015).

Highlights: • Share achievements • Challenge friends to a duel • Chat live with opponents • Suggest, translate and rate questions

22

• Test knowledge in various areas

Figure 5 Trivia Crack Profile Figure 6 Trivia Crack Game Screen

2.3.1.3 Quiz Clash Quiz Clash was published and developed by FEO Media. QuizClash is a free social quiz app where users can challenge their friends and random opponents to general knowledge trivia games. There are six rounds of three questions in a variety of categories including film, TV, music, politics, sports, food, literature and geography. (FEO Media - Educating the world through casual gaming, 2016). Highlights: • 25,000+ questions • 20 categories E.G. TV Shows, Gaming, Music, and Food • User submitted questions. • Create own avatar

23

Figure 7 QuizClash Turn Screen Figure 8 QuizClash Game Screen

2.3.1.4 Conclusion The overall and functionality of the three apps including their design followed good practices were followed. These were identified as: . Layout of each screen is consisted and follows the theme throughout the app including text boxes and buttons. . All implement shut down process features which gracefully close and pause the app when receiving an incoming call and awaken the app again to enable game to continue. . Centralised navigation point within the app, meaning effective communication by allowing users to always return to the main menu screen. . Notification for users to receive updates to the app such as game challenge requests. . Good use of fonts and styles with supporting theme to maximise usage of small screen. There are many quiz type applications available to download from the various platform stores. The idea of this project is to include an additional feature not included in commercial application. This feature of specialised topics for users to choose from is not already available as a commercial product.

2.5 Mongo NoSQL Database Mongo databases were developed in response to the rising need to horizontally scale large databases to support modern applications. (MongoDB, 2016). Unlike traditional databases MongoDB’s are cross-platform, document-oriented and have dynamic schemas.

24

MongoDB is a powerful, flexible and scalable database that has the ability to dynamically scale horizontally. Horizontal scaling means that that a MongoDB can scale in size by simply adding more machines. MongoDB was designed to scale in this fashion by making it easy to increase its capacity by splitting up its data across multiple servers. EG when it news more capacity, new machines can be easily added. Unlike traditional relational databases which have to be scaled vertically. Scaling a relational database means it is scaled by adding more power to the central processing unit (CPU) and or random access memory (RAM) which is expensive and often involves downtime. Another major drawback of scaling relational databases is that once a machine has reached its hardware limits it is not possible to scale beyond this point. (Chodorow, 2013: 3-5)

2.5.1 Documents Mongo DB’s document based model enables large amounts of documents to be stored in collections. Each document is made up of key-array pairs, key-value pairs, or embedded documents (sometimes called nested documents). Documents can be thought of as the equivalent of records in standard relational databases. MongoDB represents JSON documents in a format called binary encoded format (BSON). (Supriya and Swalaya, 2015). BSON is an extension the JSON model and provides additional data types. (MongoDB, 2016). The document comprises of an ordered set of keys with associated values. The JavaScript programming language represents documents as objects (JSON), an example of a simple JSON object is given in Figure 9.

Figure 9 Simple JSON example

2.5.2 Collections Collections are groups of MongoDB documents and they do not enforce any schema. A collection may store documents that has different structures because of the schema- free model. Standard relational database like MySQL, a schema defines the organisation and structure of the data. MongoDB does not require this formula of defining its structure. MongoDB has the ability of storing documents of varying structures in its collections. (w3resource, 2016). Collections can be thought of as the equivalent of tables in traditional relational databases. Because of this dynamic schema of MongoDB, means that a collection can store jagged documents. For example, the examples displayed in Figure 10 and Figure 11 Can be stored in the same collection. See section 2.6 for more information on JSON documents.

25

Figure 10 JSON example 1 Figure 11 JSON example 2

2.5.3 Arrays and Indexing Array operations can be both ordered and unordered. They can also contain different data types as values and even nested arrays. MongoDB allows querying on arrays and to even build indexes on them to improve database query timings and reduce overhead. In fact, MongoDB allows indexing on all key/value pairs stored within its structure. Indexing is an operation performed on data stored in a database to optimise search queries. MongoDB permits reaching into documents to create indexes on nested fields and arrays. Compound indexing on embedded objects and array fields combined with top-level key/value pairs is also permitted. Importantly, for this project MongoDB provides the ability to index arrays which allow us to search array elements efficiently. Indexing arrays creates an index entry for each element of the array which makes array indexing more expensive in terms of stored data, time taken to produce the index and when an element in an array has changed, and now the index has to be updated, because when an array is indexed it means that each element in the array is indexed not the array its self. Although, MongoDB does allow indexing of specific elements of an array. (Chodorow, 2013: 81-108).

2.6 JavaScript Object Notation (JSON) JSON is a lightweight data-interchange format. Its format is parsed to generate objects which contain key/value pairs, arrays and other objects. JSON is also easy to read and write for humans. (Json.org, 2016).

2.6.1 Data Types The JSON format supports the following data types:

 Number: Double-precision floating-point in JavaScript  String: Double-quoted Unicode with backslash escaping  Boolean: True or false

26

 Array: An ordered sequence of values  Value: It can be a string, true or false, a number or null  Object: An unordered collection of key/value pairs  Whitespace: Can be used between any pair of tokens  Null: Empty (www.tutorialspoint.com, 2016)

2.6.2 Key Value Pairs The two parts that make JSON are the keys and values. All JSON data is written as key/value pairs.

 Key: The key is always a string enclosed in quotation marks.  Value: The value can be a Boolean, string, number, expression, array, or object.  Key/Value Pair: The key value pair syntax should be the key followed by a colon followed by the value. Key/value pairs are comma separated.

2.6.3 Documents Representing a collection of key/value pair entries in JSON is called a JSON document. There are many ways to represent the same data in JSON documents so it is important to know its intended use within an application before designing organising its design. An example of two valid JSON documents that contain the same information for a person is displayed in Figure 12 and Figure 13.

Figure 12 JSON example 3

In this example, the JSON document comprises of three key/value pairs. All JSON keys are strings and should be snclosed with double quotes and be followed by a colon which seperated the key from the value.

27

Figure 13 JSON example 4

In this example, the JSON document comprises of four key/value pairs. The ‘address’ key has an embedded document as its value (this is also sometimes called an object). In this case, the embedded document has three key/value pairs. Embedded documents are used to organise data in a more structured way than just a flat structure of key/value pairs.

2.7 Integrated Development Environments

2.7.1 Microsoft Visual Studio Professional 2013 Microsoft Visual Studio (VS) is simply a software development environment that enables the creation applications for multiple devices, PCs and the web. It is a cross- platform technology that aids in the creation of applications for Windows, Android and iOS. (Visualstudio.com, 2016). VS supports application development in the following languages Visual Basic, Visual C#, Visual C++, Visual F# and JavaScript from within a single integrated development environment. VS also supports the following technologies .NET Framework, Windows Communication Foundation (WCF), Windows Workflow Foundation, Silverlight, Windows Forms, Windows Presentation Foundation (WPF), ASP.NET, Extensible Application Markup Language (XAML) and Language Integrated Query (LINQ).

2.7.2 Unity IDE Unity is a game engine which makes it a powerful tool for developing cross-platform applications for mobile, game consoles, desktop and the web. Unity comes in three formats, Personal (free) and Professional or Enterprise Editions. Unity mainly supports three programming languages UnityScript, C# and Boo and also supports Native Oculus Rift, Gear VR, and Playstation VR (Dotnetfoundation.org, 2016). The Unity IDE offers a large range of functions with a customisable plug-in architecture. Optional plug in extensions can be easily and are available to download from the Unity Asset Store. Unity supports powerful graphic optimisations including support for open Graphics Library (OpenGL) and support is in an experimental stage for Apples Metal. “Metal as a technology applies to the GPU (Graphics Processing Unit) of Apple's new 64-bit A7 Application Processor” (AppleInsider, 2016). Currently, Unity is shipping Unity 5.3 which includes version 5.9 of MonoDevelop which developers a wide range of scripting tools. MonoDevelop is an open source integrated development environment it has an integrated features similar to Microsoft Visual Studio and Eclipse. The Unity IDE also includes a feature rich scene editor for developers to build 2D and 3D scenes in their applications. (Unity3d.com, 2016).

28

2.7.3 Eclipse IDE Eclipse is a powerful IDE with an extensible plug-in architecture. Its primary use is for developing Java applications but it also supports development in a range of other languages including C/C++, PHP, Python and Ruby. Its functionality can be customised and extended by downloading additional packages from the Eclipse Marketplace. Eclipse supports development of Apache Tomcat servers and developers are able to install servers from within the IDE and supports packaging of applications into Web application Archives (WAR). This allows developers building server technologies can easily drop the WAR files directly into the server directory for execution. Eclipse latest build is names Mars which includes additional features such as workplace sharing, Gradle support, improved Mavern support and now comes with modelling tools for the Eclipse Modeling Framework (EMF) and Unified Modelling Language (UML).

2.8 Programming Languages

2.8.1 C# Programming Language The C# programming language is type-safe and object-oriented and enables applications that run on the .NET Framework. Developers are able to use C# to create Windows client applications, client-server applications, database applications, XML Web services and distributed components. (Msdn.microsoft.com, 2016).

2.8.2 Java Programming Language Java is a programming language which can be used to develop a wide range of applications that run on a variety of different computer systems. These include Java applets, Java Server Pages and large scale applications which can be run unchanged on any operating system environment in which Java is supported. This independency of platform is Javas most powerful feature. Another feature of Java is that it is object-oriented. Well written object-oriented programmes are generally easier to understand, maintain and extend than programmes written without the benefit of using objects. (Horton, 2011)

2.9 Unified Modelling Language (UML) Class Diagrams UML is a standardised visual specification language for object modelling. Modelling is a major part of developing small or large software projects. UML helps specify, visualise and document software models including their structure using any of the UML diagrams. Object modelling involves creating graphical notation to help developers create an abstract model of a system. (Oppel, 2010). UML 2.0 offers thirteen types of diagrams, divided into three categories that are detailed below:

29

 Structure Diagrams: include the Class Diagram, Composite Structure Diagram, Package Diagram, Object Diagram, Component Diagram, and Deployment Diagram.  Behaviour Diagrams: include the Use Case Diagram (used by some methodologies during requirements gathering), State Machine Diagram and Activity Diagram  Interaction Diagrams: all derived from the more general Behaviour Diagram, include the Sequence Diagram, Communication Diagram, Timing Diagram, and Interaction Overview Diagram. (Uml.org, 2016) The UML class diagram represents the static view of an application. It shows a collection of model elements such as classes including their type and operations. UML class diagrams can also be mapped directly with object oriented languages. They can represent various aspects of a system and can be combined into collections which can represent the system as a whole. Main purposes of UML class diagrams:  Analysis and design of the static view of an application.  Describe responsibilities of a system  Base for component and deployment diagrams  Forward and reverse engineering (www.tutorialspoint.com, 2016) Class diagrams can aid developers describe the static view of a system and interactions between various elements of the view including definition of the functionalities performed by the system. Its use in modelling a system and its ability to be mapped to languages like C++ or Java make them a practical tool, not only in modelling systems, but also in aiding construction of applications programmed in any object-oriented language.

Chapter 3 –Application Design & Preparation

3.1 JSON Document Specification and MongoDB Hierarchy The success of this project hinges on creating JSON documents to hold a large amount of question data, and the ability to efficiently package, store and retrieve the question data to facilitate a mobile quiz application. The DMA will package these JSON documents which are going to be stored on a remote Mondo database in collections. This section describes the format of the JSON documents, defining its structure, and outlines the hierarchical structure of the mongo database that stores them. The Figure 14 displays how the project database and its collections are arranged.

30

Figure 14 MongoDB hierarchy

The database is grouped into collections of collections. In figure 14 The EN, ES and FR collections represent a collection of languages (English, Spanish and French). Each language collection comprises of a collection of collections which each represent a TV show, for that language, and each TV show comprising of a collection of documents. Each document, for that TV show, contains all the question data for each series of the show. In this case, the Game of Thrones collection contains three documents series1, series2 and series3. Each of these series documents contain all the question data for every episode for that series. Every series of the Games of Thrones TV show comprises of ten episodes. There are approximately 30 questions written per episode, so a JSON document for each series of Games of Thrones holds a set of data for 300 questions approx. To give an idea of document and collection sizes, the Game of Thrones collection contains five documents in total with each document containing question data for 300 questions approx. Each JSON document comprises of 493,294 characters approx. This gives us a total question count, for the Games of Thrones quiz, of 1,500 and a total character count of 2,466,470. The 1,500 questions are spread across 12 sub-categories a player can choose to play and on average each question is able to populate 4.5 quizzes. Grouping data into large JSON documents this way reduced the number of individual documents which need to be opened during q database search and thus reduces database query seek times (Chodorow, 2013). The list below details some of the data that needs to be stored for each question:

 ID: The question ID

31

 Season Number: The season the question refers to  Episode Name: The name of the episode the question refers to  Question: The question for the episode  Type: The type of question  Options: An array of three possible answer options  Answer: The position in the options array representing the correct answer  MataTags: An array of string metatag information relating to the question It is the MetaTag information that will be the key to searching the database for relevant question data. This information corresponds directly to each TV show sub-category that a user may choose to play on the mobile client. The next section will discuss the importance of this MetaTag information. Figure 15 displays an excerpt of an actual JSON question document. The excerpt displayed represents a single set of question data for Season 4, Episode 1 of the TV show Game of Thrones.

32

Figure 15 JSON question example

We can see from this example that the MetaTag array contains seven string entries. They are:

 Season 4  Episode 1  Relationships  Cercei Lannister  Jamie Lannister  Tyrion Lannister  House Lannister

33

The MataTag entries inform that this question relates to each of those Game of Thrones sub- category topics in some way. This relation means that this question is suitable to populate a quiz for those sub-category topics. In this case, this single set of question data can be used in to populate seven different sub-category quizzes for Game of Thrones. To explain further and illustrate how this works, Figure 16 displays the sequence of events when a user selects the sub-category topic ‘Cercei Lannister’ from a sub-category list in the Game of Thrones category.

Figure 16 Game event sequence

The client passes the ‘Cersei Lannister’ string to the server who allocates the player to a room to play a Cercei Lannister quiz against another opponent. The server then passes the ‘Cersei Lannister’ string to the database to retrieve the quiz data. The database moves through the database hierarchy to search each JSON document in the Game of Thrones collection, it is querying for questions whose MetaTag array contains the string ‘Cersei Lannister’ as one of its entries. For matches that are found, the database extracts matching question entries and stores them until the search has finished. When the search is finished the database passes the stored search results back to the server as a JSON string. The server then selects a random 10

34 question entries from the results and broadcasts each question simultaneously to each client during a quiz game. Figure 17 Looks more closely at the excerpt example in Figure 16 in particular its JSON structure that represents question data and the following section explains in more detail the format of the document. This graphic was rendered using the online JSON Visualisation tool here: http://chris.photobooks.com/json/default.htm

Figure 17 JSON graphic 1

Here we can see that the questions key/value pair contains an array as its value. In this example the array contains only a single entry questionEntry, it will actually hold about 30 entries each relating to a single question. The questionEntry object, in this array, represents all the data needed for a single question. Its six key/value pairs are detailed below:

35

 Id: A key/value pair with an integer as its value  Info: A nested document with an object as its value, the object contains three key/value pairs integer, integer and string  questionItem: A nested document which contains a key/value pair with a string value and a nested document attachedElement with an object as its value . attachedElement: Object contains two key/value pairs integer and string  options: A key/value pair with an array as its value, that array contains three key/value pairs as their entries with an integer as their values  answer: A nested document that contains two key/value pairs with an integer as their values  metaTags: A key/value pair with an array as its value, the array contains, in this case, seven key/value pairs with a string as their values With the JSON structure to represent question data now defined, the next section looks at how this data is going to be stored in each document in the collection. Each document represents a single series of a particular TV show. For the purposes of this paper references to the Game of Thrones TV show shall be used as an example. The entire document shall store an array with each entry in the array representing an episode for that series of the show. Each of these array entries shall contain an array with each entry in that array representing the question data for that episode. Figure 18 Looks more closely at the array elements and the JSON structure that represents this document. Again, this graphic was rendered using the online JSON Visualisation tool here: http://chris.photobooks.com/json/default.htm

36

Figure 18 JSON graphic 2

The root structure of the JSON document has three key/value pairs detailed below: . Id: A key/value pair with an integer as its value . seasonNumber: A key/value pair with an integer as its value . episode: A key/value pair with an array of objects as its value, each element of this array represents each episode for the series

Figure 19 displays how the root element, episode array, question array and the questionEntry are packaged together making the entirety of this JSON document. Again, this graphic was rendered using the online JSON Visualisation tool here: http://chris.photobooks.com/json/default.htm

37

Figure 19 JSON graphic 3

This structure defines the format specification of the JSON question documents. This is the JSON document specification the DMA will package question data into.

3.2 Document Management Application The idea of the document Management application is to electronically produce and store the JSON documents specified which contain the question data needed to facilitate a quiz. The

38 functionality of the DMA is fairly small when compared to the complexity of the server and mobile client applications. Although, small in comparison this fact does not negate the fact that it shouldn’t be planned and methodically designed to aid in achieving the required functionality. The development of the DMA began by drawing up a visualisation the application using UML Class diagrams, detailed in Appendix H. The coding development then began by drawing information from these models to produce an evolutionary prototype. This prototype was then iteratively developed further with each revolution around its spiral cycle until a fully functioning design was reached. (Hughes and Cotterell, 1999: 67-71).

3.3 Mobile Quiz and Server Application The server and client applications were being developed from scratch. During their development there were many iterations made through the Spiral Model that continually refined the products until the final solutions. This workload was anticipated in advance and broken down into major milestones, each milestone is broken down further into a set of tasks. The work associated with each milestone is the sprint. This helped to ensure that the workload was carefully planned to help ensure the project objectives could be met.

3.3.1 Agile Software Development and MoSCoW In developing the server and client mobile application, development work was executed using some facets of Agile software development. This development work is broken down into major project milestones. (Agilemethodology.org, 2016). The list below lists the major project milestones, which were identified during the project planning phase, for both the client and server applications. This list is comprised only of major project milestones such as completion of a project phase. A complete breakdown of tasks associated with each milestone phase are included in Appendix O Project Task List. Major Project Milestones: 1. UI design drawings 2. UI Design mock-ups 3. Integrate server & database 4. Integrate server & client 5. Server bug fixing 6. Server testing 7. Develop client View-Models 8. Develop client Views 9. Develop client Models 10. Client Bug Fixing 11. Client Testing All deliverable tasks associated with each of the project milestones have undergone the MoSCoW method for prioritisation, meaning that sprints will typically be composed of 60% high priority tasks (Musts), 20% medium priority tasks (Shoulds) and the remaining

39

20% will be low priority tasks (Coulds) with the weight of the task measured by estimated development time. The result of this will be flexible development sprints with a focus on developing tasks in order of priority. Only the high priority tasks will be guaranteed to be delivered, but an aim on delivering all tasks. If, during development, a feature requires re-prioritisation then this is possible providing the balance of Musts, Shoulds and Coulds remains consistent. This approach ensures that, even if the project suffers any scheduling setbacks, a minimum viable product will be delivered with scope enough to deliver a fully featured version of the product if development goes to plan. (Allaboutagile.com, 2016).

3.4 User Application Testing Scenarios

Test Case 1 – Mobile Quiz Application Users are required to complete a set of tasks for observation, they are detailed below are the mobile application tasks: 1. Navigate using the main menu button 2. Find a campaign game to play 3. Challenge a random opponent to a quiz Test Case 2 – Document Management Application Users are required to complete a set of tasks for observation, they are detailed below are the document management application tasks: 1. Create a new question with answer options and metatag data 2. Start a new episode 3. Edit a question

Chapter 4 – Application Development

4.1 Overview This section of the report is concerned with the detailed steps involved in development of the project applications. It discusses in detail the design, coding and implementation of the three project applications listed below: 1. Document Management Application 2. Game Server 3. Mobile Client Application Note: due to the workload in developing the mobile client application, this paper will only discuss the important and relevant aspects of its development which includes client server and server client communication to facilitate real time quiz game. Although, the mobile client UI design documents are detailed in this paper, to include detailed coding descriptions of them would be beyond the intention of this paper.

40

4.2 Functionality

4.3 DMA Development This section discusses the coding process of the project document management application including the various functionalities using Microsoft Visual Studio 2013. It will also include detailed technical explanation of these functions including code fragments to help gain an overall understanding. Detailed screenshots of the DMA UI can be viewed in appendix G.

4.3.1 Additional Reference Libraries The DMA requires additional functionalities that are not included when creating a new Visual Studio project. Visual Studio’s Nuget Packet Manager provides developers with the ability to easily pull additional libraries into their project from the Nuget repository. The Nuget repository offers a large collection software tools and code libraries necessary to build applications without having to write them from scratch. (Docs.nuget.org, 2016). The DMA uses JSON extensively in managing its question data it also requires access a remote MondoDB database. Listed below are the libraries required from the Nuget repository which are needed in developing the DMA: Newtonsoft Json Newtonsoft’s Json library is a high performance JSON framework for .NET. It provides serialise and desterilising functionality and also has the ability to create, query, parse and modify Json.NET’s JArray, JValue and JObjects. (Newtonsoft.com, 2016). MongoDB Driver MongoDB Driver is the official .NET driver for MongoDB. It provides a range of asynchronous functions such as setting up a secure connection to a MongoDB database, query and write commands as well as administrative database management features. (C# and .NET MongoDB Driver, 2016). WebEssentials WebEssentials is a plug-in extension for Visual Studio. It features a wide range of useful functions for working with web technologies such as cascadigg style sheets (CSS), JavaScript, TypeScript and JSON. (Kristensen and Kristensen, 2016).

4.3.2 TV Show Episode Lists and MetaTags Each DMA is developed for a specific TV show and holds all the relevant information for that show. This information includes the number of seasons, the number of episodes for each season and the names of each episode. This information is used to populate the user interface (UI) dropdown menus and episode name box as shown in Figure 20.

41

Figure 20 DMA show details

The episode and season numbers are stored in static single dimensional arrays and the episode names are stored in a static two dimensional array. The code that initialises the season and episode number arrays are shown in Figure 21 and episode name array is shown in Figure 22.

42

Figure 21 DMA episode number arrays

Figure 22 DMA episode name array

Storing the information in arrays allow the application to easily reference each series or episode number and episode name for a particular season. E.G. to retrieve the episode name for Season 2 Episode 9 the application uses the following code: EpisodeNames[SeasonNumbers[0]],[SeriesEipsodeNumbers[8]]

43

With the show information referenced this way the application then binds the UI elements to this data during construction and then populates the UI elements. Binding data to UI elements in this way also allows the application to easily update the episode name box when a user changes the episode number. To allow users to attach metatag information to questions the application also needs to store the metatag options. This information is stored in a static List of type string. As mentioned in section 3.1, this is the string that is passed to the server to retrieve relevant questions from the database. An excerpt of this List is displayed in Figure 23 and how this information is presented to users of the application is shown in Figure 24.

Figure 23 DMA MetaTag ArrayList

Figure 24 DMA MetaTag UI display

4.3.3 Generate C# Objects from JSON Specification The DMA creates JSON documents from the question data a user enters into the UI. Converting this data directly into a JSON document is straight forward. The problem of directly generating JSON documents this way is that it doesn’t allow for easy manipulation of the data afterwards. For example, the DMA allows a user to cycle

44 through previously created questions to view or edit them. To make this process simple it was decided that each set of question data would be stored in objects. This would easily allow a user to cycle through question data and manipulate them if required, another benefit is that the UI can easily be updated with question data as a user cycles through them without having to de-serialise JSON documents and searching its contents for the data required. The UI elements that allow a user to cycle to the beginning, previous, next and the last question is displayed in Figure 25.

Figure 25 DMA question forward and backward buttons

As previously detailed in section 3.1, the JSON document format for the question data has been specified. To easily convert this specification into C# objects requires an extension to Visual Studio or a way to manually code this by hand. One such tool is the Web Essential plug-in for Visual Studio. Using this tool generated the following C# objects from the JSON document previously created:

 RootObject  QuestionEntry  QuestionItem  Question  Option  Info  AttachedElement  Answer

RootObject stores a List of Question objects, Question stores a QuestionEntry object and a QuestionEntry object holds the question data. When required to retrieve question data the application only needs to reach inside RootObject to manipulate or extract data to update the UI. The code for RootObject and Question object is shown in Figure 26 and Figure 27 respectively.

45

Figure 26 DMA RootObject class code

Figure 27 DMA Question class code

4.3.4 Saving and Reading JSON Documents With question data saved in manageable objects, saving this data to the JSON document is possible with the following line of code: jsonSerialiseIndented = JsonConvert.SerializeObject(rootObject, Formatting.Indented);

Here the Newtonsoft’s JSON library serialises the whole RootObject object into the JSON document specification that was specified in section 3.1. The application then saves this file locally with the following line of code: System.IO.File.WriteAllText(dirName + @"\Questions\" + s, jsonSerialiseIndented);

When a user cycles through the list of previously created questions the UI needs to be updated with the current question data. This is managed by keeping an index of the current question and when a user cycles forward or backward we increment or decrement the index by one. The application then only needs to reach inside the RootObject object to extract the question data and update the UI. The code to read the JSON document from a local file, de-serialising the contents and assigning that to objects is shown in Figure 28.

Figure 28 DMA de-serialise JSON code

The last line of code in Figure 28 shows a call to the updateForm method which updates the UI with the new question data.

46

4.3.5 Additional Functionality The purpose of the DMA is to correctly produce the previously specified JSON documents from question data a user enters into the UI. Eventually these documents will have to be validated for correctness by a human before they are passed to the database for storage. This process is currently done manually and the idea would be that once the question data was validated a user would be able to upload these documents directly from the DMA to the database. Although, this feature is not a requirement for the success of this project, it is a feature that could be implemented in the future when the application is refined further. The UI elements for this feature has already been implemented and shown in Figure 29 and Figure 30.

Figure 29 DMA admin login panel

Displayed in Figure 29 is an administrator password box. As uploading data to a database needs to be validated first a password protected section of the UI was implemented. This would protect unauthorised question data accidentally uploading to the database.

47

Figure 30 DMA upload JSON options screen

Figure 30 displays some additional functionality and UI elements that are revealed when a correct password is entered. This will allow a user to upload the JSON documents to the remote database once they have been validated. Future work for the DMA is discussed in section 6.

4.4 Server Development This section explains the important aspects of development and coding of the server, using the Eclipse IDE, and also introduces the idea of lobbies and rooms that facilitate quiz games. The section will also include detailed explanations of the some of the important features of the server including code fragments to explain the overall functionality. This section will also cover technical information and requirements needed to correctly setup a secure connection between the server and a remote MongoDB database. This connection has an impact on the successful outcome of this project as, this connection, serves as the delivery mechanism of question data between the database and server which will then be broadcast to clients. One of the evaluation metrics, to help determine the success of this project, is assessing the speed of the mobile quiz application delivering question data to players. So, it is important that both the server and database connections are setup in a way that will reduce the possibility of them hanging, displaying lag time and that they have the ability to recover if things go wrong.

4.4.1 Additional Reference Libraries The server requires additional functionalities that are not included when creating a new Eclipse project. To add additional libraries to an Eclipse project, requires downloading the library jar file and adding the file to the build . The server uses JSON extensively in managing question data and sending and receiving data packets to and from the mobile client and database. The server also requires a tool which can create Plain Old Java Objects (POJO’s) from a JSON document. The server also requires access a remote MondoDB database as well as the Apache Portable Runtime library. The following list details the additional functionality needed and also gives a brief description of each: Json Is the JSON library that implement JSON encoders/decoders in Java. It also includes the capability to convert between JSON and XML, HTTP headers, Cookies, CDL and provides functionality to create, query, parse and modify JSONArray, JSONString and JSONObjects. (GitHub, 2016) Mongo Java Driver Mongo Java Driver is the official MongoDB Java Driver. It provides both synchronous and asynchronous interactions with a MongoDB and also provides functions such as

48 setting up a secure connection to a MongoDB database, query and write commands as well as administrative database management features. (Java MongoDB Driver, 2016). Jsonschema2pojo Generates POJO’s to use in Java applications from a JSON document schema. (GitHub, 2016). Apache Tomcat Portable Runtime Provides general purpose Tomcat web server functionalities including secure socket layers (SSL), session ID, monitoring, logging and clustering. (Maucherat, 2016).

4.4.2 Server Initialisation and MongoDB Connection The server first initialises itself and reads any locally packaged configuration files, an example is shown in Figure 31. Appendix N, displays the directory structure of the deployed server including any configuration files. The server then creates a game zone and a singleton client connection to the remote MongoDB database, this client is then shared across the virtual machine (VM). The singleton client instance initialises itself using a double checked dispatched method which ensures that only one instance is shared across the VM. Figure 32 displays the code fragment that initialises the client singleton.

Figure 31 Server configuration file

Figure 32 Server client Singleton initialisation code

Figure 33 displays the client singleton setting up the database client Java driver with the following options. Detailed descriptions are given below.

49

Figure 33 Server client options code

The client Java driver is the database connection with its own internal pooling. A description of the driver option settings are given below:

 connectionTimmeout: This value determines the maximum time the driver will wait for a connection to the database before it is aborted. The value should be long enough for the server to make a connection with the database while under database load and/or network lag. It is suggested that connections made through Platform-as-a-service (PaaS) should have a slightly higher value because applications become idle or passive during times of no activity, the additional time gives it a moment to become active again.  socketTimeout: Sets the socket timeout the driver waits for a response from the database for all requests. The default is infinite which means that if there is a problem the driver will never recover. As our database query operations are relatively small compared to most large commercial databases, a limit of 60 seconds is set.  connectionPerHost: This sets the maximum connections allowed in a connection pool.  threadAllowedToBlockForConnectionMultiplier: This value is a multiplier that multiplies its value with the connectionsPerHost setting which gives the maximum number of threads that may be waiting for a connection to become available from the pool, all other threads will receive an exception. (Connection String URI Format — MongoDB Manual 3.2, 2016) (MongoClientOptions.Builder Api's, 2016) (mLab: MongoDB-as-Service, 2016) (Harris, 2011) Note: One of the success metrics for the project is that the server is able to retrieve question data from the database and process the question data in under 200 milliseconds on average. The setting options set above allow for 100 connections allowed in the connectionpool at any one time and with an expected response time of 200 milliseconds it is expected the project can achieve a maximum of 500 question query requests from the database every second. MongoDB Shard, a service of the MongoDB database, is a router service that processes incoming queries and determines the location of data held in the database. It has a setting called maxconns which is the number of simultaneous connections that it will accept. This was set during setup of MongoDB with a value slightly higher than the one created for the client. Setting this value slightly higher prevents it from causing

50 connection spikes which may disrupt operation and memory allocation. The maxconns value was set to 110. (mongos — MongoDB Manual 3.2., 2016). The singleton class then established its connection with the MongoDB. Figure 34 displays the code which establishes as secure connection, it passes the IP address, port number, login credentials and the client options specified in Figure 33.

Figure 34 Server MongoDB connection code

The server has now initialised itself and established a connection with the remote MongoDB database.

4.4.3 Game Zone and Game Rooms The server acts as an officiator of quiz games. After initialisation, it waits for clients to connect with a game request, then it allocates them to a game room to play another player or to wait until another player is allocated to the same room. Once two players are matched together the server then retrieves the questions from the database and broadcasts each question simultaneously to both clients and awaits their response. The clients have ten seconds to answer before the server broadcasts the next question. The server keeps track of correct answers and response times for both clients. This information is then used to announce the winner at the end of the match. The server will then destroy the room to free up resources.

4.4.3.1 Game Zone The server zone also known as the lobby represents a container that interacts with clients when they first login. The zone monitors ports for activity from clients wishing to login over TCP. When a client establishes a connection with the zone it passes an application program interface (API) key which is used for authentication. If successful the client and zone now have a secure connection to communicate further and the client is added to the list of players currently in the zone. The zone contains rooms. Rooms are added when a client requests to play a new game. The zone has several main functions listed below:

 Remove user from the zone: Removes a user from the zone when they disconnect from the server  Create new game room: Creates a new game room when a game request is received from a client, see Figure 35 code fragment  Add user to the zone: Adds the users to the list of users currently in the zone after a client successfully authenticates  Return a list of game buddies currently in the zone: Pushes a JSON document containing a list of a user’s game buddies currently in the zone

51

to the client who requested it. Code fragment and explanation is detailed in Appendix I When a client requests a new game the server creates a game room using the code detailed in Figure 35.

Figure 35 Server room creation code

4.4.3.2 Game Rooms The game room is where all the play happens. Players can join, leave, subscribe, unsubscribe and chat to other players in the room. Players can only join one room at a time. The game room is dynamic which means it is created when needed and destroyed when it’s not. When a user joins a room the server adds the user to the list of users in the room. All users in a room receive updates from the server such as a new user was added or a user has left the room. When the room user count reaches two, and both clients have notified that they are ready, the the room begins the quiz. When a room is constructed it first creates a local reference to the mongoDB database and collection via the client singleton. Figure 36 show the code fragment to illustrate this.

Figure 36 Server get database and collection code

Note: For the purposes of this paper the database collection reference retrieved in Figure 36 the Returns the Game of Thrones collection, which is a collection of JSON documents as outlined in section 3.1. Before a game can begin the room will need to generate the question content needed for a quiz. This section is concerned with querying the database for questions that contain the specified metatag data, extracting a random ten questions and then creating Java objects from this data so it can be easily manipulated. Figure 37 displays the code fragment which starts this process off and the following sections describe each step in more detail.

52

Figure 37 Server query and timer code

Timer: The overall success of this project is that it is able to produce JSON documents from question data to facilitate a mobile quiz application. One of the evaluation metrics to gain knowledge of its success in doing this is how well the quiz functions, from a user’s point of view, in terms of speed. Displayed in Figure 37 is a measure taken to record the time taken for the server to query a remote Mongo database, extract ten questions and generate Java objects from the ten questions extracted. Section 5.3 discusses these results in more detail. queryMetaTags: This function is passed a query string which relates to the sub- category a user wants to play. It will query the database searching all question entries whose metatag array element matches the query string. All matching elements are added to a local ArrayList of type JSONObject. The code for this method is detailed in Appendix J. pullOut10Questions: This method first generates a random ten numbers in a range between the ArrayList size (this is the number of matching questions pulled from the database), detailed in queryMetaTags, and zero. Then it extracts the corresponding elements in that array and places the data into a new ArrayList of type Integer. This new array now contains a list of ten randomly generated numbers in the range required. The code for this method and the method to generate the ten random numbers is detailed in Appendix K.

pojoOurQuestions: This method generates an Arraylist of type QuestionEntry by converting the JSON data held in ArrayList created in queryMetaTags into Java objects. The code fragment for this is detailed in Appendix L. Generating Java objects from the question data this way allows for easily manipulation, for example, each set of question data resides in an ArrayList which provides a mechanism to easily cycle through the list broadcasting each question to client during the quiz. Once the room has finished initialising, prepared the question data and two players have joined then the server starts broadcasting quiz questions to both clients simultaneously.

4.4.4 Turn Based Game Management This section covers the technical details of the game synchronisation, specification and an overview of execution flow during a game to give an overall understanding of the mechanics involved.

53

The room handles all the interactions taking place between the users in the room. It also handles the game tick timer method which is invoked every time the timer is fired. The frequency of the timer is specified in the packaged configuration files. These files were read during server initialisation, see Figure 31. When the timer tick method is invoked, it processes the following operations:

 Firstly, a check if a user has left the game, maybe they had connection issues or decided not to continue playing. If a player has left then a notification is sent to their opponent informing them and the room is deleted. A player is able to leave the game at any point and if they do so their opponent has won the game.  Secondly, checks if there are two users in the room and checks that the room’s game is not currently running. If so, then it marks the room’s game to running.  Thirdly, checks if this is the first question, if so then sends a question, else checks if ten seconds have passed before sending the next question. When the ten questions have been sent it sends a game end result. Once a question has been sent the room awaits responses from the client’s answers. The detailed code fragment for the game room timer tick method can be viewed in Appendix M. When a response is received from clients the room processes the following operations:

 Firstly, it unpacks the byte array. Figure 38 details the code fragment for reading the first byte.

Figure 38 Server byte message code

 Secondly, check if the first byte, detailed in Figure 38 is zero or one, if it’s a zero then the message from the client means it’s a start a quiz message else it’s an answer message from the client. If it’s an answer message, then the room performs the following operations for each answer message from the clients: 1. Checks if the answer is correct, if so then awards the client 30 points 2. Broadcasts to both clients updated scores, the code fragment to broadcast the updates scores is detailed in Figure 39.

54

Figure 39 Server broadcast byte message code

Lastly, when the game is over the client generates a game end result and broadcasts this to both clients, removes the clients from the room and destroys the room. The game has been played and a winner has been announced.

4.5 Client Development This section aims to give an understanding of the processes and functionalities of the mobile client application. This includes initialising a connection with the remote server, requesting a game, responding to players actions and processing and packaging this information to send to the server. It will include detailed explanations for the processes and is accompanied with code fragments outlining execution flow during a game to give an overall understanding. The Unity IDE was used to develop the mobile client application. This section will not cover the development aspects in designing and coding the client UI elements, it was decided that including this information is beyond the intention of this paper. Detailed screenshots of the client UI can be seen in Appendix G.

4.5.1 Establishing a Connection Once the client has been initialised it then established a connection with the server. This connection will allow for secure communication over TCP between the client and server to facilitate a quiz game. This is shown in Figure 40.

Figure 40 Client initialise connection code

Figure 40 displays the client passing an API key to the server to establish a connection, the API key is used for authentication, HOST_NAME is the IP address of the server. The

55 client also sets a connection recovery time of 60 seconds. Recovery time is set to 60 seconds and the client will try and establish a lost connection every 10 seconds, if the connection is not recovered after 60 seconds then the operation is aborted. Once a connection has been established, the client now creates a series of listener objects. This is shown in Figure 41 and detailed descriptions are given in the next section.

Figure 41 Client initialise listeners code

The client and server communicate throughout their connected session at different stages of the game. For example, they communicate while in a zone or room each with a separate listener object dedicated to listening for traffic. A detailed description of each of the listener objects is given below.

 ConnectionListener: Handles general connection event messages from the server such as dealing with authentication and connection errors messages. Also, handles connection resiliency and disconnect messages from the server.  RoomReqListener: Receives response call-back messages from the server following client requests to join or subscribe to rooms. Also, handles response message from server when client requests live information about the room. For example, live room information contains names of the players in the room and number of players in the room etc.  NotificationListener: Handles room event messages such as notification when a new user has joined or left the room. Also, handles incoming move messages. The list below details the types of game move messages sent from the server during a game: 1. Question packet – Contains the next question 2. Score packet – Contains the current score for both players

56

3. Game start – Contains the first quiz question 4. Game result packet – Contains the final score for both players  ZoneRequestListener: Receives response call-back messages form the server such as room created or deleted.

4.5.2 Starting a Quiz Game Once a player has chosen their quiz topic from a list, the client then sends a request to the server to join a room of that quiz type. Illustrated in Figure 42.

Figure 42 Client join room code

The code in Figure 42 Fires a call-back response message from the server which is handled by the clients RoomRequesListener. When another player has joined the room, the server will send notification to the client. The notification will be received by the clients NotificationListener who then loads the game screen. Figure 43 displays the NotificationListener method which handles this message.

Figure 43 Client user joined room code

The EventManager.MatchMade() line shown in Figure 43 moves the client to the main game screen.

4.5.3 Playing a Quiz Game The main game screen can be viewed in Appendix G. The client begins by rendering the UI with both player’s names then sends a start quiz message to the server and await the first question. As detailed in section 4.2.3, the server will begin broadcasting questions to both client once a start quiz message has been received from both parties. Figure 44 details the code to notify the server that the client is ready to begin a quiz.

57

Figure 44 Client begin quiz message code

When the client NotificationListener receives the first question message from the server, it gets unpacked before the client updates the UI with the question and three possible answer options. Figure 45 shows the code fragment which unpacks the move message.

Figure 45 Client de-serialise JSON question code

As displayed in Figure 45 we can see that the JSON document is de-serialised and assigned to a C# object of type QuestionPacket. Figure 46 shows the code fragment which reads the question data from the question classes, which was unpacked earlier.

Figure 46 Client read question data code

58

The client then waits for the player to answer. When a player answers the client notifies the server of the player’s answer. Player’s answer is an integer value of the position in an ArrayList, which contains the three possible answer options. Figure 47 details the code fragment which sends the player answer to the server.

Figure 47 Client send players answer code

The code fragment to build the answer message is shown in Figure 49.

Figure 48 Client build answer byte message code

Play will continue until ten questions have been answered and an end game result has been received from the server. When this has been received the client will update the UI with player’s scores and winner of the game. The client will then receive a notification message from the server informing them they have been removed from the room.

Chapter 5 – Evaluation This section focuses on a series of evaluations carried out to help determine the results of this project success. These evaluations were carried out on the three applications developed during the project. These evaluations will also help determine application functionality and discover any unintended issues. Users were also asked to complete a questionnaire relating

59 to the tasks carried out and general feedback questions to gain information for any improvements and to determine general opinion of the usability of the applications.

5.1 Observation methods

5.1.1 DMA and Mobile Client Evaluation of both the DMA and mobile client applications was completed using observation technique. Test users of the applications were asked to carry out a series of tasks to complete while using them. Each of the tasks looked at different functions available for its primary use. Observation Setting There was a total of 30 test users for the purpose of this evaluation. Each user participated in carrying out an evaluation for both the client and DMA application. This evaluation involved each participant carrying out a set of tasks while using the applications for their main activity. Participants were given audible instructions and assessed on the following criteria:

 Task Completion: Were users who are able to complete the task. This information would help to determine effective UI layout and appropriate information presented on screen  Time Taken: How long each task took a participant to complete. This information would help finding out if the flow of the application is efficient or areas where the process can be improved to reduce time taken  Error Count: This quantitative information highlighted areas of the application where participants had difficulties carrying out a task and had to take additional steps to compete the task Each set of task given to participants were in chronological order. Both sets of tasks are displayed in Figure 49 and Figure 50 for the DMA and client applications respectively.

Figure 49 DMA task flow diagram

60

Figure 50 Client task flow diagram

Observation Forms The observation forms were used while participants carried out their set of tasks. This helped in understanding of the applications performance and practical usage in real world situations. The participants were also asked a set of questions on their experience of the tasks.

5.1.2 Data Observations of participants and recordings of their practical usage of the applications generated numerical continuous data. Feedback questionnaires given to participants to complete afterwards generated both ranked ordinal and continuous dichotomous data. This data was then presented in frequency distribution bar and histogram charts for the purposes of this paper (see results section below). Error Count Participants were monitored during their task activity and errors made during fulfilment of tasks were recorded. This data provides information regarding navigation of the application and how intuitive the environment. Time Taken This information gathered was an evaluation to record time taken to complete each task. This information is difficult to judge on performance but is generated to gain a metric to measure whether participants had particular difficulty during their tasks. Questionnaire Feedback Participant feedback to generated additional information during tasks. This information generated general feedback of participants feeling for the applications such as its usability and to gain information for possible future improvements.

5.2 DMA Results

5.2.1 Evaluation Results All tasks were completed during the evaluation. The observation highlighted a number of areas where the UI could be improved to reduce errors and become more user friendly, a summary is given below. Figure 52 highlights that there were 12 errors made during completion of the question generation task. This is an important result and clearly shows that this task generated the most error results compared to the other figures. Looking at the speed results for this task, it is safe to conclude that question generation time was kept to a minimum, with the largest proportion of the participants able to

61

generate question data in under 190 seconds as displayed in Figure 51. Benchmark test results for question generation is 140 – 160 seconds. As a result of these of these findings future development for the DMA could look at the UI and focus on improving information and using a design more in line with common practice and using symbols to help reduce error mistakes.

Figure 51 DMA task #1 speed results chart

Figure 52 DMA task #1 error results chart

5.2.2 DMA Questionnaire Results General feedback was able to generate interesting results when compared with the observation method mentioned above. 15% of participants said that the interface was not easy to understand and 21% said that there was not useful information provided when things went wrong as highlighted in Figure 53.

62

Figure 53 DMA Functionality questionnaire results chart

One of the main objectives for this project was to produce a DMA which could produce the JSON documents in the required format. This objective was achieved and 72% of participants replied that generating these documents was very easy with 9% claiming that this task was easy. This information provides insight of user feedback, this highlights that although participants made errors while generating question data a large portion felt that this task was very easy to complete. Highlighted in Figure 54.

Figure 54 DMA Tasks questionnaire results chart

63

5.3 Client Results

5.3.1 Client Evaluation Results In relation with the tasks for the mobile client application, summary of results are highlighted below. An important result is the total time taken to navigate to a screen and challenge a random opponent to a quiz game. This result highlighted that participants generated a particularly significant amount of errors during this task. Displayed in Figure 56 shows us that there were 16 errors reported during that task and one participant generating a total of 4 errors. Again, this information could be used for further UI improvements as a direction for work in the future.

Figure 55 Client task #1 speed result charts

Figure 56 Client task #1 error result charts

5.3.2 Client Questionnaire Results General feedback of the client highlights that 21% of participants said that there was not useful feedback provided by the client if things went wrong and that 15% said that navigating around was not easy. As a result, this information can be used as a focus to improve the UI for better design and provide more helpful feedback.

64

Figure 57 Client functionality questionnaire results chart

The success of this project mainly focused of delivering a mobile quiz game to end users that provides all the features, outlined in Section 1.1.3 Application Functional Requirements, whilst also accomplishing the Application Performance Requirements outlined in Section 1.1.4. One of the performance requirements was the ability to query and generate question data for the purposes of a quiz in under 200 milliseconds. The questionnaire yielded feedback from participants regarding application speeds, when asked “was there any noticeable delay or lag during the quiz”, 26 participants said no with only four answering yes, as displayed in Figure 58. This information provides an important indication that the main objective of this project has been met.

65

Figure 58 Client task questionnaire results chart

5.4 Server Evaluation Evaluation of the server was to determine information regarding application speed. Generating a speed test to time the server while querying a database and generating question data to broadcast to clients during a quiz game. This data is an important metric in determining whether the database, JSON documents and server were setup successfully. Successful setup or configuration results in client, server and database communicating efficiently and without any noticeable delays shown during quiz games.

5.4.2 Server Results Evaluation of the server focused recording the time taken to successfully query the database and produce question data in preparation for a quiz, as detailed in section 4.4.3.2 and Figure 27. This involved measuring the total time taken to carry out this task. It was decided that an average question generation time of 200 milliseconds would be the average benchmark to determine success. Displayed in Figure 59 and 60 show that this main objective was met. Average recorded time for question generation was below 200 milliseconds and on only three occasions was a recorded time above 216 milliseconds.

66

Figure 59 Server question generation speed chart #1

Figure 60 Server question generation speed chart #2

5.5 Discussion

5.5.1 Aims The main aim of the project was to develop a DMA to produce JSON question documents to support a mobile quiz application. A server component which acts as an officiator of quiz games and a mobile client on which players can compete with random opponents in real time quiz games of their choice.

5.5.2 Objectives The task list in Appendix O details all features needed to generate an application with minimal functional requirements. This list was determined following the MosCOW development technique detailed in section 1.2.5. The list was used as a development

67

tool in preparation of this project. It can also be used as a way of also measuring success of this project.

5.53 Minimum Functional Requirements Looking at the list of minimal functional and performance requirements detailed in section 1.1.3 and 1.1.4, it is clear that the main requirements were met. The DMA application is able to deliver the necessary JSON question documents, the server is able to query the database for metatag information and generate question data for the quiz and the mobile client can produce real time quiz experiences to users. All application are capable of delivering the features and performance requirements and in doing so they meet minimum operability. Although this project succeeded in delivering its objectives there were also areas highlighted that needed further work. Feedback for participants and observation during tasks highlighted design flaws and or areas of the UI that could be improved which also included providing better feedback to users.

5.5.4 Conclusion With reference to the application requirements for this project, the project applications have been successfully met. All minimum requirements that were set out and greed at the start of the project were achieved. The evaluation of this project for the applications and server also support this. Also, the project has the possibility of further enhancements as highlighted in user feedback as highlighted in section 5.1.

Chapter 6 – Future Work

6.1 DMA There are areas for potential future improvements for the DMA which revolve around UI aspects of the application as outlined during participant feedback in section 5.1. These improvements are aimed at reducing the number of errors a while generating or editing question data. Other areas for future work include directly uploading JSON question documents from within the DMA. Currently these documents are uploaded by hand so automating this process will save time whilst also reducing the possibility of human error when uploading the separately.

6.2 Server The server has future potential for further work such as generating bots. Bots are automated opponents that players can play against if there is nobody online to play against. Other areas that can also be expanded to include features such as allowing game observers and in game chat between players and observers in the room. Implementing lobby/zone chat is also another feature for future work.

68

6.3 Client With reference to the MoSCoW prioritisation of tasks detailed in section 3, all high priority tasks were completed. Future work can include the tasks for medium and low priority for the client. It is clear that the client application lacks a full feature set offered by commercial readily available products which leaves much potential for future work. A list of some of the medium priority features outlined in Appendix O are as follows:

 User login and registration via social media sites such as Facebook and Twitter  Generate player data and save to the cloud  Enable users to add gaming friends to their profile  In game player chat  Retrieve a list of gaming friends currently online  Leader-board system to track players score rankings  Social media sharing of scores Client future work also includes interoperability and proliferation to platforms other that Android. Additional platforms include Windows, iOS tvOS and Xbox Live. The evaluation work for this project highlighted areas for potential improvements. This work revolves around general UI improvements to improve usability of the client application.

Bibliography Agilemethodology.org. (2016). Agile Methodology. [online] Available at: http://agilemethodology.org/ [Accessed 30 Mar. 2016].

Allaboutagile.com. (2016). Step 3: Sprint Planning (Requirements) | All About Agile. [online] Available at: http://www.allaboutagile.com/how-to-implement-scrum-in-10-easy-steps-step-3- sprint-planning-requirements/ [Accessed 10 Apr. 2016].

App Annie - The Next Horizon of Emerging App Markets. (2016). The Next Horizon of Emerging App Markets - App Annie Blog. [online] Available at: http://blog.appannie.com/next-horizon-emerging- app-markets/ [Accessed 2 Apr. 2016].

App Annie - Top App Predictions of 2016. (2015). Top App Predictions of 2016: From tvOS and Google Now on Tap, Apps Are Eating the Web - App Annie Blog. [online] Available at: http://blog.appannie.com/top-app-predictions-2016/ [Accessed 3 Apr. 2016].

App Annie - Where will the app economy be in 2020?. (2016). Where will the app economy be in 2020?. [online] Available at: https://www.appannie.com/landing/forecast/ [Accessed 3 Apr. 2016].

App Annie & IDC Mobile App Advertising and Monetization Trends. (2015). App Annie & IDC Mobile App Advertising and Monetization Trends - App Annie Blog. [online] Available at: http://blog.appannie.com/mobile-app-advertising-and-monetization-trends-2013-2018 [Accessed 3 Apr. 2016].

69

App Annie 2015 Retrospective. (2016). App Annie 2015 Retrospective. [online] Available at: http://go.appannie.com/report-app-annie-2015-retrospective [Accessed 2 Apr. 2016].

Appcelerator. (2012). Platform Plans and Pricing | Appcelerator. [online] Available at: http://www.appcelerator.com/pricing/ [Accessed 5 Apr. 2016].

AppleInsider. (2016). Inside Metal: How Apple plans to unlock the secret graphics performance of the A7 chip. [online] Available at: http://appleinsider.com/articles/14/06/16/inside-metal-how- apple-plans-to-unlock-the-secret-graphics-performance-the-a7-chip [Accessed 12 Apr. 2016].

C# and .NET MongoDB Driver. (2016). C# and .NET MongoDB Driver. [online] Available at: https://docs.mongodb.org/ecosystem/drivers/csharp/ [Accessed 10 Apr. 2016].

Castle, K. and Castle, K. (2015). The New Age of Cross-Platform Mobile App Development. [online] Tech.co. Available at: http://tech.co/cross-platform-mobile-app-development-2-2015-07 [Accessed 5 Apr. 2016].

Chambers, J., Simonov, V., Geldreich, R., Jones, K. and Paczkowski, L. (2016). Unity joins the .NET Foundation – Unity Blog. [online] Unity Technologies Blog. Available at: http://blogs.unity3d.com/2016/04/01/unity-joins-the-net-foundation/ [Accessed 5 Apr. 2016].

Chodorow, K. (2013). MongoDB. 2nd ed.

Chris.photobooks.com. (2011). JSON Visualization. [online] Available at: http://chris.photobooks.com/json/default.htm [Accessed 11 Apr. 2016].

Clark, D. (2016). Why TV Is Going Social. [online] Forbes.com - Why TV Is Going Social. Available at: http://www.forbes.com/sites/dorieclark/2012/09/06/why-tv-is-going-social/#63261aa51b10 [Accessed 4 Apr. 2016].

Codeandyou.com. (2016). What is BSON? BSON features? BSON Data Types? BSON Helpful Tools? ~ CodeAndYou. [online] Available at: http://www.codeandyou.com/2015/10/what-is-bson-bson- features-bson-data-bson-tools.html [Accessed 9 Mar. 2016].

Compare My Mobile. (2014). 11 Smallest Mobile Phones in the World 2015 - New Record. [online] Available at: http://blog.comparemymobile.com/11-smallest-mobile-phones-in-the-world/ [Accessed 2 Apr. 2016].

Connection String URI Format — MongoDB Manual 3.2. (2016). Connection String URI Format — MongoDB Manual 3.2. [online] Available at: https://docs.mongodb.org/manual/reference/connection-string/#connections-connection-options [Accessed 15 Apr. 2016].

Dellshaft, K. and Staab, S. (2006). On how to perform a gold standard based evaluation of ontology learning. Proceedings of the 5th international conference on The Semantic Web.

Developer.android.com. (2016). Android Studio Overview | Android Developers. [online] Available at: http://developer.android.com/tools/studio/index.html [Accessed 7 Apr. 2016].

Developer.apple.com. (2016). Xcode - What's New - Apple Developer. [online] Available at: https://developer.apple.com/xcode/ [Accessed 7 Apr. 2016].

Docs.nuget.org. (2016). Overview. [online] Available at: http://docs.nuget.org/consume/overview [Accessed 10 Apr. 2016].

70

Dotnetfoundation.org. (2016). .NET Foundation - Technical Steering Group. [online] Available at: http://www.dotnetfoundation.org/blog/tsg-welcome [Accessed 5 Apr. 2016].

FEO Media - Educating the world through casual gaming. (2016). [online] Feomedia.com. Available at: http://www.feomedia.com/quiz-games [Accessed 8 Mar. 2016].

Forbes.com. (2016). Forbes Welcome. [online] Available at: http://www.forbes.com/sites/prernasinha/2013/12/02/how-trivia-app-quizup-managed-to-attract- 3-million-users-in-three-weeks/#7b954673ffdc [Accessed 4 Apr. 2016].

Gillespie, P. (2016). Mexico is Latin America's success story as Brazil stumbles. [online] CNNMoney. Available at: http://money.cnn.com/2015/09/23/investing/mexico-brazil-latin-america-economies/ [Accessed 2 Apr. 2016].

GitHub. (2016). joelittlejohn/jsonschema2pojo. [online] Available at: https://github.com/joelittlejohn/jsonschema2pojo/wiki/Getting-Started [Accessed 14 Apr. 2016].

GitHub. (2016). stleary/JSON-java. [online] Available at: https://github.com/stleary/JSON-java [Accessed 14 Apr. 2016].

Grubb, J. (2015). Trivia Crack is the top-downloaded app in the world. [online] VentureBeat. Available at: http://venturebeat.com/2015/02/04/trivia-crack-is-the-top-downloaded-app-in-the- world/ [Accessed 8 Mar. 2016].

Harris, C. (2011). Little Lost Manuals: Increasing MongoDB's Connection Pool. [online] Little Lost Manuals: Webcache.googleusercontent.com. Available at: http://webcache.googleusercontent.com/search?q=cache:Q0kKlqdJT4QJ:www.littlelostmanuals.co m/2011/11/increasing-mongodb-connection-pool.html+&cd=5&hl=en&ct=clnk&gl=uk [Accessed 15 Apr. 2016].

Horton, I. (2011). Ivor Horton's beginning Java. Indianapolis, IN: John Wiley & Sons.

Howse, B. (2016). Microsoft Announces Xamarin Will Be Included Free With Visual Studio, And Open Source. [online] Anandtech.com. Available at: http://www.anandtech.com/show/10212/microsoft- announces-xamarin-will-be-included-free-with-visual-studio-and-open-source [Accessed 5 Apr. 2016].

Hughes, B. and Cotterell, M. (1999). Software Project Management. 2nd ed. McGraw Hill.

Java MongoDB Driver. (2016). Java MongoDB Driver. [online] Available at: https://docs.mongodb.org/ecosystem/drivers/java/ [Accessed 14 Apr. 2016].

Json.org. (2016). JSON. [online] Available at: http://www.json.org/ [Accessed 10 Mar. 2016].

Kantarmedia.com. (2016). French TV channel D17 cements audience engagement strategy. [online] Available at: http://www.kantarmedia.com/uk/newsroom/press-releases/french-tv-channel-d17- cements-audience-engagement-strategy [Accessed 5 Apr. 2016].

Kristensen, M. and Kristensen, M. (2016). Web Essentials for Visual Studio. [online] Web Essentials for Visual Studio. Available at: http://vswebessentials.com/ [Accessed 16 Apr. 2016].

Lawler, R. (2016). Trivia App QuizUp Passes 20 Million Users, Is Now Available In Five Different Languages. [online] TechCrunch. Available at: http://techcrunch.com/2014/06/11/quizup- localization/ [Accessed 8 Mar. 2016].

71

Maucherat, R. (2016). Apache Tomcat 7 (7.0.68) - Apache Portable Runtime (APR) based Native library for Tomcat. [online] Tomcat.apache.org. Available at: https://tomcat.apache.org/tomcat-7.0- doc/apr.html [Accessed 14 Apr. 2016]. mLab: MongoDB-as-Service. (2016). Do you want a timeout?. [online] Available at: http://blog.mlab.com/2013/10/do-you-want-a-timeout/ [Accessed 15 Apr. 2016].

MongoClientOptions.Builder Api's. (2016). MongoClientOptions.Builder. [online] Available at: http://api.mongodb.org/java/3.0/com/mongodb/MongoClientOptions.Builder.html [Accessed 15 Apr. 2016].

MongoDB. (2016). JSON and BSON. [online] Available at: https://www.mongodb.com/json-and-bson [Accessed 9 Mar. 2016].

MongoDB. (2016). Why MongoDB Was Created. [online] Available at: https://www.mongodb.com/presentations/why-mongodb-was-created [Accessed 9 Mar. 2016]. mongos — MongoDB Manual 3.2. (2016). mongos — MongoDB Manual 3.2. [online] Available at: https://docs.mongodb.org/manual/reference/program/mongos/ [Accessed 15 Apr. 2016].

Msdn.microsoft.com. (2016). How to create your first app for Windows Phone 8. [online] Available at: https://msdn.microsoft.com/en-us/library/windows/apps/ff402526%28v=vs.105%29.aspx [Accessed 7 Apr. 2016].

Msdn.microsoft.com. (2016). Introduction to the C# Language and the .NET Framework. [online] Available at: https://msdn.microsoft.com/en-gb/library/z1zx9t92.aspx [Accessed 10 Mar. 2016].

Msdn.microsoft.com. (2016). Visual Studio and Xamarin. [online] Available at: https://msdn.microsoft.com/en-us/library/mt299001.aspx [Accessed 5 Apr. 2016].

Newtonsoft.com. (2016). Json.NET - Newtonsoft. [online] Available at: http://www.newtonsoft.com/json [Accessed 10 Apr. 2016].

Oppel, A. (2010). Data modeling. New York: McGraw-Hill.

Phonegap.com. (2016). PhoneGap. [online] Available at: http://phonegap.com/ [Accessed 5 Apr. 2016].

Rajput, M. and Rajput, M. (2015). Tracing the History and Evolution of Mobile Apps. [online] Tech.co. Available at: http://tech.co/mobile-app-history-evolution-2015-11 [Accessed 2 Apr. 2016].

Sirt, T. (2016). Big players in tech have Turkey in their sights. [online] DailySabah. Available at: http://www.dailysabah.com/life/2015/09/24/big-players-in-tech-have-turkey-in-their-sights [Accessed 2 Apr. 2016].

Support : QuizUp. (2016). [online] En.support.quizup.com. Available at: http://en.support.quizup.com/support/home [Accessed 8 Mar. 2016].

Supriya, P. and Swalaya, P. (2015). Comparative Study of SQL & NoSQL Databases. [online] Available at: http://ijarcet.org/wp-content/uploads/IJARCET-VOL-4-ISSUE-5-1747-1753.pdf [Accessed 9 Mar. 2016].

Tcpipguide.com. (2016). The TCP/IP Guide - The Advantages (Benefits) of Networking. [online] Available at: http://www.tcpipguide.com/free/t_TheAdvantagesBenefitsofNetworking.htm [Accessed 30 Mar. 2016].

72

Uml.org. (2016). What is UML | Unified Modeling Language. [online] Available at: http://www.uml.org/what-is-uml.htm [Accessed 12 Apr. 2016].

Unity3d.com. (2016). Unity - Game Engine. [online] Available at: https://unity3d.com/ [Accessed 12 Apr. 2016].

Visualstudio.com. (2016). Visual Studio Professional. [online] Available at: https://www.visualstudio.com/en-us/products/visual-studio-professional-with-msdn-vs.aspx [Accessed 10 Mar. 2016]. w3resource. (2016). Databases, documents and collections - w3resource. [online] Available at: http://www.w3resource.com/mongodb/databases-documents-collections.php [Accessed 9 Mar. 2016].

What is an Electronic Document Management System (EDMS)? - Definition from Techopedia. (2016). [online] Techopedia.com. Available at: https://www.techopedia.com/definition/12769/electronic- document-management-system-edms [Accessed 8 Mar. 2016].

Wiki.appcelerator.org. (2016). Studio Feature Comparison - Documentation & Guides - 2.0 - Appcelerator Wiki. [online] Available at: https://wiki.appcelerator.org/display/guides2/Studio+Feature+Comparison [Accessed 5 Apr. 2016]. www.idc.com. (2016). IDC: Smartphone OS Market Share. [online] Available at: http://www.idc.com/prodserv/smartphone-os-market-share.jsp [Accessed 10 Mar. 2016]. www.tutorialspoint.com. (2016). SDLC - Spiral Model. [online] Available at: http://www.tutorialspoint.com/sdlc/sdlc_spiral_model.htm [Accessed 2 Apr. 2016]. www.tutorialspoint.com. (2016). UML - Class Diagram. [online] Available at: http://www.tutorialspoint.com/uml/uml_class_diagram.htm [Accessed 12 Apr. 2016].

Appendix A – Personal Reflection This project covered a comprehensive background research in areas of mobile application technology and also technical aspects around mobile application development that will serve as a foundation to my knowledge in this area in the future. The mobile development field is an area of interest and this project improved skills in areas ranging from mobile history, development tools, trends and the technical aspects from server development, MongoDB and client coding skills. It was intellectually stimulating to learn these new things. The project proved to be both technically challenging and interesting. Although, the project was ambitious from the outset by defining the stages needed to complete the project successfully provided smaller manageable pieces of work from which the project aims and objectives were set. Having had some experience in developing applications in languages such as C# and Java, this project introduced new areas that proved to be quite challenging. These included server development and MongoDB both of which consumed hundreds of hours of study time. With the wide variety of mobile applications available and the expected growth of the mobile market into new territory such as mobile connected TV devices and with TV broadcasters now

73 looking to these platforms to engage with their audiences, this is an area where my focus will be into the future. I appreciate having the opportunity to develop my skills in this area and this project served as a constructive lesson not only in skills gained in the mobile development field but also in academic writing skills both of which will undoubtedly prove useful in a career within this field. In conclusion, I am grateful the project applications met their minimum technical and functional requirements and the aims and objectives were met.

Appendix B – External Materials None.

Appendix D – Ethics Approval Ethics approval number 2015D0408

74

Ethics Form When undertaking a research or enterprise project, Cardiff Met staff and students are obliged to complete this form in order that the ethics implications of that project may be considered. If the project requires ethics approval from an external agency (e,g., NHS), you will not need to seek additional ethics approval from Cardiff Met. You should however complete Part One

75 of this form and attach a copy of your ethics letter(s) of approval in order that your School has a record of the project. The document Ethics application guidance notes will help you complete this form. It is available from the Cardiff Met . The School or Unit in which you are based may also have produced some guidance documents, please consult your supervisor or School Ethics Coordinator. Once you have completed the form, sign the declaration and forward to the appropriate person(s) in your School or Unit. PLEASE NOTE: Participant recruitment or data collection MUST NOT commence until ethics approval has been obtained. PART ONE

Name of applicant: Julian Wreford Supervisor (if student project): Stuart McNeil School / Unit: CSM Student number (if applicable): St20055073 Programme enrolled on (if applicable): BSc (Hons) Software Engineering Project Title: Document management application to support real-time mobile quiz application Expected start date of data collection: April 2016 Approximate duration of data collection: 1 week Funding Body (if applicable): N/A Other researcher(s) working on the project: N/A

Will the study involve NHS patients or staff? No

Will the study involve taking samples of No human origin from participants?

Does your project fall entirely within one of the following categories: Paper based, involving only documents in No the public domain Laboratory based, not involving human No participants or human tissue samples Practice based not involving human No participants (eg curatorial, practice audit) Compulsory projects in professional practice No (eg Initial Teacher Education)

76

A project for which external approval has No been obtained (e.g., NHS) If you have answered YES to any of these questions, expand on your answer in the non-technical summary. No further information regarding your project is required. If you have answered NO to all of these questions, you must complete Part 2 of this form

In no more than 150 words, give a non-technical summary of the project Development of a real-time mobile quiz application and a document management application (Question Builder) to produce Java Script Object Notation (JSON) documents which will be stored in a Non-Relational database (Mongo) to support a real-time mobile quiz application (QuizIt). Quiz application will read JSON questions from remote Mongo DB and broadcast them to client devices in real-time.

This project aims to produce two applications. Firstly, a document management application which allow a question writer to create the JSON quiz question documents and the QuizIt mobile application. QuizIt will request these questions from a server during live head-to-head matches.

QuizIt is a mobile application where users can test their knowledge by allowing users to play specialised sub-level topic categories. JSON documents, which contain question data, are held in a database. These documents are queried for question information which is then broadcast to mobile clients to facilitate a quiz.

This project explores an innovative way to produce complex JSON documents which contain searchable meta-data. JSON and Mongo database are used to support the QuizIt application to produce specialised quizzes. The project will use nominal and Interval evaluation methods (Saunders 2015) in the use of both these applications and use nominal and interval analysis (Saunders 2015) to display the results.

DECLARATION: I confirm that this project conforms with the Cardiff Met Research Governance Framework

I confirm that I will abide by the Cardiff Met requirements regarding confidentiality and anonymity when conducting this project.

STUDENTS: I confirm that I will not disseminate any material produced as a result of this project without the prior approval of my supervisor. Signature of the applicant: Date: 11 Jan 2016 Julian Wreford

FOR STUDENT PROJECTS ONLY Name of supervisor: Date:

Signature of supervisor: Date:

77

Research Ethics Committee use only

Decision reached: Project approved Project approved in principle Decision deferred Project not approved Project rejected Project reference number: Click here to enter text. Name: Click here to enter text. Date: Click here to enter a date. Signature:

Details of any conditions upon which approval is dependant: Click here to enter text.

PART TWO

A RESEARCH DESIGN A1 Will you be using an approved protocol in your No project? A2 If yes, please state the name and code of the approved protocol to be used1 N/A A3 Describe the research design to be used in your project This dissertation uses an interpretative research philosophy and use both qualitative and quantitative (Saunders 2015) data to gain information on the development and use of the applications described above. A deductive research strategy and action research technique is used for this dissertation (Saunders 2015).

Questionnaires will be used to collect primary data and will be developed from the analysis of current literature within the given domain.

A non-probability purposeful sampling technique questionnaire will be distributed to 30 application testers. The questionnaire is used to gain quantitative information on how both the quiz application and document management application was used to assess its performance and practical use.

The participants will take part in a workshop where they will be asked a set of questions to determine both of the applications functionality to discover unintended issues and to get feedback from immediate users for improvement. I will record my observation of users of both applications mentioned above.

1 An Approved Protocol is one which has been approved by Cardiff Met to be used under supervision of designated members of staff; a list of approved protocols can be found on the Cardiff Met website here

78

I plan to recruit 5 individuals for purposeful sampling to fulfil the role of testers. Completing the questionnaire should take 20 mins of a user’s time. This evaluation will take place at my office during April. My office is situated in the Innovation Centre of Excellence in Caerphilly and is fully equipped and insured for the purposes of this test. All questionnaire forms will be kept confidential and stored in a secure location. Also, all participant information will be anonymous.

I will then use thematic data analysis and interval evaluation methods (Saunders 2015) to analyse the results in the use of both these applications. A4 Will the project involve deceptive or covert No research? A5 If yes, give a rationale for the use of deceptive or covert research N/A A6 Will the project have security sensitive No implications? A7 If yes, please explain what they are and the measures that are proposed to address them N/A

B PREVIOUS EXPERIENCE B1 What previous experience of research involving human participants relevant to this project do you have? None B2 Student project only What previous experience of research involving human participants relevant to this project does your supervisor have? Stuart has over 10+ years of student dissertation and research at both undergraduate and postgraduate level.

C POTENTIAL RISKS C1 What potential risks do you foresee?

1. Arranging interviews – causing inconvenience to interviewees during their working day. 2. Risks of not meeting the research deadlines. 3. Personal information and data storage must be taken into account and will have anonymity.

C2 How will you deal with the potential risks?

1. Plan interview well in advance and confirm prior. 2. Every effort will be made to complete the research phases in accordance with the anticipated research deadlines.

79

3. All data will be held on a secure password protected external hard drive and paper copies will be kept in a locked cupboard. Access to the data will be restricted to the contributor and supervisor. Questionnaires will have no trace back to the contributor. All data will be anonymous.

When submitting your application you MUST attach a copy of the following:  All information sheets  Consent/assent form(s) An exemplar information sheet and participant consent form are available from the Research section of the Cardiff Met website.

Participant Consent Form

FOR INTERVIEWS AND FOCUS GROUP TYPE DATA COLLECTION

Cardiff Metropolitan University Ethics Committee

PARTICIPANT CONSENT FORM

Cardiff Metropolitan University Ethics Reference Number: Ethics approval number 2015D0408 Participant name or Study ID Number: Title of Project: Document management application to support real-time mobile quiz application Name of Researcher: Julian Wreford ______

Participant to complete this section: Please initial each box.

1. I confirm that I have read and understand the information sheet for the above study. I have had the opportunity to consider the information, ask questions and have had these answered satisfactorily.

2. I understand that my participation is voluntary and that I am free to

withdraw at any time, without giving any reason.

3. I agree to take part in the above study.

4. I agree to be take part in a video/audio recording for the purposed of this study

______Signature of Participant Date

______

80

Name of person taking consent Date

______Signature of person taking consent

* When completed, 1 copy for participant & 1 copy for researcher site file

Participant Information Sheet PARTICIPANT INFORMATION SHEET

Document management application to support real-time mobile quiz application

Cardiff Metropolitan University Protocol Number:

Project summary Development of a real-time mobile quiz application and a document management application (Question Builder) to produce Java Script Object Notation (JSON) documents which will be stored in a Non-Relational database (Mongo) to support a real-time mobile quiz application (QuizIt). Quiz application will read JSON questions from remote Mongo DB and broadcast them to client devices in real-time. Your participation will enable the collection of data which will form part of a study being undertaken at Cardiff Metropolitan University.

Duration of the study will be no more than 20 minutes.

Project risks The research involves you playing a mobile quiz on mobile devices including navigating around the app to complete a set of tasks. The research will also involve you using the document management application to create and edit questions for the quiz. You will be observed and evaluated carrying out both these tasks. You will then be asked a set of questions to determine its functionality, discover unintended issues and to get feedback from immediate users for potential improvement to improve its core functionality or any other useful information of different perspective areas to help in further evaluating the applications.

How we protect your privacy All the information you provide will be held in confidence. We have taken careful steps to make sure that you cannot be directly identified from the questionnaire form; there is no information on these questionnaires that will identify you. Your personal details (e.g. signature on the consent form) and your questionnaire will be kept in secure locations by the research team. When we have finished the study and analysed all the information, all the documentation used to gather the data will be destroyed. The recordings of the focus groups/ interview will also be held in a secure and confidential environment during the study and destroyed when it is complete.

81

We are not seeking to collect any sensitive data on you. We do not think that there are any significant risks associated with this study. However, if you do feel that any of the questions are inappropriate then you can stop at any time. Furthermore, you can change your mind and withdraw from the study at any time – we will completely respect your decision.

YOU WILL GIVEN A COPY OF THIS INFORMATION SHEET TO KEEP

If you require any further information about this project then please contact: Julian Wreford, Cardiff Metropolitan University email: [email protected] or [email protected]

Document management Questionnaire Form Ranking scale: 1 = Very Easy 2 = Easy 3 = OK 4 = Not Easy 5 = Difficult

Disclaimer: submission of completed questionnaire will be taken as informed consent.

Title of software program: Functionality Questions: choose an option: Is it easy to start the program? Yes/No Please comment:

Is the user interface easy to understand? (For example, is the screen layout Yes/No clear and easy to interpret?) Please comment:

Is it easy to navigate around the program? Yes/No Please comment:

Is useful feedback provided if something wrong? Yes/No Please comment:

Task Questions: rank the following tasks: How easy was it to create a new question with answer options & metatag data? How easy was it to start a new episode?

82

How easy was it to edit a question? How easy was it to add metatag data to a question?

Date: ______

Code: ______

Mobile Client Application Questionnaire Form Ranking scale: 1 = Very Easy 2 = Easy 3 = OK 4 = Not Easy 5 = Difficult

Disclaimer: submission of completed questionnaire will be taken as informed consent.

Title of software: Functionality Questions: choose an option: Is it easy to start the program? Yes/No

Please comment: Is the user interface easy to understand? (For example, is the screen Yes/No layout clear and easy to interpret?) Please comment:

Is it easy to navigate around the program? Yes/No Please comment:

Is useful feedback provided if something wrong? Yes/No Please comment:

Did the quiz game perform well with no noticeable lag or delay? Yes/No Please comment:

Task Questions: rank the following tasks: How easy was it finding the main menu button? How easy was it in choosing a campaign game to play? How easy was it in choosing a random opponent to a quiz game? How easy was it to submit your answers?

83

Date: ______

Code: ______

Document management Application Task Observation Form

Task Description & Number Competed (Y/N) Time Taken (min:sec) Error Count 1) Create a new question with answer options and metatag data

2) Start a new episode 3) Edit a question

Date: ______

Code: ______

Mobile Client Application Task Observation Form

Task Description & Number Competed (Y/N) Time Taken (min:sec) Error Count 1) Find the main menu button 2) Find a campaign quiz to play 3) Challenge a random opponent to a quiz game 4) Play a quiz game

Date: ______

Code: ______

Appendix D – Client Prototype UI Drawings The following prototype screenshots below were drawn by hand after listing the client specifications. These drawings were used as the first pass through the spiral model. Further refinements were made during their assessment and practicality of use.

84

1) Login Screen 2) Home Screen

85

3) Game Selection Screen 4) Challenge Player Match-up Screen

86

3) Challenge Game Screen 4) Results Screen

87

Appendix E – Client Prototype Mock-up Screens The prototype mock-up screenshots below were put together for the mobile quiz app. They were created from the ‘Prototype UI Drawings’ (see appendix D) they were drawn using Microsoft Expression Blend 4 + SketchFlow.

1) Home Screen 2) Game Category Selection Screen

88

3) Game Category Landing Screen 4) Game Sub-category Selection Page

89

5) Challenge Player Match-up Screen 6) Challenge Game Screen

90

5) Game Results Screen 6) League Performance Screen

91

Appendix F – Client Screenshots

1) Login Screen 2) Register Login Screen

92

3) Home Screen 4) Home Screen with Hyper Menu Expanded

93

5) Game Category Selection Screen 6) Game Sub-category Selection Page

94

7) Game Sub-category Selection Page 1 8) Game Sub-category Selection Page 2

95

9) Challenge Player Match-up Screen 10) Challenge Game Screen

96

Appendix G - Document Management Application Screenshots

1) New question added screen

97

2) New episode screen

98

3) Edit question screen

99

5) Administrator login screen

100

6) JSON document upload screen

101

Appendix H – UML Class Diagram

Class diagram modelling the static view to of the document management application.

102

103

Appendix I – Return List of Buddies in Server Zone Code

104

105

Appendix J – Query Database Code

106

107

Appendix K – Extract Ten Questions Code

108

109

Appendix L – Generating Java Objects from JSON Code

110

Appendix M – Game Room Timer Tick Code

111

Appendix N – Server Directory Structure

112

Appendix O – Project Task List

MoSCoW Task Associated TaskList Associated Milestone Priority Create appWarp user from Facebook registration details Create Registration Data Model Develop client Models Medium Create appWarp user from Twitter registration details Create Registration Data Model Develop client Models Medium Create appWarp user from LinkedIn registration details Create Registration Data Model Develop client Models Low Create appWarp user from registration details Create Registration Data Model Develop client Models Low Create appWarp user from registration details Create Registration Data Model Develop client Models Low Create appWarp user from Instagram registration details Create Registration Data Model Develop client Models Low Create appWarp user from Xbox Live registration details Create Registration Data Model Develop client Models Low Get player avatar data Create Main Menu Data Model Develop client Models Medium Register to appWarp for leaderboard updates Create Game Mode Select Data Model Develop client Models Low Request matchup from the server Create Face to Face Matchup Data Model Develop client Models High Update player answer on appWarp Create Face to Face Game Data Model Develop client Models High Register for opponent answers Create Face to Face Game Data Model Develop client Models High Update player powerup use Create Face to Face Game Data Model Develop client Models High Register for opponent powerup use Create Face to Face Game Data Model Develop client Models High Register for new question data Create Face to Face Game Data Model Develop client Models High Get player result data Create Face to Face Result Data Model Develop client Models High Get opponent result data Create Face to Face Result Data Model Develop client Models High Register for new question data Create Chronological Game Data Model Develop client Models Low Update appWarp with player data (answers / powerups) Create Chronological Game Data Model Develop client Models Low Get player result data Create Chronological Result Data Model Develop client Models Low Get leaderboard data Create Leaderboard Data Model Develop client Models Low Get associated player data Create Leaderboard Data Model Develop client Models Low Get appWarp friend data Create Friend Data Model Develop client Models Low Get social media friend data Create Friend Data Model Develop client Models Low Get IAPs from appWarp Create Store Data Model Develop client Models Medium Update player data Create Notification Data Model Develop client Models Low Get notification data Create Notification Data Model Develop client Models Low Fix Login & Registration Bugs Bug Fixing None None Fix Main Menu Bugs Bug Fixing None None Fix Mode Select Bugs Bug Fixing None None Fix Match-up Load Bugs Bug Fixing None None Fix face-to-Face Game Bugs Bug Fixing None None Fix Face-to-Face Results Bugs Bug Fixing None None Fix Face-to-Face Avatar Bugs Bug Fixing None None Fix Chronological Stage Select Bugs Bug Fixing None None Fix Chronological Game Bugs Bug Fixing None None Fix Chronological Results Bugs Bug Fixing None None Fix Leaderboard Bugs Bug Fixing None None Fix Friends Bugs Bug Fixing None None Fix Store Bugs Bug Fixing None None Fix Notification Bugs Bug Fixing None None Test Login & Registration Screen Testing Testing None Test Main Menu Screen Testing Testing None Test Mode Slecet Screen Testing Testing None Test Match-up Load Screen (Face to Face) Testing Testing None Test Face-to-Face Game Screen Testing Testing None Test Face-to-Face Result Screen Testing Testing None Test Face-to-Face Avatar Screen Testing Testing None Test Chronological Stage Select Screen Testing Testing None

113

Test Chronological Game Screen Testing Testing None Test Chronological Results Screen Testing Testing None Test Leaderboard Screen Testing Testing None Test Store Screen Testing Testing None Test Friends Screen Testing Testing None Test Notifications Testing Testing None Request previous chat details Create Chat View Develop client Views Low Respond to chat input Create Chat View Develop client Views Low Respond to navigation request Create Chat View Develop client Views Low Create new chat animation Create Chat View Develop client Views Medium Develop client Respond to incoming challenge request Create notification logic ViewModels High Develop client Raise challenge event Create notification logic ViewModels High Develop client Raise level unlocked event Create notification logic ViewModels Medium Determine if player has enough currency to purchase a Develop client product Create notification logic ViewModels Medium Develop client Invite a friend to play QuizIT Create notification logic ViewModels Medium Develop client Raise the are you sure event request Create notification logic ViewModels Medium Develop client Request Facebook friend list Create Friend Scene VM ViewModels Medium Develop client Request in-game friend list Create Friend Scene VM ViewModels Medium Develop client Request friend player data Create Friend Scene VM ViewModels Medium Develop client Respond to block player input Create Friend Scene VM ViewModels Medium Develop client Respond to chat to player input Create Friend Scene VM ViewModels Medium Develop client Request category data Create Leaderboard VM ViewModels Medium Develop client Request series data Create Leaderboard VM ViewModels Medium Develop client Request leaderboard data Create Leaderboard VM ViewModels Medium Develop client Request leaderboard player data Create Leaderboard VM ViewModels Medium Develop client Update player data Create Chronological Result VM ViewModels Medium Develop client Check for stage unlock Create Chronological Result VM ViewModels Medium Develop client Respond to answer recieved Create Chronological Game VM ViewModels Medium Develop client Update scores Create Chronological Game VM ViewModels Medium Develop client Respond to powerup used Create Chronological Game VM ViewModels Medium Develop client Respond to navigation request Create Chronological Game VM ViewModels Medium Develop client Determine A.I. move Create Chronological Game VM ViewModels Medium Develop client Request series data Create Chronological Stage Select VM ViewModels Medium Develop client Respond to navigation request Create Chronological Stage Select VM ViewModels Medium Develop client Retrieve player avatar data Create Face to Face avatar VM ViewModels Medium Develop client Retrieve opponent avatar data Create Face to Face avatar VM ViewModels Medium Develop client Respond to navigation request Create Face to Face avatar VM ViewModels Medium Develop client Retrieve player game data Create Face to Face Result VM ViewModels Medium Develop client Retrieve opponent game data Create Face to Face Result VM ViewModels Medium Develop client Respond to navigation request Create Face to Face Result VM ViewModels Medium Develop client Respond to friend invite request Create Face to Face Result VM ViewModels Medium

114

Develop client Respond to rematch request Create Face to Face Result VM ViewModels Medium Develop client Respond to answer received Create Face to Face Game VM ViewModels High Develop client Respond to powerup used Create Face to Face Game VM ViewModels Medium Develop client Respond to opponent answer recieved Create Face to Face Game VM ViewModels High Develop client Update scores Create Face to Face Game VM ViewModels High Develop client Handle betting Create Face to Face Game VM ViewModels Medium Develop client Handle group quiz mechanics Create Face to Face Game VM ViewModels Low Develop client Request matchup Create Face to Face Matchup VM ViewModels High Develop client Respond to matchup data recieved Create Face to Face Matchup VM ViewModels High Develop client Pass player data to view Create Face to Face Matchup VM ViewModels High Develop client Request player avatar items Create Face to Face Matchup VM ViewModels Low Develop client Request opponent avatar items Create Face to Face Matchup VM ViewModels Low Develop client Request Category Data Create Game Mode Select VM ViewModels Medium Develop client Respond to Categories list recieved Create Game Mode Select VM ViewModels Medium Develop client Request Series Data Create Game Mode Select VM ViewModels Medium Develop client Respond to Series list recieved Create Game Mode Select VM ViewModels Medium Develop client Respond to Navigation requests Create Game Mode Select VM ViewModels High Develop client Register for leaderboard updates Create Game Mode Select VM ViewModels Medium Develop client Update UI with leaderboard updates Create Game Mode Select VM ViewModels Medium Develop client Handle category search Create Game Mode Select VM ViewModels Low Develop client Filter categories Create Game Mode Select VM ViewModels Low Develop client Respond to navigation requests Create Main Menu VM ViewModels High Develop client Get Bonus offers available Create Main Menu VM ViewModels Medium Develop client Begin Facebook Login Create Login / Registration VM ViewModels Medium Develop client Begin Twitter Login Create Login / Registration VM ViewModels Medium Develop client Request Email Login Create Login / Registration VM ViewModels Medium Develop client Respond to Facebook Login Fail Create Login / Registration VM ViewModels Medium Develop client Respond to Facebook Login Cancelled Create Login / Registration VM ViewModels Medium Develop client Respond to Facebook Login Success Create Login / Registration VM ViewModels Medium Develop client Respond to Twitter Login Fail Create Login / Registration VM ViewModels Medium Develop client Respond to Twitter Login Cancelled Create Login / Registration VM ViewModels Medium Develop client Respond to Twitter Login Fail Create Login / Registration VM ViewModels Medium Develop client Respond to Email Login Success Create Login / Registration VM ViewModels Medium Develop client Respond to Email Login Fail Create Login / Registration VM ViewModels Medium Develop client Begin email registration Create Login / Registration VM ViewModels Medium Develop client Respond to email registration Fail Create Login / Registration VM ViewModels Medium Develop client Respond to email registration success Create Login / Registration VM ViewModels Medium

115

Develop client Begin LinkedIn Login Create Login / Registration VM ViewModels Low Develop client Begin Pinterest login Create Login / Registration VM ViewModels Low Develop client Begin Tumblr Login Create Login / Registration VM ViewModels Low Develop client Begin Instagram Login Create Login / Registration VM ViewModels Low Develop client Begin Xbox live Login Create Login / Registration VM ViewModels Low Develop client Respond to LinkedIn Login Success Create Login / Registration VM ViewModels Low Develop client Respond to Pinterest Login Success Create Login / Registration VM ViewModels Low Develop client Respond to Tumblr Login Success Create Login / Registration VM ViewModels Low Develop client Respond to Xbox Live Login Success Create Login / Registration VM ViewModels Low Develop client Respond to LinkedIn Login Fail Create Login / Registration VM ViewModels Low Develop client Respond to Pinterest Login Fail Create Login / Registration VM ViewModels Low Develop client Respond to Tumblr Login Fail Create Login / Registration VM ViewModels Low Develop client Respond to Instagram Login Fail Create Login / Registration VM ViewModels Low Develop client Respond to Xbox Live Login Fail Create Login / Registration VM ViewModels Low Start/end verses game Handle verses game Integrate server & client High Handle client send game invitation Handle friend/buddy game invitation Integrate server & client High Respond to client send game invitation Handle friend/buddy game invitation Integrate server & client High Fetch buddies currently playing in server zone Fetch friend lists Integrate server & client Medium Fetch fb friends currently playing in server zone Fetch friend lists Integrate server & client Medium Fetch all game friends Fetch friend lists Integrate server & client Medium Create challenged dialog Create Notification Dialogs Develop client Views High Create challenge dialog Create Notification Dialogs Develop client Views High Create friend invitation dialog Create Notification Dialogs Develop client Views Medium Create are you sure dialogs Create Notification Dialogs Develop client Views Medium Create Chat notification dialog Create Notification Dialogs Develop client Views Medium Create Level unlocked dialog Create Notification Dialogs Develop client Views Medium Create not enough gold dialog Create Notification Dialogs Develop client Views Low Create Store tab system Create Store Screen Develop client Views Medium Create gridded store Create Store Screen Develop client Views Medium Create store item template and customise based on server response Create Store Screen Develop client Views Medium Get store item data and populate store with items Create Store Screen Develop client Views Medium Distinguish between currencies and add goods to player profile Create Store Screen Develop client Views Medium Link store items to IAPs Create Store Screen Develop client Views Medium Add special offer tab Create Store Screen Develop client Views Low Read IAPs from server Create Store Screen Develop client Views Medium Create special offer notification Create Store Screen Develop client Views Low Get / show friend details Create Friends List Screen Develop client Views Medium Create additional options for frieds Create Friends List Screen Develop client Views Medium Repond to additional options for friends Create Friends List Screen Develop client Views Medium Display friend data Create Friends List Screen Develop client Views Medium Create custom social media invitation notifications Create Friends List Screen Develop client Views Low Display UI elements Create Chronological Results Screen Develop client Views Medium Send post game data Create Chronological Results Screen Develop client Views Medium Update player data Create Chronological Results Screen Develop client Views Medium Add avatar celebration animation Create Chronological Results Screen Develop client Views Low Add achievement notification Create Chronological Results Screen Develop client Views Medium Add level unlocked notification Create Chronological Results Screen Develop client Views Low

116

Create Category / series navigation Create Leaderboard Screen Develop client Views Medium Get and respond to leaderboard data Create Leaderboard Screen Develop client Views Medium Create face to face / chronological navigation Create Leaderboard Screen Develop client Views Medium Add additional options to leaderboard details Create Leaderboard Screen Develop client Views Medium Handle additional options Create Leaderboard Screen Develop client Views Medium Create 3D leaderboards with podium Create Leaderboard Screen Develop client Views Low Add UI elelments Create Chronological Game Screen Develop client Views High Display questions Create Chronological Game Screen Develop client Views Medium Add timer Create Chronological Game Screen Develop client Views Medium Display answers (randomised) and track correct answer Create Chronological Game Screen Develop client Views Medium Respond to answers (correct & incorrect) Create Chronological Game Screen Develop client Views Medium Raise game over event with result Create Chronological Game Screen Develop client Views Medium Add A.I. player Create Chronological Game Screen Develop client Views Low Add visual feedback for correct answers Create Chronological Game Screen Develop client Views Medium Determine stage count from data recieved Create Chronological Stage Select Screen Develop client Views Medium Display stage progress UI Create Chronological Stage Select Screen Develop client Views Medium Raise stage selected event Create Chronological Stage Select Screen Develop client Views Medium Raise back event Create Chronological Stage Select Screen Develop client Views Medium Link to shop Create Chronological Stage Select Screen Develop client Views Medium Add pulsing route display Create Chronological Stage Select Screen Develop client Views Low Animate status Create Chronological Stage Select Screen Develop client Views Medium Create Pie chart controls Create Face To Face Results Screeen Develop client Views Medium Recieve and display all post-game data Create Face To Face Results Screeen Develop client Views High Add transition between vs opponent and self performance stats Create Face To Face Results Screeen Develop client Views Low Raise share event Create Face To Face Results Screeen Develop client Views High Add rematch functionality Create Face To Face Results Screeen Develop client Views Medium Respond to opponent left event Create Face To Face Results Screeen Develop client Views High Raise Add friend functionality Create Face To Face Results Screeen Develop client Views Medium Raise exit functionality Create Face To Face Results Screeen Develop client Views High Animated circular progress bars Create Face To Face Results Screeen Develop client Views Low Create Face To Face Post Match Avatar Respond to won / lost scenarios Screen Develop client Views High Create Face To Face Post Match Avatar Add UI elements Screen Develop client Views High Create Face To Face Post Match Avatar Display correct data for post match Screen Develop client Views High Create Face To Face Post Match Avatar Display correct won / lost taunt synchronously Screen Develop client Views Medium Create Face To Face Post Match Avatar Load face to face game over screen Screen Develop client Views High Create Face To Face Post Match Avatar Level complete notification Screen Develop client Views Low Create Face To Face Post Match Avatar Achievement notifications Screen Develop client Views Medium Add UI Elements Create Face to Face Game Screen Develop client Views Medium Respond to opposition answered event Create Face to Face Game Screen Develop client Views High Respond to player answered questions (correct / incorrect / raise events etc.) Create Face to Face Game Screen Develop client Views High Update controls (timer / score etc.) Create Face to Face Game Screen Develop client Views High Display questions & answers (randomise answers, track correct answer etc.) Create Face to Face Game Screen Develop client Views High Respond to opponent used powerup (if required) Create Face to Face Game Screen Develop client Views Medium Respond to player used powerup Create Face to Face Game Screen Develop client Views Medium Group Quizes Create Face to Face Game Screen Develop client Views Low Bet virtual currency on matches Create Face to Face Game Screen Develop client Views Medium Create Face to Face Matchup Loading Create UI elements Screen Develop client Views High Create Face to Face Matchup Loading Add user details for both player and opponent to UI Screen Develop client Views High

117

Create Face to Face Matchup Loading Add avatar details for both players Screen Develop client Views High Create Face to Face Matchup Loading Add player recent awards details data Screen Develop client Views High Create Face to Face Matchup Loading Play avatar taunt animations Screen Develop client Views Medium Create Face to Face Matchup Loading Scrolling 3D avatar - possible matchups Screen Develop client Views Low Create Face to Face Matchup Loading Searching for match animation Screen Develop client Views Medium Create Face to Face Matchup Loading Curved TV screen view Screen Develop client Views Low Add Additional options show / hide functionality Create Game Mode Select Screen Develop client Views High Raise events on additional options selected Create Game Mode Select Screen Develop client Views High Navigate back to category selected from chron / face to face mode selected Create Game Mode Select Screen Develop client Views High Navigate back to grid view from category selected view Create Game Mode Select Screen Develop client Views High Create grid collection view Create Game Mode Select Screen Develop client Views High Handle categories got event and populate collection view Create Game Mode Select Screen Develop client Views High Handle category selected view with transition Create Game Mode Select Screen Develop client Views High Handle chronological / face to face mode selected from category selected Create Game Mode Select Screen Develop client Views High Add tab bar functionality to face to face / chronological series select view Create Game Mode Select Screen Develop client Views High Add animated navigation between grid to category selected views Create Game Mode Select Screen Develop client Views Medium Add animated navigation between mode select tabs Create Game Mode Select Screen Develop client Views Medium Add animated navigation between category selected and chron / face to face selected views Create Game Mode Select Screen Develop client Views Medium Order categories on number of times played Create Game Mode Select Screen Develop client Views Low Order face to face based on number of times played Create Game Mode Select Screen Develop client Views Low Provide search facility to filter categories Create Game Mode Select Screen Develop client Views Low Add a notification area for leaderboard updates Create Game Mode Select Screen Develop client Views Medium Add "Hyper Menu" sub-button navigation functionality Create Main Menu Develop client Views High Add notification functionality and updating Create Main Menu Develop client Views High Create "Hyper Control" open / close animation Create Main Menu Develop client Views High Create "Hyper Control" positioning functionality Create Main Menu Develop client Views High Integrate several 3D avatar idle animations Create Main Menu Develop client Views Medium Create Special Offer notification system Create Main Menu Develop client Views Medium Create multiple "Hyper Control" animations and randomise which is diplayed Create Main Menu Develop client Views Low Create Registration Validation Feedback Create Login / Registration Screen Develop client Views Medium Create Email Login Control Create Login / Registration Screen Develop client Views Medium Handle Events for login successful / unsuccessful / cancelled Create Login / Registration Screen Develop client Views Medium Handle loss of connection Create Login / Registration Screen Develop client Views Medium Handle previous login detected & token check Create Login / Registration Screen Develop client Views Medium Create Splash to Login animation Create Login / Registration Screen Develop client Views Medium Create Login / Register overview Create Login / Registration Screen Develop client Views Medium Create Login buttons Create Login / Registration Screen Develop client Views Medium Create Registration Fields Create Login / Registration Screen Develop client Views Medium Create transition between Login & Registration Create Login / Registration Screen Develop client Views Medium Raise Events for Social Media Login Create Login / Registration Screen Develop client Views Medium Provide Facebook Login Control Create Login / Registration Screen Develop client Views Medium Provide Twitter Login Control Create Login / Registration Screen Develop client Views Medium Provide LinkedIn Login Control Create Login / Registration Screen Develop client Views Low Provide Pintrest Login Control Create Login / Registration Screen Develop client Views Low Provide Tumblr Login Control Create Login / Registration Screen Develop client Views Low Provide Instagram Login Control Create Login / Registration Screen Develop client Views Low Provide Xbox Live Login Control Create Login / Registration Screen Develop client Views Low Add splash screen Create Splash Screen Develop client Views High

118

119