Documente Academic
Documente Profesional
Documente Cultură
MobileApplicationDevelopmentBest Practices
WhitePaper
2007AT&TKnowledgeVentures
Thisdocumentandtheinformationcontainedherein(collectively,the"Information")isprovidedtoyou(boththeindividualreceiving thisdocumentandanylegalentityonbehalfofwhichsuchindividualisacting)("You"and"Your")by AT&T,onbehalfofitselfand itsaffiliates(" AT&T ")forinformationalpurposesonly.AT&TisprovidingtheInformationtoYoubecauseAT&Tbelievesthe InformationmaybeusefultoYou.TheInformationisprovidedtoYousolelyonthebasisthatYouwillberesponsibleformaking YourownassessmentsoftheInformationandareadvisedtoverifyallrepresentations,statementsandinformationbeforeusingor relyinguponanyoftheInformation.AlthoughAT&ThasexercisedreasonablecareinprovidingtheInformationtoYou,AT&Tdoes notwarranttheaccuracyoftheInformationandisnotresponsibleforanydamagesarisingfromYouruseoforrelianceuponthe Information.YoufurtherunderstandandagreethatAT&Tinnowayrepresents,andYouinnowayrelyonabelief,thatAT&Tis providingtheInformationinaccordancewithanystandardorservice(routine,customaryorotherwise)relatedtotheconsulting, services,hardwareorsoftwareindustries. AT&TDOESNOTWARRANTTHATTHEINFORMATIONISERRORFREE. AT&TISPROVIDINGTHEINFORMATIONTOYOU "ASIS"AND"WITHALLFAULTS." AT&TDOESNOTWARRANT,BYVIRTUEOFTHISDOCUMENT,ORBYANYCOURSEOF PERFORMANCE,COURSEOFDEALING,USAGEOFTRADEORANYCOLLATERALDOCUMENTHEREUNDEROR OTHERWISE,ANDHEREBYEXPRESSLYDISCLAIMS,ANYREPRESENTATIONORWARRANTYOFANYKINDWITH RESPECTTOTHEINFORMATION,INCLUDING,WITHOUTLIMITATION,ANYREPRESENTATIONORWARRANTYOF DESIGN,PERFORMANCE,MERCHANTABILITY,FITNESSFORAPARTICULARPURPOSEORNONINFRINGEMENT,OR ANYREPRESENTATIONORWARRANTYTHATTHEINFORMATIONISAPPLICABLETOORINTEROPERABLEWITHANY SYSTEM,DATA,HARDWAREORSOFTWAREOFANYKIND.AT&TDISCLAIMSANDINNOEVENTSHALLBELIABLEFOR ANYLOSSESORDAMAGESOFANYKIND,WHETHERDIRECT,INDIRECT,INCIDENTAL,CONSEQUENTIAL,PUNITIVE, SPECIALOREXEMPLARY,INCLUDING,WITHOUTLIMITATION,DAMAGESFORLOSSOFBUSINESSPROFITS,BUSINESS INTERRUPTION,LOSSOFBUSINESSINFORMATION,LOSSOFGOODWILL,COVER,TORTIOUSCONDUCTOROTHER PECUNIARYLOSS,ARISINGOUTOFORINANYWAYRELATEDTOTHEPROVISION,NONPROVISION,USEORNONUSE OFTHEINFORMATION,EVENIFAT&THASBEENADVISEDOFTHEPOSSIBILITYOFSUCHLOSSESORDAMAGES.
2007AT&TKnowledgeVentures
RevisionHistory
Allmarks,trademarks,andproductnamesusedinthisdocumentarethepropertyoftheirrespectiveowners.
Date
Revision
Description
9/22/2007
1.0
Firstrelease
2007AT&TKnowledgeVentures
TableofContents
1. Introduction ....................................................................................................................................... 1 1.1 1.2 1.3 1.4 Audience ................................................................................................................................. 1 ContactInformation................................................................................................................. 1 Resources ............................................................................................................................... 2 TermsandAcronyms............................................................................................................... 2
2. Scope............................................................................................................................................... 4 3. UniqueAspectsofMobileApplications .............................................................................................. 5 4. FormulateaWirelessStrategy........................................................................................................... 6 4.1 4.2 4.3 4.4 4.5 4.6 GatherRelevantDocumentation .............................................................................................. 6 IdentifyandInterviewKeyStakeholdersandRepresentativeUsers.......................................... 6 ResearchIndustryandCompetitiveTrends.............................................................................. 6 ConductStrategySessions...................................................................................................... 7 IdentifyKeyMobileProcessesandValueDrivers..................................................................... 7 ExamineImpactonKeyBusinessProcessesandReengineertheProcessesasNecessary .... 8
5. EvaluateTechnologyRequirementsandAvailableApproaches ......................................................... 9 6. FittheMobileSolutiontotheEnvironment....................................................................................... 11 7. DefineaPlatformPolicy .................................................................................................................. 15 8. RemembertheMobileDeviceIsNottheDesktop ............................................................................ 16 9. AnalyzeCoverage........................................................................................................................... 18 10. ManageMobileDevices .................................................................................................................. 19 11. DesignforSecurity.......................................................................................................................... 20 12. Conclusion ...................................................................................................................................... 22 13. AppendixA:MobileApplicationDevelopmentSteps ........................................................................ 23 13.1 PrioritizingMobilizationOpportunities..................................................................................... 23 13.2 MobileApplicationDevelopmentSteps .................................................................................. 24 14. AppendixBMobileApplicationDevelopmentReference .................................................................. 28 14.1 MobileApplicationArchitectures ............................................................................................ 28 14.2 MobileApplicationDevelopmentTechnologies....................................................................... 33 14.3 MobileApplicationDevelopmentTools................................................................................... 37
2007AT&TKnowledgeVentures
TableofContents
14.4 CapabilitySummaryofMobilePlatforms ................................................................................ 38 14.5 ThroughputandLatency ........................................................................................................ 39 14.6 BatteryandPowerManagement ............................................................................................ 40 14.7 Input,Text,Screens,Usability................................................................................................ 42 14.8 MemoryManagement ............................................................................................................ 43 14.9 Network ................................................................................................................................. 45 14.10 ConnectionManagement ....................................................................................................... 46 14.11 Security ................................................................................................................................. 48 14.12 Pushvs.Pull.......................................................................................................................... 50 14.13 Telephony,SMS,SIMInterfaces............................................................................................ 53 14.14 CommunicationCostManagement ........................................................................................ 54 14.15 ManagingAmountofDataCommunicated ............................................................................. 55 14.16 RecoveryandDiagnostics ..................................................................................................... 56
Figures
Figure1:Development/SupportCostvs.Usability/Sophistication ........................................................... 10 Figure2:MiddlewareArchitecture.......................................................................................................... 12 Figure3:ProjectPrioritizationMatrix...................................................................................................... 24 Figure4:Web1.0Example ................................................................................................................... 35 Figure5:Web2.0VersionoftheSameApplication................................................................................ 36 Figure6:HandheldDeviceCommunicationArchitecture........................................................................ 47 Figure7:SecurityonanEndtoEndBasis............................................................................................. 50 Figure8:PullArchitecture...................................................................................................................... 51 Figure9:PushArchitecture ................................................................................................................... 51
Tables
Table1:TermsandAcronyms ................................................................................................................. 2 Table2:StrengthsandWeaknessesofMobileComputingSolutions...................................................... 13 Table3:ProsandConsofDifferentDevelopmentApproaches .............................................................. 31 Table4:MobilePlatformDevelopmentMatrix ........................................................................................ 37 Table5:DifferentCapabilitiesofMobileDevices.................................................................................... 38 Table6:WirelessNetworkThroughputSpeeds...................................................................................... 39 Table7:Wirelessvs.WirelineNetworking............................................................................................. 46 Table8:SomeCommonAPIsforConnectionManagement................................................................... 47 Table9:SMSandSIMAPIsforHandheldPlatforms.............................................................................. 54 Table10:CompressionAPIsforHandheldPlatforms............................................................................. 55
2007AT&TKnowledgeVentures
1. Introduction
Withtheincreasesinwirelessnetworkbandwidthanddemandfrommobile users,mobiledatausageisexploding.Companiesareundermountingpressure totakeadvantageofthebandwidth.Forexample,salesmanagerswant customerrelationshipinformationattheirfingertips,deliverypersonnelwantup todatelocationinformation,andfleetmanagerswanttomaximizethe productivityoftheirworkers. Whataboutpackagedapplications?Severalgoodoptionsareavailableacrossall verticals,withnewapplicationscomingouteveryday.Manyoftheseapplications allowsomecustomization.However,asmobileapplicationdeploymentsmature, enterprisesarefindingtheneedtodoextensivecustomization.Facingmake/buy decisions,moreenterprisesarelookingtodevelopcustomapplicationstomeet theirpreciseneeds.Insomecases,solutionintegratorscanofferaviable alternative. Manydevelopersbegancreatingapplicationsforserversorpersonalcomputers andthenmovedtomobiledevices.Theextensibilityoftoolsandcommon programmingenvironmentshavemadethistransitionfairlystraightforward, althoughdevelopersdohavetoaddressissuesspecifictomobilecomputingand wirelessnetworking.Developersareoftenthefirstpeopleinacompanytocarry outsuchmobilizationefforts,andtheenterprisemaynothavebuiltupasetof bestpractices.Manymistakeshavebeenrepeated,soAT&Tpresentsthiswhite paperasaguide.
1.1
Audience
ThetargetaudienceofthiswhitepaperisITdevelopers,architects,and managerslookingforcommonbestpracticesfortheirmobiledevelopment efforts.Inparticular,thepaperisgearedtowardexperienceddeveloperswhoare newtomobiledevelopment.
1.2
ContactInformation
EmailanycommentsorquestionsregardingthiswhitepaperviatheAT&T DeveloperProgram.Pleasereferencethetitleofthispaperinthemessage.
2007AT&TKnowledgeVentures
1.3
Resources
AT&TResources AT&TDeveloperProgram:http://developer.att.com MobileApplicationDevelopment:http://developer.att.com/mobiledevelopment WirelessReferenceArchitectureMaterial:http://developer.att.com/WRA SecurityGuidelines:http://developer.att.com/security APNInformation:http://developer.att.com/apn CertifiedApplicationCatalog:http://developer.att.com/certifiedsolutionscatalog devCentralResourceonPlatformsandOperatingSystems
1.4
TermsandAcronyms
Thefollowingtabledefinestheacronymsusedinthisdocument.
Table1:TermsandAcronyms
TermorAcronym Definition
2G 3G 3GPP Ajax API APN CPU CRM CVS DHCP DHTML DMZ EAI EDGE GUI GSM HSDPA
SecondGeneration ThirdGeneration ThirdGenerationPartnershipProject AsynchronousJavaScriptAndXML ApplicationProgrammingInterface AccessPointName CentralProcessingUnit customerrelationshipmanagement ConcurrentVersioningSystem DynamicHostConfigurationProtocol DynamicHypertextMarkupLanguage DemilitarizedZone EnterpriseApplicationIntegration EnhancedDataRatesforGSMEvolution GraphicalUserInterface GlobalSystemforMobilecommunications HighSpeedDownlinkPacketAccess
2007AT&TKnowledgeVentures
TermorAcronym
Definition
HTML HTTPS I/O IDE IP IPsec ISP JavaME JPEG JSON Kbps LAN Mbps MIDP PDF PDP PNG RAM SDK SIM SMPP SMS SOAP SSL SVG UMTS USB VM VPN WAP WAV XML
HypertextMarkupLanguage HypertextTransferProtocoloverSecureSockets Layer Input/Output IntegratedDevelopmentEnvironment InternetProtocol InternetProtocolSecurity InternetServiceProvider JavaPlatformMicroEdition JointPhotographicExpertsGroup JavaScriptObjectNotation KilobitsPerSecond LocalAreaNetwork MegabitsPerSecond MobileInformationDeviceProfile PortableDocumentFormat PacketDataProtocol PortableNetworkGraphics RandomAccessMemory SoftwareDevelopmentKit SubscriberIdentityModule ShortMessagePeertoPeerProtocol ShortMessageService SimpleObjectAccessProtocol SecureSocketsLayer ScalableVectorGraphics UniversalMobileTelecommunicationsSystem UniversalSerialBus VirtualMachine VirtualPrivateNetwork WirelessApplicationProtocol WaveformAudioFormat eXtensibleMarkupLanguage
2007AT&TKnowledgeVentures
2. Scope
Thepotentialscopeofawhitepaperonmobileapplicationdevelopmentishuge. Itcouldaddressmanytopics,includingthechoiceofplatforms,mobileoperating systems,mobilemiddleware,anddevelopmenttools.Thefocusinthemainbody ofthispaperisguidingprinciplesthatcaneasedevelopmentandspeedthe developmentprocess.Theseincludebestpracticesforformulatingawireless strategyandtipsonsolutiondesign,development,deployment,and maintenance.Thepaperalsocoversanalysisandoptimizationofwireless solutions,whichinvolveavarietyoffactorsandissuesrelatedtodesign, development,implementation,anddeployment. AppendixAprovidesanoverviewofthestepsinvolvedinmobileapplication development.AppendixBprovidespracticalinformationonspecificaspectsof mobileapplicationdevelopment,includingmobilecomputingarchitectures, developertools,bandwidthandlatencydetails,powermanagement,memory management,pushversuspull,userinterfaces,networkingconsiderations,and security.Thegoalistogivereadersaninitialcontextforunderstandingthe uniqueaspectsofmobileapplicationdevelopment.AT&Thasextensivematerial availableforitsdeveloperscoveringmanyofthetopicsraisedinthiswhitepaper ingreaterdetail.Beyondthat,extensiveinformationisavailablefromother parties,suchasmobileoperatingsystemvendors.
2007AT&TKnowledgeVentures
3. UniqueAspectsofMobileApplications
Mobileapplicationsarenotjustdesktopapplicationsreformattedforasmall display.Theyarefundamentallydifferentformanyreasons.First,theabilityto communicatefromanywhereessentiallychangeshowusersinteractwithan application.Forexample,abatchprocessthatpreviouslyrequiredauserto uploadinformationattheendofthedayisnowadynamic,interactiveprocess thatoccursthroughouttheday.Second,theidealuserinterfaceforasmall screenandasmall(ifany)keyboarddifferssignificantlyfromdesktop/laptop systems.Third,thetypesofcommunicationschannelsaredifferent.Mobile devicesincorporatevoicecapability,messagingcapability(thatis,Short MessageService[SMS]),locationinformation,andnowvideo.Thebestmobile applicationsintegratethesecapabilitiestooptimizehowusersinteractwithdata. Finally,thenatureofwirelessnetworksisdifferentthanthatofwirelinenetworks. Thoughtodayswirelessnetworksofferbroadbanddatacapabilities,throughput canvarybasedonsignalquality,andanetworkconnectionisnotalways available,particularlyifusersaremobile.
2007AT&TKnowledgeVentures
4. FormulateaWirelessStrategy
Priortoembarkingonspecificinitiativesforthedevelopmentanddeploymentof mobilitysolutions,AT&Trecommendsdefiningaformalprocessforsettingan overallmobilitystrategy.Thisstrategyformulationprocessissimilartothe strategicplanningprocessusedinotherdisciplineswithintheorganization.The recommendedprocessincludesthefollowingsteps:
4.1
GatherRelevantDocumentation
First,gatherandreviewallexistingstrategydocumentsthatmayberelevantto theorganizationsobjectiveswithrespecttowirelessmobilityandmobile businessprocessesingeneral.Thesedocumentswillhelpensurethealignment ofanymobilityinitiativeswithbusinessobjectivesandtheexistingenterprise architecture.
4.2
IdentifyandInterviewKeyStakeholdersandRepresentative Users
Priortoschedulingactualstrategyformulationsessions,developalistof questionsthatwillbegintobringsomedirectiontothestrategyformulation process.Identifyandinterviewkeystakeholders,includinganymobiledeviceend users.Theinterviewsshouldservetwopurposes.First,theyshouldhelpuncover anyexistingmobilityprojectsorstrategyelementsandestablishthefoundation knowledgeoftheexistingenterprisearchitecturewithwhichthenewmobile architecturemustintegrate.Second,interviewsareanopportunitytoidentify, understand,anddocumentprocessesthatmaybenefitfrommoredatainmore places.Keystakeholderscanbehelpfulinidentifyingimportantmobileprocesses andprovidingapreliminaryunderstandingofthoseprocesses.Butrepresentative usersthepeoplewhoactuallyexecutetheprocessesonadailybasisgenerally willprovideamuchmoreaccurateanddetailedpictureoftheprocessesthey perform,howtheyperformthem,andhowtheprocessescouldbeimprovedif mobiledatawereavailable.
4.3
ResearchIndustryandCompetitiveTrends
Beforethesessionbegins,itisimportanttoresearchwhatothersinthesame andrelatedindustrieshavedone.Understandingwhatcompetitorsandothersin
2007AT&TKnowledgeVentures
4.4
ConductStrategySessions
Duringstrategysessions,addressthefollowingtopics:
4.5
IdentifyKeyMobileProcessesandValueDrivers
Thisisthemostimportant,andoftenthemostdifficult,partofastrategysession. Resisttheimpulsetothinkintermsofmobilizingdesktopapplicationsrather, thinkofimprovingexistingorenablingnewprocessesinmobileenvironments. Identifyandcatalogactivitiesemployeesperformawayfromtheiroffices.Include processesthatarenotcurrentlyautomated,inadditiontopossibleprocessesthat arenotcurrentlyperformedbecausetherequireddataisunavailablewhereand whenitisneeded.Createasisprocessmapsforeachprocessidentified.Use theprocessmapstoidentifypossiblepointsofleverage,wherebetter,more timelydataavailabilitycouldsavetimeandmoney,driverevenue,orimprove customersatisfaction.Todevelopthebestpossibleprocessmaps,itmaybe necessarytodoadayinthelifeexercise.Theseexercisesinvolvefollowing usersaroundonatypicalworkdayanddocumentingwhatprocessesthey performandhowtheyperformthem.Donotforgettoaskthemostimportant question,Whydoyoudoitthatway?
2007AT&TKnowledgeVentures
4.6
ExamineImpactonKeyBusinessProcessesandReengineer theProcessesasNecessary
Mobiledatahasthepotentialtodramaticallychangethewayemployeeswork. Startingwiththeleveragepointsidentifiedinthepreviousstep,determinehow theprocesscanbestreamlined,simplified,orimprovedtomaximizethevalue generated.Donotbeoverlyinfluencedbyexistingprocesses,especiallyifthose processesarecurrentlyperformedinanenvironmentdifferentfromthetarget mobileenvironment. Theprocessmayoftenneedtobecreatedfromthegroundup,leveragingnew capabilitiesthataremadeavailablebythemobilizationofdata.Thisis particularlytrueiftheprocessisperformedmanuallyorhashistoricallybeen deskbound.Creativethinkingisvitaltodrivingvaluefromdatamobilization,so keepanopenmindwhenexaminingalternativewaystoperformatask.Create new,proposedprocessmapsthatidentifyareasofimprovementoverthe previousprocess,thestrategicimperativestheyserve,andthevaluetheycreate.
2007AT&TKnowledgeVentures
5. EvaluateTechnologyRequirementsandAvailable Approaches
Whendoingmobiledevelopment,itisimportanttoselectthetechnologythatbest servestheprocessorprocessesidentifiedthroughtheproceduresdiscussed above.Atthispoint,thetechnicalrequirementcanbehighlevelandsimply establishageneraldirectionandbroadtechnologychoices.Thegoalisnotto produceatechnicalsolutiontoaddresstheprocesschangesrather,itisto providearoughassessmentofthelevelofeffortthatmightbeinvolvedindata mobilization.Becauseavarietyofapplicationapproachesareavailable,youwill needtodecidebetweenasolutionbuiltinhouse,acommercialsolutiongeared toyourcompanysspecificapplicationneeds,oramoreflexiblemobile middlewaredevelopmentplatform. Thehighleveldecisionsyouwillneedtomakeshouldincludethefollowing considerations: Browserbasedarchitecture?Abrowserbasedapproachrequires relativelysimpledevelopmentandmakesyourapplicationavailableon awidevarietyofhandhelddevices.Amongthedisadvantagesare sloweroperationandtheneedtoalwayshaveanetworkconnection. Richversusthinclient?Morepowerfulsmartphonescansupporta sophisticateduserinterfacewithsignificantlocaldataprocessing,but lesscapabledevicesmaybenefitifmostprocessingisdoneatthe server. Storeandforwardarchitecture?Theseapplications(forexample, wirelessemail)queuetransactionsbasedontheavailabilityof connections,sooperationispossibleevenwhenthedeviceisoutof thecoveragearea.Thisisamorepowerful,butmorecomplex approach. Pushversuspull?Apushapplicationonaserverautomaticallysends newinformationtoamobileclient(thatis,manywirelessemail systems),whereasapullapplicationonaclientqueriestheserverfor newinformation. Customornativedevelopment?Smartphonesystemssupport applicationsthatareeitherdevelopedinlanguagessuchasC++and Javaorusemobilemiddlewareplatformsthatcanprovidehigherlevel
2007AT&TKnowledgeVentures
TheAppendicesoffermoreinformationabouttheprosandconsofthese approachesandtheavailabletools.
DevelopmentandSupportCost
2007AT&TKnowledgeVentures
6. FittheMobileSolutiontotheEnvironment
Variousapproachesareavailableforintegratingmobilesolutionswithexisting enterpriseapplications.Whichworksbestdependsonyourcompanysparticular circumstancesandobjectives. Anumberofvendorshavedevelopedtargetedapplicationsforspecificwork functions,includingfieldservice,transportation,medicalcare,inventorycontrol, andlogistics.Thesearereferredtoasverticalmarketapplications.Whetheror nottheyincludemanagementandsecurityfeaturesdependsonthevendorand theapplication. Wirelessemail(forexample,RIMBlackBerry,MotorolaGoodLink)and synchronizationsystems(forexample,NokiaIntellisync)synchronizenotonlye mailbutalsocalendarsandcontactinformation.Moreover,someofthese systems(forexample,RIMMobileDataService)providegeneralpurposeaccess toenterpriseinformation,andmanyalsohavemanagementandsecurity features. Withthegrowthinmobileandwirelesscomputing,mostenterpriseapplication vendorsnowhavemobilityextensionsfortheirproducts.Forexample,Microsoft supportswirelessemailwithMicrosoftExchangeandmobileinstantmessaging withOfficeCommunicationsServer.ArecentNetworkComputingarticle surveyedmajorapplicationvendorsandpresenteddetailsonhandhelddevice 1 supportfromIBM,Oracle,Salesforce.com,SAP,andSybase. Thebottomlineis thatthefirstplacetolookformobilitysupportisfromvendorswithwhichyour organizationmayalreadybeworking.Notethatthemobilityextensionsfor enterpriseapplicationsoftenemploymiddlewarearchitectures.However, vendorsinthiscategorytypicallyhavemobilitysolutionsthatinteroperateonly withtheirownproducts. Examplesofenterpriseapplicationarchitecturesthatcanbenefitfrommobility extensionsincludethoseinwhichthesamedatabase,applicationserver,or enterpriseapplicationintegration(EAI)suiteisusedformostoftheapplications deployedwithintheenterprise.Forexample,ifyourcompanysenterprise applicationsaredeployedonIBMWebsphereandMQseries,youshould considerusingtheIBMmobilitycomponentsWebsphereEverywhereAccess (WEA)andWebSphereEverywhereConnectionManager(WECM).
1
RysavyResearcharticle:ReachMeifYouCan,http://www.rysavy.com/papers.html,May2007
2007AT&TKnowledgeVentures
Finally,generalpurposemobile/wirelessmiddlewareproductsaredesignedto providemobiledeviceswithaccesstoawidevarietyofbackendservices potentiallyspanningmultiplevendors.Wirelessmiddlewaresolutionssometimes providetheirownApplicationProgrammingInterfaces(APIs)withwhichyoucan developmobileapplications.Alternatively,APIsprovidenonprogrammatic approachestosupportmobiledata.Thesetypesofproductshaveothernames. Forinstance,GartnerInc.referstotheseproductsasMultichannelAccess Gateways.ExamplesofcompaniesinthiscategoryincludeAntenna,Vettro,and Dexterra.Althoughthedevicesideruntimeisnecessarilyuniquetothedevice typeandpossiblyeventhespecificdevice,thestrongerplatformssupport multiplemobiledevicesthroughasingleclientapplication.Themiddleware handlesallofthedevicespecificattributes.Ifanewdeviceisintroducedwitha differentformfactorordifferentcapabilities,anupdatefromtheplatformvendor willtypicallyallowexistingcodetorunonthenewdevice. Keepinmind,however,thatmiddlewareplatformsarecomplex.Whileultimately simplifyingdevelopment,theseplatformshavetheirownlearningcurve.Youwill alsohavetoconsiderclientandserverlicensingfees. Thefollowingfigureshowshowtypicalmiddlewarearchitecturesincludemobile serversthatactasproxiesformobiledevicesandemploywirelessoptimized protocolsovertheradiolink.
Figure2:MiddlewareArchitecture
2007AT&TKnowledgeVentures
TypeofMobileSolution
VerticalMarketSolutions
Strengths
Canprovidethemost comprehensive featuresfortargeted workfunctions Relativelyeasyto integrate Functionwellforcore applications Someextensions availableforother enterprisedata Somesupportawide rangeofmobile devices Managementand securityfeatures generallyincluded Workingwithjustone vendor Oftenthesimplest approach Managementand securityfeatures generallyincluded
Weaknesses
Notgenerally extensibletoother enterprisedata Maynotprovide accesstoall applicationdataof interest
WirelessEmailand SynchronizationProducts
2007AT&TKnowledgeVentures
TypeofMobileSolution
Strengths
Weaknesses
multiplevendor solutions simultaneously
2007AT&TKnowledgeVentures
7.
DefineaPlatformPolicy
Inthemobilespace,enterprisesanduserscanchoosefromavarietyof platformsanddevices.Devicescomeinmanyformfactors,withvastlydifferent functionality.Therangeofhandheldoperatingsystemsincludesproprietary systems,GarnetOS,iPhone,MobileLinux,Symbian,andWindowsMobile. Althoughthisdiversityenablessolutionsforalmostanyuserneed,itcaneasily leadtointeroperabilityissues.Yourcompanyshouldconsiderrestrictingthe numberofplatformsitsupports,becauseeachhasitsownapplicationsupport requirements,inadditiontomanagementandsecurityconsiderations. Asastart,youneedtochoosebetweendeployingamobileapplicationon existingdevicesorpurchasingnewtypesofdevices.Considerationsinclude whetherthedevicehastheprocessingpowerandmemorytosupportyour desiredapplications,andwhethersecurityandmanagementsystemsare availableforthedevice.Managementisparticularlyimportantasthenumberof supportedusersincreases.Forexample,toolsthatautomaticallyupdatesoftware overtheaircanbeparticularlyimportantinlargedeployments. Consider,also,thelifecycleofadevice.Ifyourdevicesneedtobeavailablefora longtermdeploymentandnewdevicesneedtobeadded,youshouldavoid thosedevicesthatareclosetotheendoftheirlifecycle.Similarconsiderations applytomobileoperatingsystems.
2007AT&TKnowledgeVentures
8. RemembertheMobileDeviceIsNottheDesktop
Thismaybeanobviouspoint,butitisaverycommonmistake.Sometoolsmake itpossibletocreateanapplicationforthedesktopandportittoamobiledevice. Butthatdoesnotmeantheresultingapplicationwillbeagoodwireless application.Rather,treatingamobiledevicethesameasadesktopwillalmost guaranteethatthewirelessprojectwillfail. Anumberoffactorsmakemobileapplicationsfundamentallydifferentthan desktopapplications. 1. 2. Thedevicehasamoreconstraineduserinterface.Often,theuser interactswiththedeviceusingjustonehand. Thewirelessnetworkconnectiongenerallyoperatesslowerthanalocal areanetwork(LAN)connection,andaconnectionisnotalways available.Sometimes,connectionscanbelostinthemiddleofa transaction. Usersmayworkdifferentlywhenoutsidetheofficecomparedtoinside theoffice.
3.
Duringapplicationdesign,youneedtoaccommodatehowandwhenthe applicationwillusethewirelessnetwork,thetypeofdeviceordevicesthe applicationwillrunon,andsecurityrequirements.TheAppendicespresentmore informationonhowtoaddressthesespecificitems. Mostoftheapplicationdesigntasksinvolvestartingwithfunctionaldesignand highleveltechnologychoicesand,basedonyourchoices,addingenoughextra informationtodevelopadetailedspecificationandprojectplan. Howshouldyoubegin?Projectdefinitionscanoutlinethefeaturesandfunctions yourmobileapplicationmustimplement.Thisincludes,ataminimum,listingthe screens,thefieldswithinthescreens,andtheapplicationflowdiagrams.Evenif anexistingwirelessapplicationisinplaceandyourplannedapplicationisa replacement,AT&Trecommendsathoroughdesignanddevelopmentcyclethat includesthefollowingsteps:
2007AT&TKnowledgeVentures
2007AT&TKnowledgeVentures
9. AnalyzeCoverage
AT&TprovideswidespreadnationalcoveragewithitsGlobalSystemforMobile Communications/EnhancedDataRatesforGSMEvolution(GSM/EDGE)and ThirdGeneration(3G)networks.Manycompaniesanduserstakeadvantageof thenetworkwithoutstrictlyconsideringexactlywherecoverageisavailable. However,dependingonyourcompanysapplicationandworkprocess requirements,youmayneedtoverifythatyourusershavecoveragewhereitis needed,especiallyiftheyworkinknownorpredictableareas.Suchacoverage analysiscanbetheoreticalorempirical. Theoreticalcoverageanalysisprovidesacoveragemapbasedontheoreticalor mathematicallygeneratedcoveragedata.Thesemapsareoftencalled propagationmaps.Manywirelessserviceprovidersproducethesetypesof coveragemapsinvaryinglevelsofdetailhowever,mapsgenerallyonlycover largergeographicareasthatshowcoveragewithrespecttopopulatedareasand highwaysandnotnecessarilytothestreetlevel. Empiricalcoverageanalysisprovidesdetailedcoveragemapsbasedonan actualcoveragefieldtestwithinadesiredserviceareathatusesactualreceived signalstrengthinformationfromawirelessdevice.Coverageinformationis capturedbydrivingtheexactroutesoftypicalwirelesssystemuserswith wirelessdevicesandGPSandbyplottingthecombinedlocationandsignal strengthinformationonamap.Thistypeofanalysisrequiressomelevelof expertise.Youcanalsodoalessformalanalysisbymonitoringsignalstrength andrunningtesttransactionsfromdesiredcoverageareas.
2007AT&TKnowledgeVentures
10. ManageMobileDevices
Asthenumberofmobiledevicesyourcompanydeploysincreases,managing thesedevicesbecomesevermoreimportant.Whenenterprisesfirstintroduced mobilephones,theytypicallydidnothavepoliciestoprovisionormanagethese devices,andemployeesoftenwouldpurchasethemontheirown.Withaccessto enterprisedata,however,mobiledevicesposeamuchgreatersecurityriskthan thevoiceonlydevicesofthepast.Ataminimum,AT&Trecommendsthatyour companyprotectagainstlostorstolendevicesbybeingabletoremotelywipe dataanddisabletheaffecteddevice. Mobiledevicemanagementisanindispensablepartofanymobilesolution deploymentofmorethanafewdevices.Intheabsenceofamobiledevice managementtool,deviceusagecannotbemonitoredanddevicelogscannotbe examined.Mobiledevicemanagementservesseveralpurposes.
2007AT&TKnowledgeVentures
11. DesignforSecurity
Enterprisesecurityhasgeneratedalotofexpertise,buttheuniqueelementsof wirelesssecurityarelesswellknown.Securityactuallydelaysorkillssome mobiledeploymentshowever,thatneednotbethecase.Multiplesolutionsand approachesareavailable,includingpasswords,methodstodisablelostdevices, virusprotection,andextensivesecurityfeatureswithinthewirelessnetwork,such asradiolinkencryption. Onesecurityissueisthatsomemobileapplicationplatformsandsomemobile pointsolutionsprovidetheirownapplicationlayersecurity.Applicationlayer securitytypicallyrequiresyoutolocatethemobileapplicationserverinthe perimeternetwork(forexample,thedemilitarizedzone[DMZ])oropenadditional portsonthefirewall.Someenterprisesprefernottousetheseconfigurations.If youcompanychoosesthispath,youcanuseaVirtualPrivateNetwork(VPN)to provideendtoendsecurity.IfyouuseaVPN,youshouldkeepthefollowing pointsinmind:
VPNsaresensitivetoconnectionavailability,soifyouemploythese networksinmobileenvironments,yourusersmayoccasionallyneedto restartVPNsessions. VPNsdesignedforwirelessnetworks(mobileVPNs)cantolerate connectivityloss,andtheyofferoptimizationsthatcanactuallyincrease yourapplicationsperformance. ClientVPNsoftware,particularlyforInternetProtocolSecurity(IPsec) VPNs,maynotalwaysbeavailableforthedeviceyouchoose. MostmobilebrowserssupportSecureSocketsLayer(SSL),meaningthat SSLVPNscansupportalargenumberofhandhelddevices.
InformaTelecomsandMedia,February2007
2007AT&TKnowledgeVentures
2007AT&TKnowledgeVentures
12. Conclusion
Nowisthetimeforenterprisestomobilizetheirbusinessprocesses.Wireless developmentanddeploymentaresimilartoothersoftwaredevelopmenteffortsin somerespects.Buttherearemanyspecificconsiderationsyouneedto incorporateintoyourmobileapplicationplanninganddeployment.Thiswhite paperhasdescribedAT&Tsviewofthebestpracticesforworkingthroughthe solutiondesign,development,deployment,andmaintenancephases,inaddition toprovidinginformationaboutwirelesssolutiondiagnosis,analysis,and optimization.
2007AT&TKnowledgeVentures
13. AppendixA:MobileApplicationDevelopmentSteps
13.1 PrioritizingMobilizationOpportunities
Itisimportantthatyourcompanysinitialmobileprojectsbesuccessful,soyou musttakethetimetoseparatethemostpromisingopportunitiesforprocess mobilization.Agoodwaytodothisisplottingeachoftheinitiativesonamagic quadrantgraph.Thefigurebelowdepictsarepresentativegraphonwhichsix hypotheticalprojectshavebeenplotted.ImpactisontheYaxisandcapturesthe netimpactonyourbusinessitmaybecomputedasbenefitsminuscosts.Higher positioningontheYaxismeanshigherimpact.Thisneednotbeanexact estimate,butitshouldbedirectionallyaccurate.Easeofdeploymentisplottedon theXaxis.Itrepresentstheamountofeffortnecessarytodevelop,deploy,and maintainyourmobilesolution.Effortsthatarefarthertotheleftaremoredifficult orcomplex,whileeffortsthatarefarthertotherightarelessdifficultorcomplex. Usingtheserepresentations,itispossibletoexamineyourmobilizationoptions andprioritizeyourmobileinitiatives. Continuingtheexampleinwhichsixpotentialprojectsarebeingevaluated, Project1islowhangingfruithighimpactandeasytoimplement.Project2isa bitlowerimpactandabitmoredifficulttoimplement,soitshouldbeprioritized lowerthanProject1.Project3hasahighimpactbutismoredifficultto implement,soitshouldbeprioritizedlowerthanthefirsttwoprojects. Conversely,Project4islessmeaningfulthanthefirstthreeprojects,butitis relativelyeasytoimplement.TherelativeprioritizationofProjects3and4 dependsonwhethertheenterprisefavorshighimpactprojectsoreasyto implementprojects.Project5isonthecusp,notquitemeaningfulenoughand notquiteeasyenoughtobegivenseriousconsiderationinthefirstroundof applicationselections.Project6wouldhavelittleimpact,isverydifficultto implement,andshouldnotbeundertaken.
2007AT&TKnowledgeVentures
Figure3:ProjectPrioritizationMatrix
13.2
MobileApplicationDevelopmentSteps
Thissectiondescribesaformalizedprocessformobileapplicationdevelopment. Notethatmanyoftherecommendedstepsformobiledevelopmentareno differentthanthosefordesktoporserverplatformdevelopment.
BusinessProcessandWorkflowModeling
Businessprocessandworkflowmodelinghelpsyouidentifythoseareasinwhich wirelesscommunicationscanenhanceyourcompanysefficiencyand
2007AT&TKnowledgeVentures
RequirementsDefinition
Thewirelesssolutiondesignanddevelopmentprocessbeginswiththecreation ofdocumentationthatfullydefinestheobjective(whatthesystemisexpectedto doandhowitwillbeused)andtherequirements(thesoftware,hardware, implementation,training,anduserdocumentationneededtoaccomplishthe objective).Thesedocumentsspecifythefunctionalandtechnicalrequirementsof yourproduct.Therequirementsdefinitiondescribesnotonlywhattheproductwill dofromtheusersperspective,butalsohowtheproductwillinterfaceandwork withyourexistingsystems. Forwirelessenablement,youshouldpayspecialattentiontousecasesand operationalenvironments.Thisstepiscommonlyskipped.Inwireless,thereare considerationsdistinctfromwiredapplications.Theseincludewhereuserswill accesstheapplicationandwhatelsetheywillbedoing,inadditiontothe physicalenvironmentinwhichtheapplicationwillbeused(forexample,low/high temperatureenvironments,dirtyorcorrosiveconditions,standing/walking/driving situations,low/nosignalconditions).Therequirementsdefinitionalsoaddresses theavailability,robustness,andsupportconsiderationsofyourproposedsystem. Navigationiscompletelydifferentinwirelessapplications,anditshouldbe specificallydesignedtoyourtargetdeviceandplatform.
FunctionalSpecification
Thefunctionalspecificationenumeratesallthecomponentsandinterfacesthat makeupyourwirelessdatacommunicationsolution.Thisspecificationwill includeyoursystemsfunctionality,inadditiontoitsinteractionand interoperabilitywiththeothersystemsitaccesses.Duringfunctional specification,youshouldworkcloselywithrepresentativesfromyouruser communitytomakesureyourapplicationnotonlymeetstheneedsofthe processesforwhichitwillbeusedbutalsomeetsyourusersexperienceneeds. Again,thisisparticularlycriticalinamobileenvironment,wherethereisalimited
2007AT&TKnowledgeVentures
DataSchemas
Oneapproachthathelpsinmobiledevelopmentiscreatingschemas.Schemas capturethedatathatwillbeavailabletothemobileapplicationyouare developing.Thefirststepistocreateacompleteschemathatincludesallofthe dataelementsofthebackendsystemwithwhichyourmobileapplicationwill integrate.Workwithmanagementanduserstoremovefromtheschemaany superfluousinformationthatis,anythingnotrequiredbymobileusersornot suitableforthemobileenvironment.Includeonlythosedatafieldsthat managementandusersindicateareabsolutelynecessary.Clutteredscreen arrangementsmakemobileapplicationshardtouse,asdodesignsinwhich multiplescreensarerequiredtoenteranddisplaytheinformationforasingle task.Again,youmustbecarefultoresisttheimpulsetosimplyextendadesktop applicationtoamobiledevice.Rather,thinkintermsofprovidingtheminimum functionalitynecessarytohelpyourusersaccomplishthetaskathandwithwhat isavailableinyourmobileenvironment.
ScreenMockups
Anothernecessarytoolinmobileapplicationdevelopmentisscreenmockups. Thesemockupsarebasedonthedataschemas,andtheyallowbothdevelopers anduserstoseewhattheapplicationwilllooklikebeforeitisdeveloped,in additiontoallowingyoutoexperimentwithchangesintheinformationusedand displayedbytheapplication.Becausescreenssizesonmobiledevicesarequite small,mockupsareessentialtotestdifferentdatalayoutsandfindtheonebest suitedtoaparticulartask.Mockupscanalsobeusedasawaytolockdown functionality,bygettingsignofffromsponsorsthatwhatiscontainedinthe mockupsisalloftheinformationrequiredtoperformthenewmobileprocess. Thishelpsreducescopecreepandrework,too,becauseitiscleartousersand managementbeforedevelopmentbeginsexactlywhatyourendproductwilllook like.
2007AT&TKnowledgeVentures
ApplicationFlows
Afinaltoolisanapplicationflowsmap.Thismapshowstheorderinwhich screensareaccessedwithinthemobileapplication.Applicationflowsshouldbe designedtofitcomfortablywiththebusinessprocessesyourapplicationis enabling.Mobileapplicationflowsthatfailtofollowthesamesequenceasthe processflowsyourusersareexecutingonadesktop/laptopsystemcanresultin reducedefficiencyandadiminisheduserexperience.Thesmallscreensof mobiledevicesmakeiteasyforyouruserstogetlostintheapplication. Maintainingasclosetoalinearapplicationflowaspossiblereducesthechance ofnavigationalerrors. Forceflowsareaspecialtypeofapplicationflows.Theyguideyourusers throughtheprocessstepbystep,removingdirectusercontrolofapplication navigation.Ifabranchflowisrequired,theforceflowwillbranchbasedon conditionsdefinedbythedeveloper.Usersarenotallowednavigationcontrol hence,theycannoteasilygetlostintheapplication.Forceflowsaremostuseful whenyouaremobilizingwelldefinedprocessesthatarerepeatedlyperformed, especiallybylesstechnicalworkers.
2007AT&TKnowledgeVentures
14. AppendixBMobileApplicationDevelopmentReference
14.1 MobileApplicationArchitectures
Whenyouaredesigningmobileapplications,therearefourmainapproachesto consider:nativeclients,JavaPlatformMicroEdition(JavaME)clients,Web basedclients,andmiddlewarebasedclients.Anativeclientisusuallywrittenina lowerlevellanguagesuchasCorAssemblyandtargetedtoaspecifichardware platform.AJavaMEclientiswritteninJavaandcompiledtorunagainstaJava virtualmachine(VM)specificallydesignedforhandheldsandmobileclients.A mobileWebclientisverysimilartoastandardWebclient,exceptthatyoumust carefullyconsiderthelayoutofthepage.Finally,amiddlewareclientutilizesa setoftoolsandruntimestoabstracttheapplicationanddataacquisitiontasks 3 awayfromanyonedevice. Itisimportanttounderstandthebenefitsand drawbacksofeachapproachtodeterminewhichmethodologytochoose. NativeClient AnativeclientiswritteninalowerlevellanguagesuchasCorAssemblyand compiledintomachinelanguageforaspecificgroupofmobileprocessorsand hardwareconfigurations,andthenrunsasnativecodeonthosemobiledevices. Theprimarybenefittothisapproachistheabilitytoutilizetothefullestextentall featuresofanygivenhardware.Youmayneedtotakethisapproach,for instance,ifyourmobiledevicehasspecializedhardwarethatcanonlybe accessedusingaCAPI.Anotherbenefitofdevelopinganativeclientisthatyou cantuneperformancebasedonneeds.Forinstance,thedevicemayneedto performcomplexcalculationsonlargedatasets.Bywritingnativecode,notonly istherenoabstractionlayerconvertingtheclientcodeintonativecode,butthe loops,memorymanagement,anddataaccessescanbefinelytunedtoachieve thehighestlevelofperformance.Allofthispowerandcontrol,however,comes ataprice.Yourdevelopmentmusttypicallytargetdevicesthatemploysimilar hardware.Thismeansthatyoumayneedtomaintainseveralversionsofthe sourcecodefortheentiresetofsupportedclients.Inaddition,lowerlevel languagesarenotusuallyasproductive,sotheamountofcodeyoumustwriteto performagivenoperationisusuallyhigher.Forinstance,whenusingC,you mustdoallmemoryallocationsmanually.Thisaddsnotonlycomplexityand
3
2007AT&TKnowledgeVentures
additionallinesofcodebutalso,possibly,bugs.Inshort,youcanwriteanative clientwhenfullhardwareutilizationandthehighestperformancearethekey projectfactors.Whensupportingalargenumberofdifferentmobileclientsor whendevelopmenttimeisakeyconsideration,writinganativeclientisnot necessarilythebestchoiceunlessitisyouronlyoption. JavaME AJavaMEclientiswritteninJavaandrunsusingtheJavaVMonyourhandheld device.Thekeybenefitstothisapproacharefasterdevelopmenttimeand havingthesamecodebasetargetalargernumberofdevices.Becausethe applicationiswritteninJava,theamountofcoderequiredistypicallylessthanit isinalowerlevellanguagelikeC.ThereasonisthattheJavaVMautomatically handlesmanyofthetediousoperations,suchasmemorymanagement.This,in turn,meansthatfewerlinesofcodearerequiredtoperformthesamebusiness operation.Italsomeansthatthereare,typically,fewerdefects.Inaddition, becausetheJavaVMitselfisavailableonhundredsofdifferenthandhelds,your clientapplicationwillworkonmanydeviceswithouthavingtomaintainmultiple versions.However,becauseofimplementationdifferences,youwillstillneedto testyourapplicationoneachplatform. ThemaindrawbackstotheJavaMEapproachareperformanceandflexibility.If yourapplicationmustfitwithinasmallmemoryfootprintorperformfrequent operationsthatarehighlyCPU(centralprocessingunit)intensive,Javamaynot besuitable.Inaddition,ifthereisahandheldfeaturethatyourapplicationmust takeadvantageofbutthattheJavaVMdoesnotexpose,youmightneednative codeinstead.Itmayalsobepossiblethatoneormoreoftheapplicationstarget deviceshavenothadaJavaVMportedtothem.Ultimately,ifyourapplication hasastandardinterfaceanddoesnotrequirespecialhardwareaccess,JavaME isagoodchoice.Iftheclientrequiresthehighestlevelofperformanceormust utilizespecializedhardware,however,JavaMEmightnotbethebestchoice. WebBasedClient AWebbasedclientrunswithinaWebbrowseronthedevice.Themobileclient accessesthepageusingabrowserinstalledonthedevice,andtheWebserver deliversthepageusingthesamefacilitiesasadesktopWebclient.Themain benefitofthisapproachissimplifiedclientmaintenance,becausemosthandheld devicestodayhaveaWebclient.Thismakesiteasytodeployandmaintainthe softwareasfeaturesandversionschange.Italsomeansthatasdefectsarefixed andnewfeaturesareadded,theonlydeploymentisontheWebserver.
2007AT&TKnowledgeVentures
However,youneedtowritetheapplicationsothatitiscompatiblewithyour targetedsetofbrowsers.Handheldbrowserclientsaretypicallynotasrichas theirdesktopcounterparts.Forinstance,DHTML(dynamichypertextmarkup language)islimitedandsometimesunsupported,frameborderstypicallycannot becontrolled,andmultiplewindowsarenotsupported,allofwhichpreventpop upsandnewtargets.Duringthedesignandspecificationphaseofdevelopment, youshouldtakethetimeupfronttoensurethatthetargetedbrowsersupports yourplannedfeatures. Also,withtheproliferationofWeb2.0featuresintothemobilehandheldworld, youcannowmoreeasilycreatericherandmoredynamicclients.Themain drawbackstoaWebbasedclientareperformance,features,andconnection model.WithaWebclient,thehandhelddevicemusthaveaconnectiontothe Webservertoeffectivelyuseyourmobileapplication.Thismeansthatifyour clientapplicationneedstoperformofflineworkthatcanbebatchedandsentto centralserversonlyafewtimesaday,aWebclientisnotagoodchoice.In addition,ifyourapplicationrequiresanextremelyrichanddynamicuserinterface oraccesstohardwareorspecialI/O(input/output),youmayneedtoconsideran alternateimplementation.Tosummarize,ifyourclientsoftwarehasasimpleuser interfacethatcanmaintainaconnectiontoperformusefulwork,aWebclientisa goodchoice.Otherwise,analternateapproachwillmostlikelyworkbetter. MobileMiddleware Anotherwaytodeliverfunctionalitytoyourmobileenvironmentisusingmobile middleware.Thisapproachhastheprimarybenefitofrapiddevelopmentand limitedcustomanddevicespecificcodetomaintain.Inthemiddlewareapproach, youcreateanapplicationbyutilizingasetofdesigntoolsforathirdparty, proprietaryruntimeoperatingsystemonthemobiledevice,inadditiontotypically utilizingrelatedserversidecomponents.Themiddlewarehandlesthingssuchas displayingscreensanddialogsonthedevice,cachingclientsidedata,managing thedevicesconnectionstate,andmanagingofflinedata. Themiddlewareapproachworksbestwhenyourapplicationneedstoaccess andchangedatafromacentralserver.Typically,youcanmanageanddeploy applicationsquitequickly.Thedrawbackisthepotentiallynarrowfocusof capabilitiesandtheinabilitytoutilizespecializedhardwarefunctionsonthe devices.Middlewareplatformsalsogeneratecodethatisnotusuallysuitablefor highperformancesituations.Ultimately,themiddlewareapproachisverysimilar totheJavaMEapproach,onlymuchmorespecialized,proprietarytothevendor, andgenerallybuiltarounddatabasedrivenapplications.
2007AT&TKnowledgeVentures
Insummary,multipledevelopmentchoicesarenowavailabletocreatemobile applications.Eachofthechoiceshasitsbenefitsanddrawbacksthatwillhelp determinewhichdevelopmentapproachbestmeetsanapplicationsneeds.If yourapplicationrequireshighperformanceorhardwarespecializedcode,a nativeapplicationmightbetherightchoice.Iftheclientneedstorunonawide arrayofdevicesandperformofflinedatamanipulation,themiddlewareapproach mightbebest.Ifitisasimpleapplicationwhereoperationcandependona connectedstate,aWebbasedclientisagoodchoice.Finally,ifyourapplication requiresaspecializeduserinterfaceorspecializedclientsidecodebutdoesnot requirethefullpowerofanativeapplication,aJavaMEapplicationisagood choice. Thefollowingtablesummarizestheprosandconsofthedifferentapproaches.
Table3:ProsandConsofDifferentDevelopmentApproaches
Architecture Architecture
WebBrowser
Pros
Fasttodevelop Noclientcodetomaintain Web2.0methodsavailable Workswithlargerangeof mobiledevices
Cons
Lessresponsiveandcapablethan nativeapplications Lesscapablethannative applications
JavaME
Somelimitsoncapability(e.g.,no multitasking) Requirestesting/adaptationfor targetplatforms Additionallicensingfees Potentiallylargelearningcurve andintegrationeffort Highestlevelofdevelopment effort Differentcodebasesfordifferent devices
MobileMiddleware
NativeClient
2007AT&TKnowledgeVentures
Oneconsiderationiswhenyourapplicationemploysastoreandforward capability.Thisapproachisalsocalledatransactionalsolution,becausethe applicationqueuestransactionsanddeliversthemwhenaconnectionisnext available.Storeandforwardallowsuserstoaccesstheapplicationanywhere, regardlessofcellularsignalstrengthoravailabilityattheworklocation.These systemsalsotendtoofferbetterperceivedperformance,becausetheyarenot boundbythespeedofthenetwork.Themobileapplicationstoresdatalocallyon thedeviceandkeepsitfreshviaperiodicbackgroundsynchronization.The applicationcansynchronizeonaschedule,ortheservercanpushnew informationwhenitisavailable. Atransactionalsolutionislesssensitivetofadesanddropsintheradiosignal, becauseitisneitherrealtimenorsessionoriented.Mostmobilemiddleware solutionsprovidesmoothrecoveryifaconnectionislostandrequirenouser intervention.Eveniftheconnectionislostinmidtransaction,nodataislost, becausetheapplicationprotocolsknowthetransactionstate.Theapplication completesthetransactionwhentheconnectionisnextavailable.Thebest applicationsinthiscategorycanresumefromthepointwheretheconnection waslost. Developingstoreandforwardapplicationsusingnativedevelopmenttoolsis challenging,asismaintainingthemwiththecontinualintroductionofnew devices.Acommercialpointsolutionormiddlewareplatformistheeasiest, fastest,andmostreliablewaytoimplementatransactionalmobileapplication. Richvs.ThinClientApplicationDeploymentModels Finally,withaclient/servermodel,youmustalsoconsiderhowmuchfunctionality toimplementinthedeviceversushowmuchtoimplementintheserver. RichClient
2007AT&TKnowledgeVentures
ThinClient
14.2
MobileApplicationDevelopmentTechnologies
Inthepastfewyears,theWebhasbecomemoreofanapplicationplatformand lessastaticdisplayofcontent.Thegroupoftechnologiesandconceptsthat enablesthisispopularlyknownasWeb2.0.Fordevelopersandapplication builders,thismeansusingAsynchronousJavaScriptAndXML(Ajax)and DHTMLtocreateapplicationsthatcanrunwithinaWebbrowser.Alongwith Ajax,manyotherkeytechnologieshaveemerged,amongthem:Webservices usingSimpleObjectAccessProtocol(SOAP)andJavaScriptObjectNotation (JSON).Bothofthesetechnologieshelptogreatlysimplifytheinteractionof clientsandservers,thusfacilitatingthecreationofWeb2.0applications.In addition,advancedmiddlewarecomponentsandtoolsareavailablethatallow youtocreateadvancedapplicationsquicklyandeasily.Thissectionwilldiscuss thelatestapplicationmethodologiesandtheirimplicationstomobile development. TwokeytechnologiesenablerichapplicationdevelopmentwithintheWeb browser:AjaxandDHTML,thoughtheseareoftengroupedtogetherinthesingle termAjax.TheonlythingrequiredtoimplementanAjaxenabledWebpageisa singleAPIthroughtheXMLHttpRequestobjectoranActiveXcontrolforInternet ExplorercombinedwithsomeDHTML.Aproperlyarchitectedapplicationcan significantlyreducetheamountofbandwidthconsumedbyamobileapplication whileincreasingitsusability.Thisisbecausetheservercanreturnaresponseto theclientthatdoesnotcontaintheentirepagewrapper.Thesearetypically SOAPorJSONresponsesthatareusedtoupdatethecontentsofwidgetsinthe userinterface. Forinstance,youmayhaveanapplicationwithaselectablelistofemployees. Whenaparticularemployeeischosen,insteadofhavingthebrowserfetchan entirelynewpagebasedontheselecteduser,thepagecouldgenerateanAjax
2007AT&TKnowledgeVentures
request,callacorporateWebservice,andusetheresponsetodynamically updatewidgetsonthepageusingDHTML.Thisnotonlyreducestheamountof datatransmittedbutalsoincreasestheapplicationsresponsiveness.Opera, InternetExplorer,SafariMobile,andNokiaS60mobilebrowsersallsupportAjax andDHTML.Assuch,youcannowtargetnearlyeverydevicewithyourmobile applications. Fortransportingdatatoandfromtheserver,mobileapplicationstypicallyuse SOAPorJSONformattedtext.BecauseJSONrequirestheleastamountofwork ontheclientsideandisverylightweight,ithasbecomequitepopular.AJSON responseisaJavaScriptobjectformattedasplaintextandthenparsedand instantiatedusingtheevalmethod.Forexample, youcanturnthestring{ EmpLname:Smith,EmpFname:Mike}intoaJavaScriptobjectbydoing varobj=eval(empJson).Atthispoint,itiseasytoupdateaneditortextfield withtxtLnameField.Text=obj.EmpLname.So,withjustthreelinesofcodeon theclientside,youcanconvertaoncestaticpageintoadynamicapplication. ClientsandserversalsouseSOAPtransportingdata,butthisisamorecomplex mechanism.ItisawellformedXML(eXtensibleMarkupLanguage)schemaand ismuchmoreverbosethanJSON,butitalsoallowsclientsandserversto transportdatathatmaybedifficultwithJSON.Thepreviousexamplewould expandtothefollowingasaSOAPresponse:
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope> <SOAP-ENV:Body> <ns1:getUserInfo xmlns:ns1=http://domain/userInfo SOAPENC:root="1"> <UserInfo> < EmpLname xsi:type="xsd:string">Smith</ EmpLname > < EmpFname xsi:type="xsd:string">Mike</ EmpFname > </ns1:getUserInfo> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
2007AT&TKnowledgeVentures
UsingWeb2.0techniques,youwouldimplementthesameapplicationas follows:
2007AT&TKnowledgeVentures
Figure5:Web2.0VersionoftheSameApplication
Inthecaseofthefirstapplication,whentheuserclickstheNextbutton,the browserwillissueaPOSTrequesttotheWebserver,whichreturnstheentire page.Notonlydoesthisincreasetheamountofdatatransferred,buttheuser experienceisgreatlydiminished.IntheWeb2.0example,theuserwouldselect astatefromthedropdowncontrol.ThiswouldinitiateanAjaxrequest,whichthe WebserverwouldrespondtowithasmallJSONresponsethatmightlooklike this:{ cities : [Seattle, Bellevue, Tacoma, Everett, Spokane] }.Notonly istheamountofdatatransferredbacktotheapplicationreducedsignificantly,but theusabilityoftheapplicationgreatlyincreases.TheWeb2.0applicationdoes notforcethebrowsertoredrawtheentirepage,usersdonothavetoclickthe backbuttoniftheywishtoselectanewstate,andthestatechangeoftheFinish buttonreadilyindicatesthatusersarefinishedfillingouttheform.Theseare someofthekeybenefitsyourapplicationswillgainwhentheyaredesignedfor Web2.0. Asidefromadvancementsinbrowserbasedapplications,therearealso numerousmiddlewareplatformsthatyoucanleveragetoquicklyandeasily createdatadrivenapplications.Manyofthemobilemiddlewareapplications narrowthegapbetweenJavaME/C++applicationsandWeb2.0applicationsby makingiteasiertocreaterichgraphicaluserinterface(GUI)applicationsthatcan utilizelowerlevelfeaturessuchassubscriberidentitymodule(SIM)andradio access.Forinstance,MBusinessAnywherefromSybaseallowsyoutocreate
2007AT&TKnowledgeVentures
14.3
MobileApplicationDevelopmentTools
Thefollowingtableidentifiesthemajormobileplatformsalongwiththe developmentenvironmentsandlanguagesthataremostpopularforeach platform.Althoughthelistisnotexhaustive,itisagoodstartingpointin determiningwheretobeginwithmobiledevelopmentforaparticularplatform. Inadditiontotoolsforspecificplatforms,thetablealsoliststoolsthatsupport multipleplatforms.NotethatyoucanuseSunsJavaWirelessToolkitwithmany popularintegrateddevelopmentenvironments(IDEs),includingEclipseand NetBeans.ManyofthelisteddevelopmenttoolsetsarenotsimplyIDEstheyare alsosetsofindependenttoolsthatcanassistinyourmobiledevelopment.
Table4:MobilePlatformDevelopmentMatrix
OS Symbian
Language C/C++
DevelopmentToolset NokiaCarbideDevelopment ToolsforSymbianOSC++ NokiaCarbideDevelopment ToolsforJavaCarbide.j WirelexsoftVistaMax ARMRealViewDevelopment Suite SymbDev VisualStudio2005+ WindowsMobileSDK VisualStudio2005+ WindowsMobileSDK
URL http://www.forum.nokia.com/main/resources/t ools_and_sdks/carbide/ http://www.forum.nokia.com/main/resources/t ools_and_sdks/carbide/ http://wirelexsoft.com http://www.arm.com/products/DevTools/RealV iewSoftwareDevelopment.html http://pf128.krakow.sdi.tpnet.pl/symbdev/ http://www.microsoft.com/windowsmobile/dev elopers/ http://www.microsoft.com/windowsmobile/dev elopers/
Java
Windows Mobile
2007AT&TKnowledgeVentures
OS Palm
Language C/C++
BlackBerry All
DevelopmentToolset URL GarnetOSDevelopmentSuite http://www.access company.com/developers/downloads/palmosto ols.html PRCTools http://prctools.sourceforge.net/ BlackBerryJavaDevelopment http://na.blackberry.com/eng/developers/down Environment loads/jde.jsp EclipseCDT http://www.eclipse.org/cdt/ SunJavaWirelessToolkit http://java.sun.com/javame/index.jsp 2.5.1
14.4
CapabilitySummaryofMobilePlatforms
Whencreatingmobileapplications,youneedtocarefullyconsiderthecapabilities ofthemobiledevicesonwhichyourapplicationwillexecute.Thecapabilitiesof devicesvarytremendously,anditislikelythatyourapplicationwillsupportonly specificdevices. Thefollowingtableliststhetypesofcapabilitiesavailableonmobiledevices, alongwithgeneralcomments.
Table5:DifferentCapabilitiesofMobileDevices
Capability Capability
WirelessNetworking OperatingSystem andTools JavaCapability Browsers LocationCapabilities Keyboard LocalStorage
Comment
SomedevicessupportonlyEDGE,othersEDGEandBroadbandConnect. NotallareashaveBroadbandConnect. Smartphoneplatformsprovidetoolsformobileapplicationdevelopmentin highlevellanguagessuchasCandJava. MostdevicestodaysupportJavaPlatformMicroEdition. Browsercapabilitiesvarybydevice.Forexample,onlysomesupportAJAX. Somedevicesnowhavelocationcapability. Variesbydevice.SomehavefullQWERTYkeyboards,somehavepredictive textcapabilityforkeypads,someonlyhavetouchscreens. Variesbydevice.Somehaveoptionalmemoryexpansionslotsprovidingfor upto4GByteswithtodayscapability,andmuchhigheramountsplannedfor thefuture. Mostdevicestodayhavenonvolatilememory. Variesbydevice.Testcomputationallyintensiveapplicationsontheslowest targetdevice.
2007AT&TKnowledgeVentures
14.5
ThroughputandLatency
Whenyoudevelopmobileapplications,itisimportanttoconsiderthecapabilities ofyourwirelessnetwork.Todays3Gnetworkshavebroadbandcapabilitywith userachievablethroughputratesoftenover1megabitpersecond(Mbps). However,theactualthroughputauserwillexperiencedependsonavarietyof factors,includingnetworkloadingandsignalquality.Italsodependsonwhether youareconnectingviaEDGE(availablenationwide)orBroadbandConnect (availableinmanymetropolitanareas.)Inaddition,youwillneedtoknowthe capabilitiesofyourtargetdevices. BroadbandConnectisAT&T's3GnetworkoperatingonGSM,theworldwide standardforwideareawirelesscommunication.BroadbandConnectwasthefirst widelyavailableserviceintheworldtouseHighSpeedDownlinkPacketAccess (HSDPA),anditistheonly3Gtechnologythatsupportssimultaneousvoiceand data. Thefollowingtablesummarizesdownlinkthroughputspeeds.Uplinkspeedsvary bydevice,buttheyaregenerallyslowerthandownlinkspeeds.
Table6:WirelessNetworkThroughputSpeeds
Technology Technology TypicalDownlink ThroughputRates 75to135kbps 400to700kbps BurstSpeeds
EDGE BroadbandConnect
200kbps 1Mbps
2007AT&TKnowledgeVentures
14.6
BatteryandPowerManagement
Mobiledeviceshaveconstrainedbatterylife.Assuch,yourmobileapplications shouldaccommodatelimitedbatterylifeandbeabletorecoverfromanysudden lossofpower. Theitemsthatconsumethemostpoweronmobiledevicesincludethefollowing: 1. Backlight 2. Voiceactivity 3. Datatransmission 4. Datareception 5. Intensivecomputationalactivity Anapplicationcannotnecessarilycontrolhowmuchauserinteractswiththe device,whichwillkeepthebacklighton,butgooduserinterfacedesigncan reducetheamountoftimeauserneedstospendexecutingdifferentapplication operations. Withregardtodatacommunications,sendingdatafromthedeviceconsumes morepowerthanreceivingdata.Anefficientdesignthatminimizestheamountof datacommunicatedwillalsominimizecostsonusagebaseddataplans. Anothercommonproblemislossofpower.Thoughdevicebatterylifeis improving,thereisalwaysthepossibilitythatauseroranapplicationwillnot synchronizewithaserverintime.Applicationmethodsshouldallowgraceful recovery,inadditiontoperiodicdatasynchronizationtominimizedataloss. Somedeviceshavenonvolatilememory,whichmakesdatalosslesslikely.
2007AT&TKnowledgeVentures
Oneofthedifficultiesinapplicationdevelopmentisdetermininghowtomakethe tradeoffbetweenCPUusageandmemoryconsumption.Unfortunately,youmust typicallychooseoneortheother.Withmobiledevelopment,thesituationiseven moresensitive,becauseaftertheradioandthedisplay,theCPUconsumes muchofthebatterypower.Forthisreason,youmustconsiderhowyour applicationalgorithmswillaffectbatteryusage. Forexample,ifyouaretaskedwithwritinganimagemanipulationprogramthat requiresacomplexmatrixmanipulationoneachbitoftheimage,youcould implementthisasaCPUintensivealgorithmorasamemoryintensivealgorithm. Theprogramcouldperformtherequiredmatrixalgebraontheentireimageevery timeauserselectsaparticularoperation,withtheresultstoredinmemory.Or, theoperationcouldbeperformedforonlytheviewableportionofthescreen,with updatesdoneasrequired.Thefirstmethodrequiresasignificantamountof memory,butitmightendupusingfewerCPUcyclesespeciallyifthesame sectionsofthescreenarefrequentlyredrawn.Thesecondmethodrequires constantextraCPUcyclesasthefieldofviewontheimagechanges.Ultimately, thebestchoicewillbethealgorithmthatconsumestheleastCPUcycleswhile notutilizingsomuchmemorythattheapplicationcannotrun. AnotherexampleofwhereaCPUalgorithmmightbeusedinsteadofamemory algorithmiscompression.Ifyourapplicationmanipulatesverylargedocuments orobjects,youmayhavenochoicebuttousecompressioninmemorytogive usersaccesstotheentiredocument.If,however,yourapplicationcanfitobjects intomemorywithoutcompressionorcachethemefficientlytopersistentstorage, overallCPUusagewillmostlikelydecreaseandbatterylifewillincrease. Asopposedtodesktopcomputingenvironments,youmustcarefullyconsider howyourapplicationalgorithmswillaffectpowerconsumption.Thegeneralrule istocacheasmuchdataaspossiblewithoutusingsomuchmemorythatyour applicationwillnolongerrun.Anotherconsideration:Justbecauseanalgorithm usesmorememory,doesnotnecessarilymeanthatitwillusefewerCPUcycles. Intheimageviewingexampleabove,themethodwheretheupdatedimageis cachedmayactuallyrequiremoreCPUcyclesifamajorityoftheimageisnever viewed. Finally,youshouldbepreparedtotestmorethanonealgorithmandtostructure yourapplicationcodeinsuchamannerthatitcanbeeasilyswappedforamore efficientalgorithminthefuture.
2007AT&TKnowledgeVentures
14.7
Input,Text,Screens,Usability
Handhelddevicespresentdramaticallydifferentuserinterfacesthandesktop PCs.Thebesthandheldapplicationsfullyaccommodatethemoreconstrained displayandlimiteddatainputcapabilityofsmallerdevices.Yourapplication designshouldconsiderthefollowingspecificitems:
Applicationscope.Considercarefullyjusthowmuchdatamobileusers need.Often,thismaybeasubsetofwhattheywoulduseinanoffice environment. Smalldisplays.Smartphonestodaytypicallyhavescreensof240x320 or320x320pixelsonlyasmallpercentageofadesktoporlaptop screen.Carefullydecidewhatinformationyouwanttopresent.Beaware thatdifferenttargetdevicesmayhavedifferentscreensizes.Becauseof thesmallscreensize,onlyoneapplicationtypicallyownsthescreen, anditisnotpossibletohavemultiplewindowsopen. Limiteddatainput.EvenwithQWERTYkeyboards,userstypeat slowerspeedsonmobiledevicesthantheydowitharegularkeyboard. Minimizehowmuchdatausershavetoenterbyusingpredictive methodssuchasautotextcompletionandmultichoiceselectionsand bypresentingpreviousentries. Onehandedoperation.Handheldsareoftenusedinaonehanded fashion,especiallywhenusersarestandingorwalking.Consider designingyourapplicationsothatscreenscanbenavigatedandall desiredinformationviewedwithoutusingthekeyboardorstylus. Exploitnavigationoptions.Manyhandheldshavesoftkeys,fourway navigationbuttons,andtrackballs.Theseoptionsallowuserstoeasily reachalldesiredinformationandfeatures,especiallyonehanded. Backgroundprocessingandcommunication.Designyourapplication sothattransactions(suchascommunicationswithaserver)occurinthe background,donotholduptheuserinterface,andallowcontinuoususe ofotheroperations. Progressindicators.Whereappropriate,provideuserswithan indicationofcommunicationsstatusforexample,howmanyrecords havebeenreceivedoutofhowmanyarebeingsent. Abilitytocancel.Userssometimesneedtosuddenlyturnofftheir devicesonanairplane,forinstance.Whereappropriate,provideusers
2007AT&TKnowledgeVentures
withtheabilitytoabortoperations,especiallythosethatmaytakealotof time.
14.8
MemoryManagement
Althoughtheamountofmemoryavailableonmobiledeviceshasexpandedover thelastfewyears,itisstillhighlyconstrainedcomparedtothedesktop environment.Itis,therefore,importanttoconsidertheseconstraintswhen designinganddevelopingapplicationstoensureyourapplicationperformswell. Thissectiondiscussessomeoftheprogrammingapproachesthataddress memoryconstraints. Dependingontheenvironment,youcanapplydifferenttechniquestoensurethat yourapplicationwillruninaconstrainedmemoryenvironment.IntheJavaME and Web2.0worlds,noexplicitmemorymanagementisavailablehowever,the methodyouusetocodecertainalgorithmscangreatlyimpactmemoryusage. Forinstance,ifyourapplicationreusesvariableswithinaloopinsteadof declaringnewinstancevariables,itmayreducememoryconsumptionbya significantdegree. OnesimpleprogrammingtechniqueaJavadevelopercanusetoshowalistof namesistostoreallofthenamesinanarrayandaccessdifferentindicesinthat arrayastheuserscrollsthecursorupanddown.Theprimaryadvantagestothis approachareperformanceandsimplicity.Itperformswell,becauseallofthe memoryaccessescomefromalinkedlistandonlyrequireasingledereference tofindthestructureinmemory.Anditissimple,becausetheJavaMEruntime librarycreatorhasalreadywrittentheinnerworkingsofthelinkedlist,suchas ArrayList.Therefore,youneedonlyusethesimpleAPImethodsofaddandget todomostofthework.Butwhatifthereare100,000itemstoshowinthelinked list?Atsomepointtypicallynotaverylargenumberthemobiledevicewillrun outofmemorytoallocatetotheapplication.InthecaseofJavaME,an OutOfMemoryExceptionwillbethrown.Severalpossiblesolutionsareavailable toovercomethislimitation. Oneoptionistotradespacefortime.ThismeansusingmoreCPUcyclesto overcometheenvironmentsmemorylimitations.Themostcommonwayyoucan achievethisisthroughpersistentstoragecaching.Inthecasewherethe ArrayListneedstocontain100,000itemsbutthedevicedoesnothavethe memorytocontainalloftheseitems,youcanchoosetousethreeArrayListsof 1,000itemseach.Onelistcouldbethecurrentlist,onecouldbetheprelist,and
2007AT&TKnowledgeVentures
onecouldbethepostlist.Thecurrentlististheonebeingusedtodrawtheuser interface.Thepostlististhepreloadedlistof1,000itemsthatcomeafterthe currentlist.Whentheuserscrollsthedisplayforward,theapplicationchecksto seeifitisattheendofthecurrentlist.Ifitis,theapplicationmakesthecurrent listthenewprelistandmakesthepostlistthenewcurrentlist.Itthenspawnsa threadtoloadthenewpostlist.Youwouldreversethesestepsastheuser scrollsintheoppositedirection.Withthisapproach,youneedtowritemorecode andpotentiallyspendmoreCPUcyclesloadingobjects.Butitalsoallowsyour applicationtoscrollthroughanindefinitenumberofobjectsandonlyrequires that,atmost,3,000itemsbeloadedintomemoryversus100,000. Anothertimespacetradeoffyoucanuseismemorycompression.Dependingon theformatandtypeofdata,yourapplicationmaybenefitgreatlyfrom compressingdatainmemoryandonlydecompressingwhatitneedsfordisplay orcurrentmanipulation.Forinstance,yourapplicationmayneedtodisplayand scrolllargemapsurfacesfortheusertoaddpinpoints,pan,orzoom.Inthis case,youcouldkeepthelargeversionofthemapinahighlycompressedformat, perhapsametaorvectorformatsuchasSVG(scalablevectorgraphics)oreven arasterformatsuchasPNG(portablenetworkgraphics)orJPEG(joint photographicexpertsgroup).Astheusermovesthemaparoundthemobile devicesdisplay,yourapplicationcouldcalculatethebitmaptodisplayonthe screenwhilekeepingamajorityoftheimagecompressed.Inadesktop environmentwithnearlyunlimitedmemory,itmightbeunwisetomakean applicationdecisionlikethis,butinamobileenvironmentitmaybetheonlyway tomakeyourapplicationoperational. InunmanagedenvironmentssuchasC++,notonlyarememoryalgorithms importantbutsoarepropermemoryallocationandfreeing.AsopposedtoJava orJavaScript,wherearuntimegarbagecollectorspecificallyfreesandreuses memorythatisnolongerbeingreferenced,anapplicationinanunmanaged environmentmustexplicitlyfreeallmemory.Thisisperhapsthesinglelargest classoferrorsthatCandC++programmersmake.Theprimaryreasonisthatit canquicklybecomeunclear,becauseoffunctioncalls,pointercopying,and vagueAPIs,whohasresponsibilitytofreechunksofmemory.Thismeansthat anapplicationorlibrarythatmightrunfineonadesktopenvironmentcouldend upcrashingafteryouportandrunitonamobiledevice. Theprimarymethodsavailabletofindandfixmemoryleaksareusingmemory debuggingfacilitiesandwritingtestcasesforyourpublicclassmethodsand functions.Mostsoftwaredevelopmentkits(SDKs)shipwithlibrariesthatcontain memorydebuggingAPIs.Forinstance,ontheSymbianoperatingsystem,ifyou
2007AT&TKnowledgeVentures
14.9
Network
Howyourapplicationinteractswithandaccommodatesthewirelessnetworkisof crucialimportance.Anumberofitemsmakewideareawirelessdifferentthanthe othertypesofnetworkswithwhichyoumaybeworking. First,useraccountsareprovisionedwithparticularnetworkingconfigurationsthat controlthetypesofInternetProtocol(IP)addressesassigned(staticversus dynamic,publicversusprivate),whatexternalnetworkscanbeaccessed,and securityoptions.TheseconfigurationsettingsarecalledAccessPointNames (APNs).Wirelinenetworkinghasnoequivalent,thoughcorporatenetwork configurationsandInternetserviceprovider(ISP)policies/optionshavesome correspondingcharacteristics.APNsecurityoptionsarediscussedinthe SecuritysectionofAppendixB. Second,devicesestablishdatasessionsthroughwhatiscalledaPacketData Protocol(PDP)context.Datasessionsareindependentofvoicecapability,and theyrequireaseparateproceduretypicallycontrolledbythemobileapplication vianetworkingAPIs.PDPcontextactivationresultsinthemobiledevice receivinganIPaddressandbeingabletosendandreceiveIPpackets.One importantaspectofPDPcontextsisthatthenetworktimesthemoutifthereisno activity.Thetimeoutvalueisapproximatelyfourhoursifthenetworkcanreach thedeviceandaboutonehourifthenetworkcannotcommunicatewiththe 4 device. ConnectionmanagementisdiscussedingreaterdetailtheConnection ManagementsectionofAppendixB. Third,howyourcompanysserverscommunicatewiththeAT&Tnetwork(to communicatewithmobiledevices)mustbeconsidered.AT&Toffersanumberof networkingoptions.ThedefaultiscommunicationviatheInternet.However, AT&TalsooffersanetworkVPNforIPsecbasedcommunicationacrossthe InternetandFrameRelayconnectionsthatbypasstheInternet.
AT&TcancustomizethesevaluesforcustomAPNs.
2007AT&TKnowledgeVentures
Thefollowingtablesummarizesthekeydifferencesbetweenwirelessand wirelinenetworking.
Table7:Wirelessvs.WirelineNetworking
Wireline
ISPpoliciesandaccount optionsprovidesome,but notidenticalcharacteristics
DataSessions
FixedEnd Connectivity
TheNetworksectionofAT&TsdevCentralsitehasextensivedetailsonallof thesetopics.
14.10 ConnectionManagement
Newmobiledevicestypicallyhaveanumberofconnectionchoices,including cellulardataservice,Bluetooth,WiFi(WirelessFidelity),andUSB(Universal SerialBus).Althoughthisgreatlyenhancestheusabilityandmobilityofthe devices,itcomplicatestheprocessofdeterminingwhichconnectionsare availableandbesttouse.Fortunately,nearlyallmobileoperatingsystemsand platformssupplyAPIsthatabstractthenetworkhardwareandsoftwarelayers,in additiontosimplifyingtheprocessofconnectionmanagement,asshowninthe followingfigure.
2007AT&TKnowledgeVentures
Figure6:HandheldDeviceCommunicationArchitecture
Thefollowingtableliststhekeyplatformsandtheirconnectionmanagement APIs.
Table8:SomeCommonAPIsforConnectionManagement
API
ReferenceURL
ConnectionManagerC http://msdn2.microsoft.com/en API us/library/bb416435.aspx GarnetOSNetLib http://www.access company.com/developers/documents/palmos/ palmos.html http://www.symbian.com/developer/techlib/v7 0sdocs/doc_source/reference/cpp/Connection Manager/RConnectionClass.html http://java.sun.com/javame/reference/apis/jsr 218/javax/microedition/io/package summary.html
Symbian
JavaME
2007AT&TKnowledgeVentures
Thefirstthinganapplicationneedstodotosendorreceivedataisestablisha connection.Someoftheplatformswilldothisautomatically,whileothersrequire theapplicationtocreatetheconnection.Forexample,inWindowsMobile,you callConnMgrEstablishConnectiontosetupaconnection.Youshouldalsocheck theconnectionstatustomakesuretheconnectioniscurrentlyavailablebefore anynetworkoperationsusingtheconnectionareperformed.Thus,the connectioncanbereestablished,ifnecessary,withoutanapplicationfailure. Yourapplicationsshouldalsoreleasetheirconnectionswhentheyarenolonger needed,sothattheconnectionmanagercanproperlymanagethenetworklayer connection.Sometimes,however,itmaybedesirabletonotreleasethe connectionif,forinstance,itwillbeneededinthenearfuture.Thiswillkeepthe devicefromhavingtoreestablishanetworklayerconnection,whichcouldslow downapplicationperformance. Onecommonpitfallisthatdeveloperscreatetheirapplicationsassumingthey arealwaysconnectedlikeEthernet.AT&Tismakinginvestmentstoincrease coverageandimprovesessionpersistence,butyoumustassumethatan applicationwillsometimesgooutofcoverage.
14.11 Security
Securingyourmobiledevicesandapplicationsrequiresanumberofimportant decisions,rangingfromprotectionagainsteavesdroppinganduser authenticationtoprotectionagainstdevicelossandthreatstodevices(suchas viruses).AgoodstartingpointistounderstandwhatsecurityoptionsAT&Tand yournetworkprovide,whatthirdpartysecuritytoolsandapplicationare available,andwhatoptionsexistforyouractualapplication. NetworkSecurity TheAT&Tnetworkprovidesanumberofsecurityfeaturesandoptions.Thefirst isauthenticationagainstthecredentialsintheSIM.Thispreventsunauthorized usersfromaccessingausersaccountforvoiceordataservice.With GSM/EDGE,thenetworkauthenticatestheuserdevice(thatis,thephoneor datacard).WithUniversalMobileTelecommunicationsSystem(UMTS)/HSDPA, ontheotherhand,thereistwowayauthenticationinwhichthenetwork authenticatesthedeviceandthedeviceauthenticatesthenetwork. TheAT&Tnetworkalsoencryptsdatacommunicationsusing64bitencryption forEDGEand128bitencryptionforUMTS/HSDPA.Encryptionextendsfromthe
2007AT&TKnowledgeVentures
mobiledevicetothecorenetwork.Withinthecorenetwork,however,userdatais unencrypted(unlessencryptedbythecustomer)whiledataflowisacrossa privatenetwork. Inaddition,AT&Thasfirewallswithinitsnetworkthatimplementvarioussecurity procedures.TheseincludeblockingunsolicitedIPpacketsfromtheInternetso thattheydonotreachmobiledevicesandblockingdirectdevicetodevice communication.WithcustomAPNs,enterprisecustomerscancustomizefirewall rulestoaccommodatespecificneeds. ThirdPartySecurityOptions Variousthirdpartysecurityoptionsexistforhandhelddevices.First,VPNscan securecommunicationsandprovideuserauthentication.Thetwomostcommon typesofVPNsIPsecandSSLcanoperateonhandhelddevices.However,not allIPsecbasedVPNsprovideclientsformobiledevices.SLLVPNsareeasierto deploy,becausetheycanworkwithmosthandheldbrowsers.MobileVPNsare alsooptimizedformobile/wirelesscommunicationsandofferadditionalbenefits suchassessionpersistence.WindowsMobileplatformstendtobemostwidely supportedbyVPNvendors. BeyondVPNs,companiesalsooffermanagementsystemsthatincludesecurity optionslikebeingabletodeletedataonalostorstolendeviceanddisablingthe deviceentirely. Finally,mostmobilemiddlewareplatformsproviderobustsecurityfeatures. ApplicationSecurity Thesecurityoptionslistedabovemaybesufficient,oryoumaydecidethatyour applicationsmayneedtoimplementadditionalsecurityfunctions.Forinstance, youmaywanttoencryptsensitivedataonmobiledevices.Mosthandheld platformsprovidecryptographiclibrariesthatcanbeintegratedintoyourmobile applications. IfyouarenotusingaVPN,youmaywanttoprotectyourdatacommunications. OptionsincludeencryptingthedatapriortosendingitorleveragingtheSSLlayer intheWebbrowserandsendingthedatathroughanHTTPS(HypertextTransfer ProtocoloverSecureSocketsLayer)session.BecauseHTTPSisaresource intensiveprotocol,youshoulduseitappropriately.
2007AT&TKnowledgeVentures
AT&T DataCenter
PDA
Internet
FrameRelay
Firewall
14.12 Pushvs.Pull
Mostmobileapplicationsbroadlyfitoneoftwoservicemodels:pushorpull.In thepushmodel,newevents,messages,ordataaresenttothemobiledeviceas theyoccurwithoutthedevicefirstrequestingthem.Inthepullmodel,themobile devicemakesarequestfordataorevents.Thefollowingdiagramillustratesa typicalpullarchitecture.
2007AT&TKnowledgeVentures
Figure8:PullArchitecture
1. Aneventoccursontheserverthatthemobiledeviceshouldbenotified about.Iftheserverdoesnothaveaconnectiontothedevicealready,it
2007AT&TKnowledgeVentures
canattempttoinitiateonebysendinganSMStothemobiledeviceor waitingforthedevicetoreestablishaconnection 2. Deviceestablishestransportconnection(GPRS,WiFi,andsoon),ifone doesnotalreadyexist 3. Deviceestablishesaconnectiontotheserverapplicationandsendsa requestforthecorrespondingevent 4. Serversendsresponsedata Onecommonmethodthatapplicationsusetoimplementapusharchitectureis throughtheuseofSMS.Whentheserverneedstoupdatethedevice,itcan submitanSMSmessagetothedeviceusingtheShortMessagePeertoPeer Protocol(SMPP).WhenthedevicereceivestheSMSmessage,theapplication canthenobtaintheupdateviaanIPdataconnection.AnapplicationusingJava MobileInformationDeviceProfile(MIDP)canusetheJavaMEPushRegistryAPI tofacilitatethisapproach. OtherthanusingSMSfornotifications,acommonwayapplicationscanmaintain connectionstatesthroughwhichserverscanpushinformationisaconstantPDP context.Thisrequiresthedeviceapplicationtoestablishaninitialconnectionwith theserver,sothattheserverknowstheIPaddressofthemobiledevice,and requiresthemobileapplicationtomonitoritsconnectionandIPaddress.Ifthe connectionfails,ortheIPaddresschangesatanytime,themobileapplication mustreestablishtheconnectionandnotifytheserverofitsnewIPaddress. Forinstance,usingtheJavaMIDPAPI,youcouldestablishaTCPconnectionby callingConnection.open(e.g.,socket://mycompany.com:18865).Aservice listeningonthisportcouldthentrackmobiledevicesandmakenotifications whenappropriate.Whenthemobileapplicationreceivesanotification,itcould thencallConnection.open(https://mycompany.com/getData.jsp)toobtainthe updateddata. BecausethedefaultAPNfromAT&TdoesnotallowmobileterminatedIP packets,youwillneedtouseanAPNthatallowssuchcommunication.Youwill needtocarefullydesignyourapplicationprotocols,sothattheydonotconsume excessivedatainmaintainingtheconnection.Finally,thisarchitectureincreases theamountofpowerconsumedbythedevice. Thefollowingtableoutlinesthebenefitsofthepushandpullarchitectures.
2007AT&TKnowledgeVentures
14.13 Telephony,SMS,SIMInterfaces
Oneareauniquetomobileapplicationdevelopmentistheuseofthetelephony, SMS,andSIMAPIsthatareavailableontheseplatforms.TheseAPIsallowa usertomakecalls,sendSMSmessages,orlookupentriesstoredonthe phonesSIMcard.Byusingthesefunctions,yougreatlysimplifyapplication developmentthatrequiresphonespecificfunctionality.Youcanalsousethese APIstoincreasethefunctionalcapabilitiesofyourmobileapplication. Forinstance,youmaywanttocreateanapplicationthatnotifiesothermobile userswhenaneventoccurs.Toperformthisoperation,yourapplicationcould usetheSIMAPIs(assumingtheSIMwasusedtostoretelephonenumbers)to determinewheretosendthemessageandthentoactuallysendthemessage. TelephonyAPIsallowyourapplicationtomakeandreceivephonecalls. Thefollowingtableliststhekeyplatformsandlinkstotheirtelephony,SMS,and SIMAPIs.
Forinstance,ifyoureceivedtwoemailsperday,apushsolutionwouldconsumeverylittlebandwidth comparedtoapullsolution,wherethemailapplicationpollsonaregularintervalthroughouttheday.
2007AT&TKnowledgeVentures
Table9:SMSandSIMAPIsforHandheldPlatforms
Platform
Windows Mobile
API
Telephony SMS SIM
ReferenceURL
http://msdn2.microsoft.com/enus/library/aa918634.aspx http://msdn2.microsoft.com/enus/library/aa922463.aspx http://msdn2.microsoft.com/enus/library/aa919162.aspx http://www.access company.com/developers/documents/docs/palmos/PalmOSR eference/TelephonyBasic.html#1044083 http://www.access company.com/developers/documents/docs/palmos/PalmOSR eference/TelephonySMS.html#1056053 http://www.access company.com/developers/documents/docs/palmos/PalmOSR eference/TelephonyPhonebook.html#1070579 http://www.symbian.com/developer/techlib/v8.1adocs/doc_s ource/guide/Telephonysubsystemguide/N1012E/index.html http://www.symbian.com/developer/techlib/v9.2docs/doc_so urce/reference/reference cpp/MSG_SMS8.1/index.html#MSG_SMS8%2e1%2etoc http://www.symbian.com/developer/techlib/v9.2docs/doc_so urce/reference/reference cpp/PHBKSYNC/index.html#PHBKSYNC%2etoc http://java.sun.com/products/jtapi/ http://java.sun.com/products/wma/index.jsp
PalmOS
Telephony
SMS
SIM
Symbian
Telephony SMS
SIM
Java
Telephony SMS
14.14 CommunicationCostManagement
Whendesigningthecommunicationsaspectsofyourapplication,youshould considerthepricingplansyourusersareon.Someplanssupportunlimiteddata usage(withsomerestrictions),butothersareusagebased.Loweramountsof datausagecouldtranslatetolowermonthlyfees.(Moreefficientdata communicationalsoextendsbatterylife.) Duringdevelopmentitmaybeagoodideatomeasuretheamountofdatayour applicationconsumes.Unfortunately,therearenoreadilyavailablethirdparty utilitiesthatrunonmobiledevicesavailableforthistask.However,ample
2007AT&TKnowledgeVentures
14.15 ManagingAmountofDataCommunicated
Eventhoughmobilenetworkshavebecomemuchfaster,applicationsshouldstill bedesignedtofullyoptimizehow,andevenif,largeamountsofdataaresent. Youcanusemanystandardtechniquestominimizetheamountofdatayour applicationsends.Thefirst,andperhapssimplest,methodistocompressthe data.Thenextmethodisdifferencingandcaching.Thefinalmethodisdata conversionorreduction.Dataconversionandcachingaretypicallymorecomplex thancompression,buttheseoptionsmayyieldlargerbenefits.Thefollowing paragraphscoverthesemethodsingreaterdetail. ApplicationsfrequentlyusecompressiontomaximizelimitedRAM(random accessmemory)andpersistentstorage.Thiscanbeequallyimportantwhen bandwidthislimited.Ifthedatayourapplicationmanipulatesissparseor repeating,itwillbenefitsignificantlyfromcompression.Examplesofthisarelarge plaintextfilessuchasXMLdocuments,somerawsoundfiletypeslikeWAV (Waveformaudioformat),orflatgraphicsdatasuchasbitmap.Thefollowing tablelistssomeofthecompressionAPIsreadilyavailableforcommonplatforms.
Table10:CompressionAPIsforHandheldPlatforms
Platform
Windows Mobile
API
System.IO. Compression zlib
ReferenceURL
http://www.microsoft.com/downloads/details.aspx?FamilyID= 1343d537a62f4a6e97277791bf4cc2bd&displaylang=en http://www.zlib.net/ http://www.access company.com/developers/documents/palmos/palmos.html http://www.symbian.com/developer/techlib/v8.1adocs/doc_so urce/reference/reference cpp/N102C2/CEZFileToGZipClass.html
PalmOS Symbian
Lz77API SyslibsEZLIB
2007AT&TKnowledgeVentures
Platform
Java
API
java.util.zip
ReferenceURL
http://java.sun.com/j2se/1.5.0/docs/api/java/util/zip/package summary.html
Thenextmethodisdifferencingandcaching.Dependingonthedata,this methodcanbesimpleorverycomplex.OneexampleisConcurrentVersioning System(CVS)anddiff.IntheearlyyearsoftheInternet,whenlinkswere significantlyslowerandstoragemuchmoreexpensive,theUnixdiffapplication wasdevelopedtoeliminatesendingredundantdata.Thisapplicationcompares twofilesandcreatesathirdfilethatisthedifferencebetweenthetwo.CVSthen usesthisdifferencetoupdatethecurrentversionofafile.Atthispoint,another developercoulduseCVStoupdatealocalcopywiththemuchsmallerdifffile, thusproducingthenewfile.Theideabehindthistechniqueisthatnotallofthe dataissentinstead,onlywhathaschangedispassed.Forinstance,ifyour mobileapplicationworksonalargeXMLdocument,itmightbemuchmore efficienttosendonlytheitemstheuserhasupdatedonthedevice.Youcanalso usethismethodinconjunctionwithcompressiontopossiblyincreaseefficiency further.Themaindrawbacktothisapproachisthatyourapplicationmusttrack whatdatahaschanged,whichsometimescanbedifficult. Anothercommontechniqueistoreduceordistillthedocumentformatofthedata used.Forexample,ifyoumustsendanimagetothemobiledevice,itmightnot makesensetosendthefullresolutionimageifitcannotbemanipulatedonthe device.Inthiscase,thesizeofthesentimagecouldbereducedtomatchthe sizeofthedevicedisplay.Youcanalsousethismethodfordocumentsthatonly havealimitedsubsetofthefeaturesavailableonthemobiledevice.PDF (PortableDocumentFormat)convertersthatonlytransferthetextofPDF documentsandspreadsheetapplicationsthatdonotembedchartsandgraphics areexamples.
14.16 RecoveryandDiagnostics
Mobileapplicationscanfailinvariousways.Thissectiondiscussesthefailure modesandprovidessuggestionsforrecoveryanddiagnosticmechanisms. Failuremodesinclude:
Signalloss.Userscansometimesfindthemselvessuddenlyoutoftheir coveragearea.Thiscanoccuratanypointinmidtransaction.Well
2007AT&TKnowledgeVentures
designedapplicationseitherdetectconnectivitylossortimeout gracefullyandthenresumetransmissiononcethesignalisregained.
Poorqualitysignal.Withapoorqualitysignal(lowsignalstrengthor highinterferenceenvironment),datacommunicationmaystillbe possible,butitmayoccurwithverylowthroughputratesandmuch higherpacketdelays.Applicationprotocolsmaytimeout.TCPprotocols mayalsooperateinasuboptimalfashion. Connectiontimeout.TheAT&Tnetworkmaintainsdataconnection states(calledPDPcontext)foruptofourhourswhenincoverageandup toonehourwhenoutofcoverage.AfteraPDPcontexttimeout,theuser mustreacquireadataconnectiontosendorreceivedata.Usually,this PDPcontextwillrequireanewIPaddress. Lossofpower.Themobiledevicesbatterymaysuddenlyrunoutin midtransactionorwithdatafilesopen.Or,theusermaysuddenlyturn offorresetthedevice.
Displaytransactionstate.Havetheapplicationprovidestatus informationaboutitsnetworkingoperations. Logcommunicationssessions.Oneitherthedevicesideortheserver side,keepingalogofcommunicationssessionscanhelpdeterminethe sourcesoffailures.Adiagnosticmodemightcaptureentiresession contents. Provideresetoptions.Sometimesitcanbebeneficialforthe applicationtorestartthedataconnectionoreventheentireradio connection.Thiscanbeautomaticafteracertainnumberof communicationattemptsoranoptionthatletsuserseasilyrestarttheir sessions. Provideanalternatenetworkpathonfailuretoreachhost. TheAPN determinesthetransportfordatacommunicationbetweenthewireless deviceandthehostapplication.Awirelessdevicecanhaveaccessto 6 multipleAPNs ,whichcanbeselectedbytheapplicationintheevent oneoftheavailabletransportsfails.Multipletransports,suchasFrame
Aspartofaccountprovisioning.
2007AT&TKnowledgeVentures
RelayandnetworkVPNs,inconjunctionwithacustomAPNcanprovide redundancyintheconfiguration.
2007AT&TKnowledgeVentures