exploring development practices of android mobile apps ......case study i: software analysis for...

23
Exploring Development Practices of Android Mobile Apps from Different Categories 1 By Ahmed Abdel Moamen Chanchal K. Roy CSMR-WCRE 2014: SQM 2014

Upload: others

Post on 19-Jun-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Exploring Development Practices of Android Mobile Apps ......Case Study I: Software Analysis for Mobile Apps " We study thirty Android apps. " Choosing criteria: # The popularity amongst

Exploring Development Practices of Android Mobile Apps from Different Categories

1

By Ahmed Abdel Moamen

Chanchal K. Roy  

CSMR-WCRE 2014: SQM 2014

Page 2: Exploring Development Practices of Android Mobile Apps ......Case Study I: Software Analysis for Mobile Apps " We study thirty Android apps. " Choosing criteria: # The popularity amongst

Mobile Devices are Ubiquitous

2

!  In 2014, it is expected that 40% of all Internet traffic will be attributable to the smartphone [eMarketer, 2013]

!  Smartphone ownership rose by an annualized rate of 64% in 2Q-2013 [Comscore in Wall Street Journal, 2013]

!  One in four Americans owns smartphone [Engadget, 2013]

!  Apple Inc sold 20 million iPads in 2013 [Engadget, 2013]

Page 3: Exploring Development Practices of Android Mobile Apps ......Case Study I: Software Analysis for Mobile Apps " We study thirty Android apps. " Choosing criteria: # The popularity amongst

Categories of Mobile Apps

3

M-Commerce M-Learning Utilities

Mobile Healthcare Games

Page 4: Exploring Development Practices of Android Mobile Apps ......Case Study I: Software Analysis for Mobile Apps " We study thirty Android apps. " Choosing criteria: # The popularity amongst

Number of Mobile Apps in 2013

4

Company Platform Number of Apps

Apple iOS 650,000 Google Android 500,000 RIM BlackBerry 100,000 Microsoft Windows 50,000

Page 5: Exploring Development Practices of Android Mobile Apps ......Case Study I: Software Analysis for Mobile Apps " We study thirty Android apps. " Choosing criteria: # The popularity amongst

Development Practices of Mobile Apps

"  Existing software engineering knowledge may not hold in mobile apps.

"  Mobile devices place a restriction on the developer #  Memory consumption and availability #  How to handle memory and how the UP components be

displayed?

"  Apps development are different from the traditional software systems.

"  Understanding development practices may reduce the effort in developing mobile apps.

"  This paper explores the code characteristics and development practises of Android apps.

5

Page 6: Exploring Development Practices of Android Mobile Apps ......Case Study I: Software Analysis for Mobile Apps " We study thirty Android apps. " Choosing criteria: # The popularity amongst

Paper Outlines

"  Contributions

"  Findings

"  Case Study I: Software Analysis for Mobile Apps

"  Case Study II: Exploring the Development of Mobile Apps from Different Categories

"  Conclusions

6

Page 7: Exploring Development Practices of Android Mobile Apps ......Case Study I: Software Analysis for Mobile Apps " We study thirty Android apps. " Choosing criteria: # The popularity amongst

Main Contributions

"  Explore and compare the development practises of mobile apps from different categories.

"  Study more complex software engineering metrics # e.g., count of coupled and derived classes, max

inheritance tree, and average cyclomatic complexity)

"  The largest dataset (i.e., thirty apps).

7

Page 8: Exploring Development Practices of Android Mobile Apps ......Case Study I: Software Analysis for Mobile Apps " We study thirty Android apps. " Choosing criteria: # The popularity amongst

Interesting Findings

"  Game apps tend to be smaller in the size of code.

"  There is an inverse relationship between the number of classes and the platform dependency.

"  Android mobile apps rely much more on platform APIs.

"  Most of mobile apps show very little growth of its size after the initial commit.

"  The case study shows a nearly total absence of inheritance in mobile apps.

8

Page 9: Exploring Development Practices of Android Mobile Apps ......Case Study I: Software Analysis for Mobile Apps " We study thirty Android apps. " Choosing criteria: # The popularity amongst

Case Study I: Software Analysis for Mobile Apps

"  We study thirty Android apps.

"  Choosing criteria: #  The popularity amongst users (measured by number of

downloads). #  Have accessible source code repositories and issue tracking

systems. #  Mobile apps are taken from a number of different categories

"  Software engineering metrics: #  Size of Code and Development Team #  Platform and Third Party Libraries Usage

9

Page 10: Exploring Development Practices of Android Mobile Apps ......Case Study I: Software Analysis for Mobile Apps " We study thirty Android apps. " Choosing criteria: # The popularity amongst

Selected Mobile Apps

10

Page 11: Exploring Development Practices of Android Mobile Apps ......Case Study I: Software Analysis for Mobile Apps " We study thirty Android apps. " Choosing criteria: # The popularity amongst

Size of Code and The Development Team

11

App ID vs. Number of classes

!  Size of code ranges between 237 and 704,195 LOC !  Median 12 KLOC

!  Mobile apps have small code bases and development teams.

!  Games have small size compared to other categories.

!  Fewer developers contribute to mobile app projects.

0  

500  

1000  

1500  

2000  

0   5   10   15   20   25   30  

No.  of  C

lasses    

ID  

Mobile  App  

Page 12: Exploring Development Practices of Android Mobile Apps ......Case Study I: Software Analysis for Mobile Apps " We study thirty Android apps. " Choosing criteria: # The popularity amongst

Platform and Third Party Libraries Usage

12

0  10  20  30  40  50  60  70  80  90  100  

0   5   10   15   20   25   30  

Internal  Calls  Usage  (%

)  

ID  

Mobile  App  

0 10 20 30 40 50 60 70 80 90

100

0 5 10 15 20 25 30

Plat

form

Usa

ge (%

)

ID

Mobile App

0  10  20  30  40  50  60  70  80  90  

100  

0   5   10   15   20   25   30  

Third

 Party  Usage  (%

)    

ID  

Mobile  App  

Page 13: Exploring Development Practices of Android Mobile Apps ......Case Study I: Software Analysis for Mobile Apps " We study thirty Android apps. " Choosing criteria: # The popularity amongst

The number of classes versus the platform dependency

13

$  There is an inverse relationship between the number of classes and the platform dependency.

$  Smaller mobile apps depend more on the Anroid platform?

0  

10  

20  

30  

40  

50  

60  

70  

80  

90  

Pla;

orm  Usage  (%

)  

No.  of  Classes    

Page 14: Exploring Development Practices of Android Mobile Apps ......Case Study I: Software Analysis for Mobile Apps " We study thirty Android apps. " Choosing criteria: # The popularity amongst

Case Study II: Exploring the Development of Mobile Apps from Different Categories

"  Study four mobile apps from different categories in more depth. #  Communication and networking, game, utility and multimedia

"  Software engineering metrics: #  The project metrics #  Source Code Dependency Metrics #  The growth of lines of code over time #  Code Churn Properties #  Class Metrics

14

Page 15: Exploring Development Practices of Android Mobile Apps ......Case Study I: Software Analysis for Mobile Apps " We study thirty Android apps. " Choosing criteria: # The popularity amongst

Selected Mobile Apps

15

"  Choosing Criteria: #  Category: one app from each category #  Simplicity: the code base for the mobile app can be easily

identified #  Significant code base: mobile apps must have at least 100

source code files

Page 16: Exploring Development Practices of Android Mobile Apps ......Case Study I: Software Analysis for Mobile Apps " We study thirty Android apps. " Choosing criteria: # The popularity amongst

Source Code Dependency Metrics

16

Source Code Dependency M1: Com, M2: Game, M3: Utility, M4: Multi

!  Android mobile apps rely much more on platform and language APIs.

!  Third party dependencies account for fewer dependencies than any other dependency categories

!  The Android and Java APIs appear to provide most of the dependencies of the mobile apps

!  Over 56% of the Android mobile app dependencies are on the Android and Java APIs

0%

10%

20%

30%

40%

50%

60%

70%

80%

90%

100%

M1 M2 M3 M4

Third Party

Language

Platform

Project

Page 17: Exploring Development Practices of Android Mobile Apps ......Case Study I: Software Analysis for Mobile Apps " We study thirty Android apps. " Choosing criteria: # The popularity amongst

The growth of lines of code over time

17

!  The figure shows that source code files in communication and game apps change more frequently than other categories.

0

5000

10000

15000

20000

25000

30000

35000

40000

Nov

-07

Feb-

08

May

-08

Aug

-08

Nov

-08

Feb-

09

May

-09

Aug

-09

Nov

-09

Feb-

10

May

-10

Aug

-10

Nov

-10

Feb-

11

May

-11

Aug

-11

Nov

-11

Feb-

12

May

-12

Aug

-12

Nov

-12

Feb-

13

LOC

M1 M2 M3 M4

(Game) (Utility)

(Mul)

(Com)

Page 18: Exploring Development Practices of Android Mobile Apps ......Case Study I: Software Analysis for Mobile Apps " We study thirty Android apps. " Choosing criteria: # The popularity amongst

Code Churn Properties

18

!  The average LOC per change in all mobile apps is 72 LOC per change.

!  This indicates that Android mobile apps see many small changes

!  The third party source code has very little code churn compared to the project source code.

Page 19: Exploring Development Practices of Android Mobile Apps ......Case Study I: Software Analysis for Mobile Apps " We study thirty Android apps. " Choosing criteria: # The popularity amongst

Class Metrics

Page 20: Exploring Development Practices of Android Mobile Apps ......Case Study I: Software Analysis for Mobile Apps " We study thirty Android apps. " Choosing criteria: # The popularity amongst

Class Metrics

20

!  Android mobile apps’ developers tend to write small size classes (in terms of LOC).

!  The average number of local variables defined inside each class is too small (i.e., 3 variables).

!  There are excessive coupled classes in Android apps that may prevent reuse of existing components.

!  The average count of derived classes is 0.33, which shows a nearly total absence of inheritance.

!  The average cyclomatic complexity for all nested functions or methods in each class is very low (i.e., 2).

Page 21: Exploring Development Practices of Android Mobile Apps ......Case Study I: Software Analysis for Mobile Apps " We study thirty Android apps. " Choosing criteria: # The popularity amongst

Threats to Validity

21

!  The studied mobile apps represent a small subset of the total number of available apps.

!  We have limited our study to a single mobile platform (i.e., the Android Platform).

!  A number of third party tools were used in conducting the case study.

!  The identification of third-party libraries in each app was done using heuristics and manual analysis.

Page 22: Exploring Development Practices of Android Mobile Apps ......Case Study I: Software Analysis for Mobile Apps " We study thirty Android apps. " Choosing criteria: # The popularity amongst

Conclusions

"  The goal of this paper is to understand how high quality and successful mobile apps can be developed and maintained.

"  Mobile apps have unique code characteristics.

"  We found that mobile apps of different purposes differ in different ways.

"  Mobile apps bring a unique set of challenges to software engineering practice and research.

22

Page 23: Exploring Development Practices of Android Mobile Apps ......Case Study I: Software Analysis for Mobile Apps " We study thirty Android apps. " Choosing criteria: # The popularity amongst

Thank  You!

     

Questions  &  Answers

23