BobbyNielsen_MasterThesis_SoftwareDevelopment.pdf - Cross...

  • No School
  • AA 1
  • 116

This preview shows page 0 - 1 out of 116 pages.

Info icon Subscribe to view the full document.

Unformatted text preview: Cross Platform Mobile Development Master’s Thesis Software Development Author 20097733 Bobby Nielsen [email protected] Supervisor Henrik Bærbak Christensen Department of Computer Science, University of Aarhus Aabogade 34, 8200 Aarhus N, Denmark 2015-06-14 Abstract This thesis presents a research and comparison of options for cross platform mobile development. What are the options in the market, and how does the mobile development industry see the options for cross platform development? The high level goal is to be able to build an app that has a single codebase in one language for several mobile platforms. A framework for evaluating cross platform mobile development options against this goal will be presented, and evaluations of some of these options using prototyping e.g. Xamarin. The primary focus is on native app development with Android, iOS and Windows Phone, and not on hybrid or mobile web development. 2 Contents 1. Motivation............................................................................................................... 5 2. Hypothesis/Problem statement .............................................................................. 9 3. Method ................................................................................................................. 11 3.1 Approaches for Cross Platform Development .................................................... 11 3.2 Survey and Interviews ......................................................................................... 11 3.3 Cross Platform Languages/options ..................................................................... 13 3.4 Evaluation of Cross Platform Development options ........................................... 14 3.4.1 Hello World .................................................................................................. 14 3.4.2 Prototyping .................................................................................................. 15 4. Analyses and Results ............................................................................................. 18 4.1 Approaches to cross platform mobile development .......................................... 18 4.1.1 Researched languages and products ........................................................... 21 4.1.2 Conclusion on development options ........................................................... 24 4.2 The industry view ................................................................................................ 24 4.2.1 Survey........................................................................................................... 26 4.2.2 Interviews..................................................................................................... 32 4.2.3 Conclusion on the mobile development industry........................................ 37 4.3 The Dilemma – Selecting the mobile strategy .................................................... 38 4.3.1 Which and Why? .......................................................................................... 38 4.4 Hello World ......................................................................................................... 40 4.4.1 Xamarin with Visual Studio .......................................................................... 40 4.4.2 Embarcadero C++ Builder ............................................................................ 42 4.4.3 Visual C++ for Cross-Platform Mobile Development (VC++) ....................... 43 4.4.4 Hello World conclusion ................................................................................ 47 4.5 Prototypes ........................................................................................................... 48 4.5.1 Android – Native reference.......................................................................... 48 4.5.2 iOS/iPhone – Native reference .................................................................... 53 4.5.3 Xamarin ........................................................................................................ 58 4.5.4 Visual C++ for Cross-Platform Mobile Development (VC++) ....................... 69 4.5.5 Conclusion on prototypes ............................................................................ 76 5. Related works ....................................................................................................... 80 3 6. Discussion.............................................................................................................. 81 7. Conclusion ............................................................................................................. 82 Conclusion on the Hypotheses ................................................................................. 84 References .................................................................................................................... 86 Appendix A – A research in technologies, products and vendors ............................ 89 Researched vendors.................................................................................................. 89 Cross Platform Development Options ...................................................................... 92 Appendix B – Hardware and OS specifications ........................................................ 97 Appendix C – Hello World Tests ............................................................................... 98 C.1 Xamarin with Visual Studio ................................................................................. 98 C.1.1 Xamarin iOS Development ........................................................................... 98 C.1.2 Xamarin Android Development ................................................................. 100 C.1.3 Xamarin Windows Phone Development .................................................... 100 C.2 Embarcadero C++ Builder XE7 .......................................................................... 101 C.2.1 C++ Builder iOS Development .................................................................... 102 C.2.2 C++ Builder Android Development ............................................................ 102 C.2.3 C++ Builder Windows Phone Development ............................................... 102 C.3 Visual C++ for Cross-Platform Mobile Development (VC++) ............................ 103 Appendix D – Prototype Details ............................................................................. 106 D.1 Android Details ................................................................................................. 109 D.2 iOS Details ......................................................................................................... 110 D.3 Xamarin Details................................................................................................. 111 D.4 VC++ Details ...................................................................................................... 114 Appendix E – Source Repositories.......................................................................... 116 4 1. Motivation Several mobile platforms exists today, and it is not in the cards that product companies will agree to use a common development platform to ease the way developers can create apps for mobile devices on multiple platforms. According to the International Data Corporation (IDC) [IDC] Android, as a mobile OS, are dominating the world market, and their overall market share has continued to increase over the last years (fig. 1-1), although it is expected that iOS take back some of the market with the release of iPhone 6 in the end of Q3. This doesn’t necessarily mean that units shipped with others OS’s is declining. You have to take the overall growth of 27.2% year over year in the second quarter of 2014 (2014Q3) into consideration and acknowledge that the smartphone market is still rapidly increasing. Fig. 1-1 WorldwideSmartphone OS market share 2014Q3 If we take a look into our region, and look at the smartphone OS market share in Great Britain (fig. 1-2), Germany (fig. 1-3) and France (fig. 1-4), presented by Kantar [Kantar]. Then we can see that the tendency is the same, Android is dominating. But here we see the effect of Apple shipping a new product, the iPhone 6, late in Q3. In Q4 the iOS market share is rapidly increasing. 5 70,0% 60,0% 50,0% Android 40,0% Blackberry iOS 30,0% Windows 20,0% Other 10,0% 0,0% Jan Feb Mar Apr May Jun Jul Aug Sep Okt Nov Dec Fig. 1-2 Great Britain Smartphone OS market share 2014 90,0% 80,0% 70,0% 60,0% Android 50,0% Blackberry 40,0% iOS 30,0% Windows 20,0% Other 10,0% 0,0% Jan Feb Mar Apr May Jun Jul Aug Sep Okt Nov Dec Fig. 1-3 Germany Smartphone OS market share 2014 6 90,0% 80,0% 70,0% 60,0% Android 50,0% Blackberry 40,0% iOS 30,0% Windows Other 20,0% 10,0% 0,0% Jan Feb Mar Apr May Jun Jul Aug Sep Okt Nov Dec Fig. 1-4 France Smartphone OS market share 2014 From the OS market share we see that Android, iOS, and Windows Phone (WP) are the three major players in the market – a market which is heavily affected by the evolving market. We also see that app developers need to cover three platforms to cover the market relative completely. This means that developers will have to develop one app three times, or use technologies for cross platform development. Depending on the functionality of the app you, as a developer, want to create, you need to decide whether you have to create your app(s) the native way, or if you can create it as a webapp (HTML5 + JavaScript). As soon as the app gets a little complex, you will probably recognize that you want better performance, and the native look and feel, that you get when you create native apps. But today, when you want to create native apps, for say the three most common platforms (Android, iOS, and Windows Phone), then you will end up with three different code bases in three different programming languages, namely Java, Objective-C, and C#. You might have to build your UI’s for each platform, but you do not want to code the business logic of the apps that you develop several times, if you can do it once. Therefore I want to investigate, how I can create cross platform mobile frameworks and libraries with a single codebase. 7 At Process Factory, where I work, we are on the verge of building mobile apps, but we face the problem of defining a strategy for building apps. We want to be more efficient than what will be possible, when doing three native versions of an app, with three codebases. At the same time we want performance and the native feel that we don’t think webapps can provide. We will need to define a way for us to produce apps to our customers, and as of right now, we want to know the best way to go. To find our way, we will have to evaluate the possibilities. This paper will function as a preliminary research for defining a strategy towards mobile development at Process Factory. 8 2. Hypothesis/Problem statement This research will investigate how cross platform mobile development is executed. How can frameworks and libraries be created with a single codebase, such that the frameworks and libraries support all mobile platforms. Do products exist that support cross platform development? We will assume that it is possible to build application components that will be executable on all major mobile platforms using one language. The major platforms are: Android, iOS, and Windows Phone. We want to research if this is how the industry does mobile development, or are the same apps with same functionality programmed several times in different languages? Are apps developed specifically for each platform? Hypothesis H1. It is possible to find a programming language that can be executed on all major mobile platforms, so that developers only need to use one language for common frameworks, libraries and business logic. H2. It is possible to create a cross platform mobile library or framework with a single codebase in one programming language, that can be used for development of apps on all major mobile platforms having the native look-and-feel and high performance. H3. Developers are not aware of the possibilities for developing native apps for several platforms having one single codebase for the business logic of the app. Delimitations Focus will only be on the three major platforms: Android, iOS, and Windows Phone. Also, focus will be on native apps and not on hybrid or webapps, because native apps development is still the approach that can ensure a good user experience (UX) as well as support the highest complexity in the apps. There is a big difference in the application requirements between game applications and other mobile applications, e.g. different expectations to the UX. Therefore focus will be on non-game application development, which has to live up to the different UX expectations within each platform. 9 Code-free1 solutions will not be taken into consideration, as it is a field in itself that can be researched and compared to solutions involving code programming. 1 Code-free or codeless solutions provide means for developing apps without the use of code. 10 3. Method To study the problem and validate the hypotheses this defined method is followed. 3.1 Approaches for Cross Platform Development What technologies are available on the market and which should be used? That is the question that this research will present an answer to. The different products and/or technologies for doing cross platform development will be analyzed to present viable options in mobile development. Along with this I will describe the pros and cons in selecting each of these as the strategy for developing mobile applications. An evaluation of the products and/or technologies that the analysis finds most promising will be presented. The evaluation criteria will be created from a research in the tendencies and demand in the market. 3.2 Survey and Interviews Are developers aware of the potential possibilities of cross platform mobile development? What do developers think of mobile development, and how do developers like to build mobile apps? Therefore I will create a survey (fig. 3-1) to get an idea of how developers approach mobile development for several platforms. The survey will also be designed to gather options for mobile development. I will supplement the survey by interviewing developers that are working with mobile application development. The survey and interviews will provide the base for determining how mobile apps are built, and give an indication about the developer awareness of the possibilities that cross platform development can provide. The survey will be shared on social media and development forums, and thereby targeted developers who have a minimum interest in mobile development, but not necessarily any work experience with mobile development. I claim that with all the information that we are bombarded with today, you will need a minimum interest in mobile development to choose to answer a survey on mobile development. The surveys goal is to get an insight into the broad understanding of and knowledge about mobile development. Are the possibilities for mobile development, especially cross platform development, known to the broad developer community? 11 Native or Not? •How would you approach the development of an app for Android? •How would you approach the development of an app for iPhone (iOS)? •How would you approach the development of an app for Windows Phone? Frameworks for mobile development •Which frameworks do you know for cross platform mobile development (tools for making apps for Android, iOS and/or Windows Phone)? Your preference Challenges and Issues •Which strategy do you prefer for mobile development? •Which product(s) do you prefer for mobile development? •Do you know of any codefree solutions for mobile development? •What do you think is the biggest challenge in mobile development? •Do you see any issues with cross platform mobile development? •Other comments regarding mobile development? Fig. 3-1 Survey questions Contact will be made to app development firms in Denmark ranking in top 10 on Google. Each will be asked questions (fig. 3-2) about mobile development today, cross platform development, and their view on the challenges within mobile development. The answers from the survey and the interviews will give an idea of the state of knowledge within the developer community, as well as a view into how mobile development is done today. These answers will provide a basis for creating product evaluation criteria later in the analysis. 12 Interview questions •Hvad do you think about developing an app for iOS, Android og WP? •Three languages? •Other platforms you are focusing? •Do you know if it is possible to use just one language for the three platforms (Android, iOS, WP)? •Would you like to just use one programming language? •Are developers generally aware of the possibilities of Cross Platform development? •That isn't webapps? •What strategy do you prefer for mobile development, and why? •Native •Hybrid •Webapps •Which products do you prefer for mobile development? •Do you know of any code-free solutions for mobile development? •What is the biggest challenge within mobile development? •Do you see any issues regarding cross platform mobile development? •Other comments regarding mobile development? Fig. 3-2 Interview questions 3.3 Cross Platform Languages/options To select a language or a product option for cross platform development, an investigation is made (fig. 3-3) to define which languages/options that is executable on the three major platforms: Android, iOS, and Windows Phone, and that provides a native look and feel. The investigation results in a list of products with programming language relations. The list is used to select the best options for cross platform development. The list is developed by researching mobile development options available on the market regardless of type, licensing or coverage. Trends and products for development in the mobile industry is googled to help define the list. A survey is circulated to get a view of the general developers’ knowledge about mobile development and the options in the market. To get in touch with mobile developers, experienced in the mobile industry, interviews are conducted with developers from some of the Danish app development firms. 13 Internet search Survey Interviews •Google search: mobile development •Google scholar search: mobile development •How knowledgeable are developers about options for mobile development? •What options do developers prefer? •Using what approach/strategy do developers go to mobile development? •What qualitative options does experienced mobile developers see for mobile development? •How does experienced mobile developers go to mobile development? Fig. 3-3 Analysis of Cross Mobile Development 3.4 Evaluation of Cross Platform Development options From the list of viable options for cross platform development, some are selected for evaluation. After the product has been selected, I will investigate and document the process of developing an application using the product. This is done by building prototypes to prove the hypothesis and show how cross platform development can be executed. Issues and probable solutions to these will be recorded during the evaluation. The target is to evaluate by prototyping, and this with all of Android, iOS, and Windows Phone. These prototypes will show how common development tasks can be executed having a focus on providing a single code base for all of or most of the application. 3.4.1 Hello World Using the candidates I select for further evaluation, the simplest of apps will be created to test the development setup and test whether apps can be created for the three platforms using a common shared library. The shared library will have one method, hello, that takes a string as an argument and returns a string concatenation of “Hello “ an...
View Full Document

  • Fall '19

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes