43
September 2016 Startup Engineering Cookbook for Mobile Apps From Slides to Mobile App

Startup Engineering Cookbook for Mobile Apps

Embed Size (px)

Citation preview

Page 1: Startup Engineering Cookbook for Mobile Apps

September 2016

StartupEngineeringCookbookforMobileAppsFromSlidestoMobileApp

Page 2: Startup Engineering Cookbook for Mobile Apps

OverviewSlide Topic

3 IHaveThisGreatAppIdea…4 TheLeanStartup5 ImplementationOptions6-9 MobileAppDesignProcess10-14 MobileAppArchitecture15-25 BackendArchitecture26-31 Reference Architecture32-36 Monitoring37-38 DisasterRecovery39-40 Scaling41-42 InternalCommunication43 Questions?

Page 3: Startup Engineering Cookbook for Mobile Apps

IHaveThisGreatAppIdea…

3

Thedeckwillcoverthetechnology optionswhengoingfromanideatobuildingamobileappandbeyond...

[meantforanon-technicalaudience]

Page 4: Startup Engineering Cookbook for Mobile Apps

TheLeanStartup

4

It’sanapproachforlaunchingbusinessesandproducts,thatreliesonvalidatedlearning,scientificexperimentation,anditerativeproductreleasestoshortenproductdevelopmentcycles,measureprogress,andgainvaluablecustomerfeedback.

[Wikipedia ]

ItisTHEindustrybibleforstartups...READIT.

[TheReality]

Page 5: Startup Engineering Cookbook for Mobile Apps

ImplementationOptionsThereare3optionsforbuildingamobileapp:

Buildinternally

Outsource

Hybrid- hireatechnicallead

BuildingamobileappisliketheKamaSutra...therearemanywaystoaccomplish“it”

5

1

2

3

Page 6: Startup Engineering Cookbook for Mobile Apps

MobileAppDesignProcess

6

Creatingamobileappinvolvesasignificantamountofupfrontdesignworkfortheoveralllook,feelandfunctionalityoftheapp.

Page 7: Startup Engineering Cookbook for Mobile Apps

PaperPrototypeGettingtothefinallookandfeelofanmobileapprequiresamulti-stepprocess.Thefirststepisunderstandingwhattheflowandfunctionalitywillbeofthemobileapp.

mobile app paper prototype 7

Ourchoice:Pencilandpaper. It’sfreeandworkssurprisingwell.

Page 8: Startup Engineering Cookbook for Mobile Apps

WireframesWireframesstarttogiveyouanideaofwhatthemobileappwillcontainwhenitcomestoinformation,navigationandinterfacedesign.

mobile app wireframe tools 8

Ourchoice:Anyoftheabove+InVision. Theabilitytosharedesignsandmakecommentscanspeedupthedesignprocess.

Options:Axure,Balsamiq,Flinto,HotGloo,Justinmind,MockFlow,Moqups,Sketch,SolidifyandUXPin

Page 9: Startup Engineering Cookbook for Mobile Apps

FinalDesignsAfterseveralroundsofdiscussiononthewireframes,youwillhavetolockdownthefeaturesandflowsothedesignercandeliverthefinalscreensthatthedeveloperswillneed.

app design 9

Ourchoice:Letthedesignerschoose.

Options:AdobeIllustrator,AdobePhotoshop,CorelDRAWandSketch

Creatingthelookisoneaspect,theothersincludeanimationsandinteractionstheuserwillseeonthescreen.And,whatgesturesausermightneedtoperformintheapp(ex.swipetotheright).

Page 10: Startup Engineering Cookbook for Mobile Apps

MobileAppArchitecture

10

Thisrelatestowhattheuserseesonthemobilescreen.

Page 11: Startup Engineering Cookbook for Mobile Apps

MobilePhonePlatformsTherearereallyonlytwo majormobileplatformsthatarecurrentlyinuse – AndroidandiOS.

Otheroptions:Blackberry and MicrosoftWindowsPhone

mobile phone platforms 11

Ourchoice:AndroidandiOS.InAsia,AndroidismorepopularbutthetastemakersandjournaliststendtobeoniOS.IntheUSandEuropeyoucangetawaywithiOSinitiallythenAndroid.

Page 12: Startup Engineering Cookbook for Mobile Apps

DevelopmentOptions

native hybrid mobile apps 12

Ourchoice: ItDepends.NativedevelopmentbringsamuchricherexperiencebutlatelyReactNativeisgainingtractionforhybriddevelopment.

Page 13: Startup Engineering Cookbook for Mobile Apps

Oneofthebiggestfeaturesmanymobileappsareimplementingistheabilitytoletuserschatwithintheapp.

Options:Firebase,Layer,PubNub,Pusher,QuickBlox,Sinch,socket.io,XMPP

In-AppChatMessaging

instant messaging 13

Ourchoice:ForanMVPlaunchPubNuborFirebasearegood.ForthelongertermbuildingachatsystemfromscratchmightusingSocket.io betherightoption.

Page 14: Startup Engineering Cookbook for Mobile Apps

Whenusersstarttointeractwiththeapp,youwillwanttosendthemnotificationssuchasatransactionhasbeencompletedorsomeonehaslikedtheircommentorapasswordresetlink.

4Options:

Notifications

mobile app notifications 14

Ourchoice:Itdependsonhow“noisy”youwantyourapptobe.

In-App.Whentheappisopenandbeingused

Push.Whentheappisnotbeingused,itwillsendanotification

E-mail SMS

1 2

3 4

Page 15: Startup Engineering Cookbook for Mobile Apps

BackendArchitecture

15

Althoughthefrontendofthemobileappgetsalltheglory,therealworkisdonebehindthescenes.

Page 16: Startup Engineering Cookbook for Mobile Apps

MobileBackendasaService

mobile backend service 16

Ourchoice:Firebase.Butyourmileagemayvarydependingonhowcomplexyourmobileappis.Afullscalebackendmightberequirediftheappiscomplexsuchasamarketplacemobileapp.

ThereisagrowingtrendaroundusingMobileBackendasaService(MBaaS)options.Itsimplifiesthebackendservicesthatarerequiredforamobileappbutarenotasfeaturerichasafullscalebackendservice.

Options:AnyPresence,Appcelerator,FeedHenry,Firebase,Kinvey,Meteor,ShepHertz

Page 17: Startup Engineering Cookbook for Mobile Apps

InfrastructureProviderIfyouoptforafullscalebackend,thosecomponentsmustresidesomewhere.

Options:AmazonWebServices(AWS),GoogleCloudPlatform,localhostingprovider,MicrosoftAzure,Netmagic,Rackspace

web hosting services 17

Ourchoice:AmazonWebServices(AWS).Theyarethe#1leaderinwebinfrastructureservicesalsoknownascloudservices.

Page 18: Startup Engineering Cookbook for Mobile Apps

Centralvs.DistributedTheoldwayofdesigningtheinfrastructureforabackendwastoputalltheresourcessuchasdatabases,files,images,etc...onthesameserver.Theproblemisifyourdatabaseisslowandeverythingelseisfine,youhavetoupgradetheentireserveranddisrupttheotherfunctions. Bydistributingtheresourcesyoucanquicklypinpointthebottleneckandscalethatparticularresource.

distributed web architecture

Central

Ourchoice:DistributedArchitecture.

Distributed

Computing Database StaticFiles

Computing,database,files,etc...

18

Page 19: Startup Engineering Cookbook for Mobile Apps

Managedvs.Self-ServiceIfyourteamistechnicalitmightnotbetechnicalintermsofhardware.Justbecausesomeoneknowsaprogramminglanguagedoesnotmeantheyhavetheinfrastructureknowledgetorunthebackend.

Somestartupsprefertooutsourcethemanagementoftheirhardwaretoahostingproviderorusethe“premium”optionofacloudserviceprovider.

Ourchoice:Self-Service. ThetoolsthatareprovidedbyAWSarequitepowerfulandeasytouseformanagingtheentireAWSinfrastructure.

managed server hosting 19

Page 20: Startup Engineering Cookbook for Mobile Apps

TechnologyStackThe“stack”referstoasetofsoftwarecomponentsneededtocreateacompleteplatform.Foramobileapplicationthatincludestheoperatingsystem,webserver,databaseandprogramminglanguage.

lamp lemp mean 20

Ourchoice:Itdepends.Severalfactorstoevaluateincludetimetomarket, costandknowledgeofthetechnologystack.

1 2

3 4

LAMPStack

LEMPStack

MEANStack

WindowsStack

Page 21: Startup Engineering Cookbook for Mobile Apps

OperatingSystemThereareonlytwooptions- MicrosoftWindowsorLinux.Windowsislimitedinthetypeofprogramminglanguagesthatyoucanrunontheserver. Linuxisopensourceandhasalargecommunitythatiscontinuallyimprovingtheoperatingsystem.WithinLinuxtherearemanyversions suchasDebianandRedHattochoosefrom.

linux hosting 21

Page 22: Startup Engineering Cookbook for Mobile Apps

Softwarethatdeliversinformationfromtheservertoamobileapp.

Options:Apache,Lighttpd,MicrosoftInternetInformationServer(IIS),Nginx,Node.js,Rails,Tornado

WebServer

web servers 22

Page 23: Startup Engineering Cookbook for Mobile Apps

Theheartofanymobileappisthedatabasesinceitstoresalltheuserinformationandeverythingelserelatedtothemobileapplication.Therearetwocategoriestoconsider:SQLorNoSQL.

Options:AmazonDynamoDB,Cassandra,CouchDB,MariaDB,MicrosoftSQL,MongoDB,MySQL,Oracle,PostgreSQL

Database

mysql nosql 23

Page 24: Startup Engineering Cookbook for Mobile Apps

Ifyouask4programmerswhichisthebestlanguage,youwillmostlikelyget5differentanswers.

Options:Clojure,Express,Java,JavaScript,Microsoft’s.NET,Perl,PHP,Python,Ruby

ProgrammingLanguage

Web services backend languages 24

Page 25: Startup Engineering Cookbook for Mobile Apps

AnApplicationProgrammingInterface(API)ishowthefrontendofthemobileappcommunicateswiththebackendtodisplayinformationtotheuser.

WebServicesArchitecture

Api mobile access 25

Previously Today Future

Inthelate1990’s,MicrosoftreleasedaspecificationcalledSimpleObjectAccessProtocol(SOAP).ItusedExtensibleMarkupLanguage (XML)tosenddatatoarequestingendpoint.

Intheearly2000’saspecificationwasreleasedcalledRepresentationalStateTransfer(REST).Ithasbecomethedefactostandard toenablemobileappstocommunicatewiththebackend.It’scommonlyreferredtoasaRESTful API.

GraphQL isanewnestedquerylanguage. It’sanopensourcestandardpublishedbyFacebooktoenhancetheRESTspecification.

Page 26: Startup Engineering Cookbook for Mobile Apps

SampleArchitecture

26

Howdoesitallworktogether?

Page 27: Startup Engineering Cookbook for Mobile Apps

TheappUIisa smallpiece

Page 28: Startup Engineering Cookbook for Mobile Apps

MobileAppRoles

28

Visuallycreatestheuserinterface(UI)andtheoveralluserexperience(UX)

MobileDeveloper

BackendEngineer

OperationsEngineer

App Server

UI/UXDesigner

ConvertstheUI/UXdesignintoObjective-C(iOS)orJava(Android)

ConvertsthebusinesslogicintocomputercodeusingJava,JavaScript,PHP,Python,PERL,.NET,etc...

Managestheservers,databases,DNSinformation,andotherwebsiteinfrastructure

Page 29: Startup Engineering Cookbook for Mobile Apps

Day0

29

ElasticComputeCloud(EC2)t1.micro

RDSMySQLt1.micro

S3

Region:APAC- Singapore

SingleRegion,SingleAvailabilityZone

Users

Internet

AvailabilityZone:AP-Southeast-1a

Page 30: Startup Engineering Cookbook for Mobile Apps

Day0+X

30

RDSMySQL

S3

Internet

DatabaseReplication

ElasticComputeCloud(EC2)

RDSMySQL

AvailabilityZone:AP-Southeast-1b

ElasticLoadBalancer(ELB)

S3

ElasticComputeCloud(EC2)

Region:APAC- Singapore

AvailabilityZone:AP-Southeast-1a

Users

SingleRegion,Multi AvailabilityZone

Thefaulttolerantdesign allowsforoneoftheavailabilityzonesnotbeingavailable.

Page 31: Startup Engineering Cookbook for Mobile Apps

RDSMySQL

S3

InternetRDSMySQL

ElasticLoadBalancer(ELB)

S3

Day0+2X

AvailabilityZone:US-East-1a

ElasticComputeCloud(EC2)

ElasticComputeCloud(EC2)

31

Region:APAC- Singapore

AvailabilityZone:AP-Southeast-1a

Region:USEast(N.Virginia)

Users

Multi-Region

Thefaulttolerantdesign allowsforoneoftheregionsnotbeingavailable.Thedesignalsoallowsforuserstobeloadbalancedbasedongeographiclocation.

Page 32: Startup Engineering Cookbook for Mobile Apps

Monitoring

32

Whathappenswhenyouaresleeping?

Page 33: Startup Engineering Cookbook for Mobile Apps

Bymonitoringtheinfrastructure,youcanproactivelyplanifcertaincomponentsneedtobeupgraded.

InfrastructurePerformance

33

Page 34: Startup Engineering Cookbook for Mobile Apps

Understandinghowtheapplicationaffectstheinfrastructureisessential.Ifthereareveryfewusersbuttheserversanddatabasesareconsistentlyrunningatpeakutilization,thatmightindicateaprogrammingissue.

ApplicationPerformance

34

Page 35: Startup Engineering Cookbook for Mobile Apps

GoogleAnalyticsistheindustrystandardfortrackingappstatisticssuchasusers,usageandmanyotherstatistics.Buttherearemanyothersthatprovidebettermobileuserengagement.

UserAnalytics&Engagement

35

Page 36: Startup Engineering Cookbook for Mobile Apps

Youmayhavethebestprogrammersworkingontheapp,buttestingandbugareapartofthedevelopmentalcycle…getusedtoit.

Options:BugClipper,Crashlytics,Crittercism,HockeyApp,SplunkMint

Testing&BugTracking

app bug testing 36

Ourchoice:Crashlytics.It’soneofthemostwidelyusedservices andit’sfreefromTwitter.

Page 37: Startup Engineering Cookbook for Mobile Apps

DisasterRecovery

37

Ifdisasterstrikesareyouready?

Page 38: Startup Engineering Cookbook for Mobile Apps

Havingadisasterrecoveryplaninplaceiscriticaltoensurethewebsitecanrecoverfromacatastrophicevent.

Takingadaily/weekly/monthlysnapshotoftheservers, filesanddatabasesisaminimumrequirement.Thedaily/weekly/monthlybackupscheduleissometimesreferred toastheson/father/grandfatherrotationschedule.

BackingUp&Restoring

Ifdisasterdoesstrikesandacompletebackupstrategyisinplace,thenitshouldnotbeverydifficulttorestorethewebsitefromthebackupsthatarebeingmaintained.

38

Page 39: Startup Engineering Cookbook for Mobile Apps

Scaling

39

Whathappensifyourmobileappisanovernightsuccess?

Page 40: Startup Engineering Cookbook for Mobile Apps

Hopefully,theappyoulaunchisamassivesuccessandleadstoyourbackendhavingatoughtimehandlingtheload.

Withmanycloudserviceprovidersyoucanautomaticallyaddadditionalresourcesbasedonpredefinedrules.Anexampleisbelow:

AddingInfrastructureResources

Rule Action

IfCPUutilizationgoesabove60%duringa5minuteperiod

Upgradetheservertothenextlargersizetohandletheadditionalload

40

Page 41: Startup Engineering Cookbook for Mobile Apps

InternalCommunication

41

Howdoesyourteamcommunicate?

Page 42: Startup Engineering Cookbook for Mobile Apps

Teamcommunicationiscriticalinafastpacedinternet business.Therearetwomaincategoriesthatmanyofthetoolsavailablefallinto:1.todolistandtaskmanagement2.instantmessaging

TeamCommunications

42

Page 43: Startup Engineering Cookbook for Mobile Apps

Questions?

Version:Ferrari

ManishJainCo-Founder,MProfit@[email protected]

Youcancontactmeatthecoordinatesbelow.