1、河南科技学院2015届本科毕业设计外文资料及翻译AnAnalysisandComparisonofOpenandClosedMobile1.IntroductionInrecentyears,thepopularityofsmartphonekeptgoingup.Moreandmoresmartphonesaresoldandalotofpeopleareembracingthem.Smartphonesbroughtgreatconveniencetousers,aswellcreatedopportunitiesforsmartphoneresearchers.Thatstosay,th
2、ewidespreadofsmartphonesbenefitedbothsides.Atthesametime,developingofsmartphoneOSbecomesoneofthesmartestindustry.TobeasmartphoneOS,thesystemshould:1.ProvideserviceslikeaPC.2.WorkwithaGPUforbettervisualeffects.3.AllowtheusertosurfonInternetfreely.Andapparently,thererealsosomeweaknesses:1.Limitedbatte
3、ry.2.PoorCPUperformanceagainstPCCPU.3.Smallstorage.4.TheuseofRAMmayleadstolossofdatawhenthephonerunsoutofbatteryNowthe2giantsofsmartphoneOSareAndroidandiPhoneOS.Ononeside,AndroidisbasedonLinuxkernelandDalvikvirtualmachine,anditisopensourced.TheupperlayerofAndroidisJavabased,allowingdeveloperstodevel
4、opAndroidapplicationswithGoogleSDKandselltheirsoftwareinAndroidMarket.Ontheotherside,iPhoneOS,whichbasesonUnixkernelandDarwinmodelbutisclosedsourced,evolvesfromMacOSXandisthedefaultOSofiPhone,iPodTouchandiPad.ObjectiveCbasedsoftwarecanruniniPhoneOS,andjustlikeAndroid,youcandevelopyourowniPhoneapplic
5、ationsanduploadthemontoApplesAppStoreforsale1234.BycomparingthelatestAndroidandiPhoneOS,Android2.2FroyoandiOS4,wecantakeaglimpseatthemainfeatureofopenandclosedsmartphoneOSs.Whilethe2OSsaredesignedinratherdifferentmentalityandfunctionality,itsalittleearlytotellwhichoneisbetter.2.SmartPhoneOS2.1.Andro
6、idThesystemarchitectureofAndroidconsistsof5layers,whichareLinuxKernel,AndroidRuntime,Libraries,ApplicationFrameworkandApplications,frombottomtotop.Androidprovidescoreserviceslikesecurity,memorymanagement,processmanagement,networkstackanddrivers,basingonLinux2.6.Beingtheabstractlayerbetweensoftwarean
7、dhardware,thelayerofLinuxKernelhidestheimplementingdetailsofhardwareandprovidesintegratedservicesforupperlayer.DalvikvirtualmachineandJavacorelibrariesareincludedinthelayerofAndroidRuntime,providingmostfunctionsinJavacorelibraries.ThelayerofLibrariescontainsaclassofC/C+librariesforAndroidcomponents.
8、ThoselibrariesareintegratedbythelayerofApplicationFrameworkandthenprovidedtodevelopers.ThelayerofApplicationFrameworkprovidesallkindsofmodulesforprograminitializationtosimplifytheuseofcomponents,allowingdevelopersdowhatevertheywantandprovideservicesforothersoftwares,underthelimitationofsecurity,ofco
9、urse.MainstreamapplicationsarelocatedinthelayerofApplication,includinge-mail,SMS,calendar,Googlemap,Webbrowserandcontacts.Usersinteractdirectlywiththislayer12.ThelatestversionofAndroid,Android2.2Froyo,putsonsomenewfeatures.Theyare:1.SupportFlash10.1,enablesusertowatchflashonthephone.2.V8JavaScripten
10、gineinwebbrowserleadstofasterInternetdatatransportation.3.Bigadvanceinnetworksharing.Youcanusethephoneasa3GNIC,orconvert3GsignaltoWi-Fi.4.Automaticallysoftwareupdate.5.SoftwarescanbesetupinSDcardtoextendfilestorages.2.2.iPhoneiPhoneOSisconsistof4abstractlayers:CoreOS,CoreService,MediaandCocoaTouchre
11、spectively.LayersofCoreOSandCoreServicearedesignedinClanguagetohandlecoresystemservices,enablingdeveloperstoperformfileaccess,socketscallinganddatahandling.CFNetworkandSQLitearealsopartsofthese2layers.ThelayerofMedia,accordingtoitsname,thislayerisusedtocontrolvideoandaudio,aswellhandle2Dand3Dimages.
12、TheOpenGL-ESQuratzpartofthelayeriscodedwithClanguage,whilethepartofCore-AudioandCore-AnimationisObjectiveCbased.ThelayerofCocoaTouchbuildsabasicframeworkforallkindsofprogramsiniPhone.MostprogramsruninCocoaTouchlayer,anditssurelyObjectiveCbased34.ThelatestiPhoneOSisiOS4.Itincludesthefollowingnewfeatu
13、res:1.Softwareclassification.Thisfeatureenablesusertoplacesortedsoftwaresintodifferentdocuments,makingitclearertomanage.2.Emailintegration.Oneaccountisforalle-mailsfromdifferentproviders.3.iBook,originallyfromiPad,isbuiltiniOS.4.AbrandnewAppleGameCentermakesiPhoneatremendousentertainmentplatform.2.3
14、.Androidvs.iPhoneBeingthetop2smartphoneOSs,weresurethatbothAndroidandiPhonehavetheirownadvantagesanddisadvantages.Nowletstakealookateachofthem,andseewhatuniquefeaturetheyhave.Android2.2Froyofullysupportmultitask,whichmeansyoucanlistentomusicwhilewritingblog.AndiOS4,officiallyannouncedtobemultitasked
15、,isinfactaplayofconcept.OnlyafewofsoftwareswhichareauthorizedbyApplecanrunsimultaneously,whoseprincipleismucheasierthatmultitask:whenanapplicationisswitchedout,itscurrentstateissavedandthenthesystemjustclosesit.Andwhenitsswitchedin,werebacktotheprevioussnapshot567.DuringthepublicationofAndroid2.2Fro
16、yo,Googleannouncedithasthemostfluentwebbrowser,becausetheuseofV8JavaScriptengine.V8isabrandnewengine,designedforrunningbigsizeJavaScriptapplication.Insomekindoftests,V8ismuchfasterthanJScriptfromInternetExplorer,SpiderMonkeyfromFirefoxandJavaScriptCorefromSafari.Italloweto3keypartsofV8,theyrefastatt
17、ributeaccess,dynamiccodegeneration,effectivetrashcleaning.2.3.1.FastAttributeAccessJavaScriptisakindofdynamiclanguage,whichmeansattributescanbeaddedordeletedatruntime,andtheyrefrequentlychanged.MostJavaScriptenginesuseadictionarystylestructuretostoretheattributesofanobject,soitrequiresawholedictiona
18、rysearchtofindthepositionofattributesinmemory.ItsquiteinefficientanditsslowerthanJavaandSmalltalk.Tosolvethisproblem,V8discardeddynamicsearchandrealizeditinadifferentway:Createhiddenclassesforobjectsdynamically.InJavaScript,everytimewhenwereaddinganewattributetoanobject,wecreateasubclasswiththenewat
19、tributefromahiddenclassasthesuperclass.Itsarecursivecourseandtheaboveperformancehappensonlyoncewhenwefirstdothis.Laterwejustusetheprevioushiddensubclasswhenwereinthesamesituation.Sotheresnoneedtorepeatoperationandcreateadictionary.Thisleadstothesaveoftimeandenergy,aswellmakeiteasierfortheimplementat
20、ionofclassoptimizationandinnercache4.2.3.2.DynamicCodeGenerationWhenJavaScriptisrunningfortheveryfirsttime,V8translateitdirectlyintolocalmachinecode,ratherthanexplainittobytecode.Attributeaccessisdonebyinnercache,whichisoftentranslatedintoinstructionsbyV8atruntime.Whenitcomestothecodewherecertainobj
21、ectisaccessed,V8triestofindthecurrenthiddenclass.Meanwhile,V8assumesthatallobjectsinthesnippetaredescribedbythesamehiddenclass,soV8willmodifycorrespondinginnercachetomakethedirectuseofthehiddenclassmoreconvenient.Ifthisassumptioniscorrect,theaccessofattributescanbealldoneinonly1instruction.Evenifthe
22、predictionfails,innercacheismodifiedagainbyV8,whichwonttaketoomuchtimeandresource.Whenonehiddenclassissharedbyalotofobjects,theaccessspeedcanbeclosetomostdynamiclanguageaccessspeed.Innercacheandhiddenclass,mixedwithdynamiccodeandclassoptimization,improvetheefficiencyofJavaScriptatalargescale4.2.3.3.
23、EffectiveTrashCleaningV8doesmemoryrecyclesautomatically.Toguaranteethespeedofobjectdistribution,aswellcutthetimeoftrashcleaningandclearfragmentup,V8willinterrupttherunningapplicationwhenperformingtrashcleaning.Mostly,onlyasmallpartofobjectstackisinvolvedintrashcleaningcycle,sotheinterruptioncausedli
24、ttle.AlllocationofobjectsandpointersareloggedbyV8,sothesystemwonttakeobjectforpointerandmemoryoverflowisavoided4.Besidesthemostfluentwebbrowser,GooglecollaboratedwithAdobeandAndroid2.2FroyofullysupportsFlash.Thatstosay,notonlyflashmedia,butallflashwebpagescandisplayperfectlyonAndroid.Tothecontrary,A
25、ppleturneddownAdobeandtakeHTML5asiPhoneswebprotocol,makingitunabletoshowsomeflashbasedanimation.Android2.2Froyoalsoleadsthewayinnetworksharing.SmartphonewithFroyocanbeconnectedtoaPCasa3GNIC,andcanalsoconvenientlyconvert3GsignaltoWi-Fi.iOS4candothefirsttoo,butfailedtoconvert3GtoWi-Fi.Videoconferencei
26、sbothsupportedbyFroyoandiOS4,buttheconditionsaredifferent.YoucanseeaFroyouserviacameraaslongasyougetacameraalso.However,iOS4usercanonlydovideotalktoanotheriOS4user,whichisabiglimitation.WhileAndroidisascendantinnetworkinteraction,Appleisuniqueinitsfriendshipandentertainment.Theaddedfeatureofsoftware
27、classificationenablesusertoplacesortedsoftwaresintodifferentdocuments,makingitclearertomanage.Whatsmore,thererehundredsofthousandsapplicationsinAppStore,meaningthatiPhonecanhaveuptohundredsofthousandsfunctions.ThisisaratherremarkablefeaturethatApplepublicizes.AndthemostconvincingpointgivenbyApple,is
28、thatAndroidlooksexactlyfamiliarwithiPhone.Althoughitsjustasubjectivesense,thebornofiPhonereallybroughtbigrevolutiontothephoneindustry,andthenameAppleitselfisaworldfamousbrand78.3.OpenandClosedplatforms3.1.SDKThemostimportantpartofeverydevelopingplatformisSDK,enable3rdpartydeveloperstomakesoftwarefor
29、theplatform.Usually,libraries,debugtoolsandemulatorsareincludedinSDK.DifferentplatformsdistributetheirSDKsdifferently.SomeSDKiscompletefreeandopen,whileothersarestrictlylimited.Developersofopenplatformscangetandmodifypartorallofthesourcecode.GoogleandLinuxareleadersofopenplatforms;theypublicizedthew
30、holesourcecodeofAndroidandLinux.Thegoodpointisthat,platformownerscansaveagreatamountoftimeandenergydevelopingandmaintainingtheplatform,because3rdpartydeveloperswilldothisforthem.Withlessmoneyspentondevelopmentandmaintenance,arelativelylowpricecanattractmoreandmorephoneusers.Contrarily,closedplatform
31、slocktheirsourcecodeinthesafetyandforbid3rdpartyaccesses.AppleandMicrosoftaretherepresentativesofthem,theyarebothclosedsourced,butsomedifferencesdoexists.3rdpartyiPhoneapplicationsarerestrictedwithinnarrowlimits,forthatApplewilllookthrougheveryapplicationwhichisuploadedontoAppStore,andalotofapplicat
32、ionsareturneddown.MicrosoftdontcheckWindowsapplicationsatall,italldependsontheusersthemselves.Youinstalledthemareware,yousuffertheloss.3.2.ApplicationMarketMarketisthemediumbetweendevelopersandusers,henceitsveryimportant.Somepredictedthattherewillbemoreandmoreapplicationmarketswhilesomedontthinkso.I
33、ncurrentmarkets,bothdoexist.Somespecifyonlyonemarketfortheirproducts,whileothersselltheirsoftwaresinvariousmarkets.SoftwaresfromNokia,MicrosoftandLinuxMobilearesoldineverymarket.Developersoftheseplatformscanreleasetheirownapplicationinwhatevermarkets,somarketshavetocompetewitheachotherforaliving.Thi
34、sisgoodforusers.However,thelackofuniversalmanagementmayleadtomessandchaos,softwaresthathavethesamefunctionalityexistindifferentmarkets,whichconfusesusersalot.Correspondingly,solemarketsclaimthatmostapplicationsshouldbesoldinthem.Thiskindofmonopolizationleadstonocompetitor.AppStoreandAndroidMarketare
35、deputyofsolemarkets.Normally,iPhoneapplicationscanonlybefoundinAppStore,andApplewillcheckeveryoneofthembyitself.GoodnewsisthateveryapplicationinAppStoreisofficiallytested,itssafe;Badnewsisthatalotofprettygoodsoftwaresarerejectedforvariousreasons.Andabigunofficialmechanismisbuiltbyhackers,thatisjailb
36、reakandSIMunlock.JailbreakisaprocessthatallowsiPad,iPhoneandiPodTouchuserstogainrootaccessandunlocktheoperatingsystemthusremovinganylimitationsimposeduponthembyApple.Oncejailbroken,iPhoneusersareabletodownloadmanyextensionsandthemespreviouslyunavailablethroughtheAppStoreviainstallerssuchasCydia.Ajai
37、lbrokeniPad,iPhoneoriPodTouchisstillabletousetheAppStoreandiTunes9.AndaSIMlockisacapabilitybuiltintoGSMphonesbymobilephonemanufacturers.Networkprovidersusethiscapabilitytorestricttheuseofthesephonestospecificcountriesandnetworkproviders.Generally,phonescanbelockedtoacceptonlySIMcardsbasedontheIntern
38、ationalMobileSubscriberIdentity.SIMunlockmakeitpossibletouseamobilephonewithoutconsideringcountriesandnetworksspecifiedbymobilephonemanufacturers.HoweverinAndroid,Googledoesnttesteveryapplicationatall,soalthoughtheresanofficialmarketforAndroidapplications,youcanstillreleaseyourproductanywhereyouwant
39、.Consideringsecurityproblems,Googlebannedtheuseofsomecomponents.LikejailbreakandSIMunlockiniPhone,rootinAndroidgivesusers100%controloftheirdevices,alongwithsomesecurityrisks.RootisaprocessthatallowsusersofcellphonesrunningtheAndroidoperatingsystemtoattainprivilegedcontrol(knownasrootaccess)withinAnd
40、roidsLinuxsubsystem,similartojailbreakingonAppledevicesrunningtheiOSoperatingsystem,overcominglimitationsthatthecarriersandmanufacturersputonsuchphones.RootingmakesitpossibletousecustomversionsoftheAndroidsystemsuchasCyanogenMod,supportingfeaturesunavailableinstockROMs.Italsoallowsfornewerversionsof
41、Androidnotsuppliedbytheoriginaldevicemanufacturer.IncontrasttoiOSjailbreaking,rootingisnotneededtorunapplicationsnotdistributedbytheofficialAndroidMarket.Itisneededhowever,whentryingtoaccesspaidAndroidapplicationsfromcountrieswhicharenotpartofthepaidapplicationsmarket.3.3.IntegrationSomecompaniesfocusonlyontheirco