mobile applications developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • the most...

42
Mobile Applications Development Introduction, overview of frameworks

Upload: others

Post on 17-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

MobileApplicationsDevelopment

Introduction,overview offrameworks

Page 2: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

What aremobilephones?Two typesofmobilephones

• Feature Phone• Send andreceive text messages• Basiccamera• Bluetoothsupportforhands-freecommunication• Canrun basicapplications

• Smartphone(andTablets)• Allows theusertointeract with advanced applications• Highquality cameras(front/back)• Connected:4G,Wifi,Bluetooth• Graphic chipset• Runs complete operatingsystemsoftware• Music,Video• Alotofvarious apps,andmore…

Page 3: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Feature phonevssmartphoneworldwide shipmentsFrom 2008to2020

Page 4: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

GlobalMobilevsDesktopInternetusageFrom 2007to2015

Page 5: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Some statistics aboutappsmarket trendsandusagesSources:statista.com

Page 6: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Globalmarket share held byleading smartphone vendorsFrom 4thquarter2009to2ndquarter2016

Page 7: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Globaltablet unitshipments byvendorFrom 3rdquarter2011to2ndquarter2016

Page 8: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Number ofapps available inleading app storesInJune 2016

Page 9: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Number ofapps available inleading app storesInJune 2016

• 100billiontimesapps havebeendownloaded from AppStore• However,23%apps arenotused morethan onceinthefirst6months• Morethan 1000newapps perday onApple’s AppStore

Page 10: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Number of Available AppsintheAppleAppStoreFrom 2008to2015

AppleStore GooglePlay

Page 11: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Smarphone apps popular usagein2016

25%aboutgaming!

Page 12: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Smartphonedevice’s features

• Accelerometer andGyroscope(sports,game,navigation,utilities)

• GPS(navigation,utilities,game)

• Camera(photo&video,entertainment,game)• Augmented reality(AR)apps can read your locationandoverlayimagesontothelivefeedfrom thecamera

• Touchscreen (game)• Detects auserinteraction,such astapping thescreen once,double-tapping,swiping,ordragging abutton orobject

• Bluetooth(health,medical,utilities)• With connected objects

Page 13: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

3mainapps businessmodels

• Paid appso Noadd,nor limited featuresJo Peoplewho havepaid aregoodambassadors toconvince newusersJo Moreinnovative apps,cleaner interfaceJo Hardtoget newusersLo Selling is hard,app storesareovercrowdedLo Need tofind therightniche,target …

• Free,with ads revenueo Allow toget users quicklyJo Cancomprisetheapp experience,limit screenLo Notforutilityapps,supposed tohelpusers..L

• In-app purchases,Freemiumo Allow toget users quicklyJo FlexiblemodelJo Donotoffer too many nottoo fewfeaturesL

Page 14: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

WorldwideAppdownloads andRevenuebyStore,in2016

Page 15: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Differences between desktopandmobiledevices

Page 16: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Physicaldifferences between desktopsandmobiles

• Mobility• Datastorage• Memory• Energy• Screen size,number ofwindows• Inputmethods• Transfertrates

Page 17: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Physicaldifferences – Mobility

• Ofcourse,mobiledevices• Aremobile;desktopsarenot• Provide anywhere,anytime access• Canrun applicationsbased onGPSorother locationinformation

Ø Alotofnewusagescomparetodesktopapps• Example:amobiledevice applicationcan detect theuser’s locationandrequest weather ortraffic updatesspecific tothat area…

Page 18: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Physicaldifferences – Memory

• Mobiledevices haveamuch lower memorycapacity than desktops• Insufficient memorycan result incrashorvery slowperformance

Ø Development consideration• Reduced memorycapacity means less tolerance formemoryleaks

Page 19: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Physicaldifferences – Power

• Desktopspluginto electrical outletsà they haveunlimited power• Mobiledevices usebatteriesà available poweris limited.

Ø Development considerations• Processor(anddisplay)intensiveapplicationscan drainbattery power• Heavytasks should be avoid onCPUà useGPUorremote server• Users will avoid using applicationsthat usetoo much power

Page 20: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Physicaldifferences – Screen size

• Mobiledevice screens aremuch smaller than desktopmonitors.

• Designconsiderations• Reduce theamount ofitemsorinformationdisplayed atonce• Mustwell define howviews areorganised andworkflowbetween them• Fine-detailed videos,photos,andgraphics may notappear asclearly onamobiledevice screen.

Page 21: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Physicaldifferences – Inputmethods

• Mobiledevices havevery small keyboards,butgainwith multitouch• Many users prefer tousephysical keyboard,mouseortrackball

Ø Designconsiderations• Avoid creating tasks that rely heavily ontheuseofthekeys• Minimize useofthekeysfornavigationà consider using autocomplete,touchesdrag&drop

Page 22: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Physicaldifferences – Datastorage

• Desktopscan storehuge quantities ofdataandapplicationfiles

Ø Development consideration• Usewebservices:get dataon-demand,releaseafter

Page 23: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Physicaldifferences – Transfertrates

• Mobiledevice wireless networkshavemuch slower transfer ratesthan wire connections• Wirelessconnectionsareless reliable than wire connectionsandcanresult inlongerandmorefrequent outages• Users may havelimited dataaccess

Ø Development consideration• Avoid tasks that require immediate orlong,uninterrupted datatransfer.• Download dataasbackgroundtasks

Page 24: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Users differences

• Peopleusemobiledevices differently than they usedesktops• Mobileusers areyounger than desktopusers!• Atdifferent momentoftheday• Example:different objectivewhen browsing

• Mobileusers want immediate,shortandrelevantinformation• Speedoftask completion andinformationretrievalà Donotwait fornothing• Relevanceofinformationandapplication’s goalà Need singleobjectiveapps• Ease ofuseà DesignUIaccordingly

source:Microsoft&FinancialTimes

Page 25: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Aquickoverview ofpopularframeworks

Page 26: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Frameworks – Anhistory

• 1999:Sunlaunched JavaME

• 2003:Androidcompany is funded

• 2005:Googleacquired Android

• 2007:FirstiPhone,multitouch

• 2010:W3CFirstRecommendation onMobileWebApplications

• 2011:Xamarin,anativecross-platformnativeinC#

• 2012& 2014:HTML5standardFirstreleases

• Since:Alotofnewframeworks…

• 2008,March:FirstiPhoneSDKrelease

• 2008,July:Applelaunched AppStore

• 2008,August:GooglelaunchedAndroidMarket

• 2008,October:Firstsmartphoneunder Android(HTCDream)

Page 27: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Frameworks – JavaME (J2ME)

• JavaMicroEdition• Dedicatedtoembeddeddevices(notonlyphones)

• Modularframework• Multilayered:Configuration/Profiles• Midlets (MIDPProfile)• SubsetofJ2SE

• Highfragmentation• JVMnotstandardized,JSRnotcomplete

Page 28: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Frameworks – JavaME (J2ME)

• Firstframework forMobileApps• Introduced thegeneral conceptsforapp deployment (emulators,manifest,…)

• Development tool• Eclipse+SDKSun• Emulators notalways consistentwith devices

• Still alive!• Butnomoreformobilephone

Page 29: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Frameworks – Android

• Firstplatform formobiledevices• AnopensourceOSformobilephones• Adevelopment environment built overtheLinuxkernel

• Worldwidetopused framework formobileapps

• Many Androidversioncoexist• AndroidTV,AndroidAuto,AndroidWear(forwatches)• Also used onnotebooks,game consoles,digitalcameras,andotherelectronics…

Page 30: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Frameworks – Android

• Based onLinuxKernel andJavaVirtualMachine

• Until Android5.0:Runs onDalvik VirtualMachine• JIT:JustInTime,bytecode interpreted atruntime

• From Android5.0:AndroidRunTime (ART)• AOTAhead OfTime,bytecode interpreted atcompilation• Better performance

• Each applicationruns onaseparated VM• Multipleways tocommunicate (IPC,Intents,…)

Page 31: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Frameworks – AndroidMainAppcomponents

• Activities correspondtoasinglescreen• Anapp usually hasmultipleactivities• Inheritates Activity class

• Servicesrun inbackground• Nouserinterface(plays music,download data,…)• Subclass ofService

Ø Thisdesignallow any app tostart another app’s component• Using Intents,subclass ofIntent

• ContentProvidersmanageashared setofapp data• Access(read/write)tofiledata,SQLite database,persistent

objects• Example:get Contactsinformation• Subclass ofContentProvider

• BroadcastReceivers respond tobroadcastannoucements• ie:Eventornotifications• Nouserinterface• Inheritates theBroadcastReceiver class

Page 32: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Frameworks – AndroidAndroidManifest.xml

• Declare every app’s componentandressources

• Identify any userpermissionstheapp requires• ie:Readaccess totheuser’s contacts

• Declare theminimumAPILevel required bytheapp• Which SDKversionis needed?

• Declare hardwareandsoftwarefeatures used orrequired bytheapp• ie:Camera,Bluetooth,multitouch screen

• APIlibraries theapp needs tobe linked against• ie:GoogleMaps Library

Page 33: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Frameworks – AndroidDevelopment tools

• AndroidStudio,launched on2014• Was Eclipse+AndroidSDK• Based onIntelliJ IDE

• FreeandOpensource (ApacheLicense2.0)

• Multiplatform (Windows,MacOS,Linux)

• Many recent improvements:now have« usable »UIeditorandemulators

Page 34: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Frameworks – iOS

• Secondplatform formobiledevices• First(historical)advanced SDKformultitouch devices• MostlucrativeAppStore

• Bestintegration with hardware• Nofragmentation(almost)

• iOSSDKis asubset ofmacOS SDKwith additional frameworks• Also,tvOS andwatchOS• iOSSDKrecently adopted Swiftasmaindevelopment language (was Objective-C)

Page 35: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

• Low-level UNIX-like 64-bitskernel• Similar with macOS

• Multilayered architecture• Fordevelopment,usethehighest layer(when possible)• Layers contain asetofpackages(called frameworks..)

• Appsrun ondifferent Threads• Runloop mecanism tomanageinputqueue(forevents,blocks,timers,…)• Themainthreadis responsible forUIupdate• NiceConcurrency programming API:GrandCentralDispatch

Frameworks – iOS

Page 36: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

• UIApplication is theapp’s entrypoint• Exactly oneinstance• Handles incoming infofrom theOS(events,memory,…)

• UIApplicationDelegate is theProtocolimplemented byAppDelegate.swift• Allow anapp tointeract with theOS• Where theapp’s lifecycleis implemented

• UIWindow is theuniquewindow oftheapp• Except ifconnected external display…

• ViewControllers managetheviews oftheapp• MVCdesign

Frameworks – iOSMainAppcomponents

Page 37: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

• Xcode is thedevelopper tool forMac• CompleteIDEforgeneral development• Naturally integrates macOS andiOSSDK(andmore)• Run only onMac…

• Themost advanced IDEtodesignmobileapplications,inmy opinion :)• Greatview layout editor:Storyboard• EfficientiOSemulators• Many testing tools andnice features

• Connect toAppStoreforeasy app packagingandsubmission• Mustpay tosubmit apps• Freefortesting app deployment

Frameworks – iOSDevelopment tools

Page 38: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

iOSvsAndroidcomparison?

• Impossibletocomparefairly!

• Both haveprosandcons;supportersandopponents…

Page 39: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Native,Webapp orHybrid?

• Nativeapps market continuetogrow (exponentially…)• Despite ofnewwebframeworks• Butnewemerging markets

• Webapp still suffers from poor performanceanddevice integration• Butcheaper toproduce andcross-platform

• Hybrid apps seems goodtradeoff• Based onasingle« WebView »,still limited• Better device integration (AppStore,Notifications,Contacts,…)• Notforcomplexapps

Page 40: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Native Hybrid Webapp

Development skills neededSwift,iOSSDK,Java,Android

SDKHTML,CSS,Javascript,MobileDevelopment Framework HTML5,CSS,Javascript

Distribution AppStore/Market AppStore/Market WebDevelopment speed Slow Moderate Fast

Development &Maintenancecost High Moderate Low toModerateAppperformance High Moderate Moderate

Device AccessandfeaturesPushNotifications Yes Yes NoContacts Yes Yes NoOfflineaccess Yes Yes No(*)Geolocation Yes Yes Yes(*)Gyroscope,Accelerometer Yes Yes Yes(*)Camera Yes Yes Yes(*)Microphone Yes Yes Yes(*)Swipe Navigation Yes Yes Yes(*)

BestUsed For*Games oradvanced apps*Highperformance,graphics*Bestuserexperience

*Donotneed bestperformance*Need fulldevice access

*Limitedbudget*Donotneed bestperformance*Dononeed fulldevice access

Native,Webapp orHybrid?

Page 41: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Acrossplatform solution:Xamarin

• Develop iOS,Android,OSXandWindowsapps using C#• Compiletonativeapps!• Sharecodebetween multipleplatforms• Freeforindividual developpers (thanks to..Microsoftrecent purchase)• Need toknowaboutboth C#andtarget APIs(forbestusage)

• Notnecessary up-to-datewith lastSDKfeatures• Mayneed towait forlastAPIintegration• Sometime hardtobind with third-partieslibraries

Page 42: Mobile Applications Developmentstephane.ayache.perso.luminy.univ-amu.fr/classic/... · • The most advancedIDE to design mobile applications, in my opinion :) • Great view layout

Conclusions

• Mobileapps development is still achallengefornext decades• Appmarket keeps growing• Changeusagesandapp development processes

• Many mobileapp frameworks• 2popular nativeframeworks:iOSandAndroid• Hybrids app is goodcompromisebutlimited• Nativeapps offers much possibilities

Ø Let’s learn SwiftandiOSframeworks!