飛信symbian客戶端接口規(guī)范_第1頁(yè)
飛信symbian客戶端接口規(guī)范_第2頁(yè)
飛信symbian客戶端接口規(guī)范_第3頁(yè)
飛信symbian客戶端接口規(guī)范_第4頁(yè)
飛信symbian客戶端接口規(guī)范_第5頁(yè)
已閱讀5頁(yè),還剩34頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、Chaptter 119: MMobille ApppliccatioonsObjjectiives DDefinne a mobiile aappliicatiion. UUnderrstannd coomponnentss fouund iin a mobiile aappliicatiion. LLearnn thee keyy sceenariios wwheree mobbile appllicattionss wouuld bbe ussed. LLearnn thee dessign conssiderratioons ffor mmobille apppliccatioons.

2、 IIdenttify speccificc sceenariios ffor mmobille apppliccatioons, suchh as deplloymeent, poweer ussage, andd synnchroonizaationn. LLearnn thee keyy pattternns annd teechnoologyy connsideeratiions for desiigninng moobilee appplicaationns.目標(biāo)定義個(gè)個(gè)移動(dòng)應(yīng)。理解建建立個(gè)移動(dòng)動(dòng)應(yīng)素。學(xué)習(xí)移移動(dòng)應(yīng)重戶場(chǎng)景。學(xué)習(xí)移移動(dòng)應(yīng)設(shè)計(jì)計(jì)考慮因素素。鑒別特特定移動(dòng)應(yīng)應(yīng)場(chǎng)景,如如部

3、署,電電量同步等等。學(xué)習(xí)移移動(dòng)應(yīng)關(guān)鍵鍵模型技術(shù)術(shù)因素。OveervieewA mmobille apppliccatioon wiill nnormaally be sstrucctureed ass a mmultii-layyeredd appplicaationn connsistting of uuser expeeriennce, busiinesss, annd daata llayerrs. WWhen deveelopiing aa mobbile appllicattion, youu mayy chooose to ddevellop aa thiin Weeb-baase

4、d clieent oor a richh cliient. If you are builldingg a rrich clieent, the busiinesss andd datta seervicces llayerrs arre liikelyy to be llocatted oon thhe deevicee itsself. If you are builldingg a tthin clieent, the busiinesss andd datta laayerss willl bee loccatedd on the servver. Figuure 11 illlus

5、trratess commmon richh cliient mobiile aappliicatiion aarchiitectture withh commponeents grouuped by aareass of conccern.概述通常,移移動(dòng)應(yīng)由個(gè)層應(yīng)結(jié)構(gòu),包包括戶體驗(yàn)驗(yàn)、業(yè)務(wù)數(shù)數(shù)據(jù)等。移移動(dòng)應(yīng)時(shí),以選擇擇做個(gè)基于于網(wǎng)絡(luò)瘦客客戶端或個(gè)個(gè)富客戶端端。如果選選擇富客戶戶端,那么么業(yè)務(wù)數(shù)據(jù)據(jù)服務(wù)層般般位于設(shè)備備本身。如如果選擇瘦瘦客戶端,那那么業(yè)務(wù)數(shù)數(shù)據(jù)層則位位于服務(wù)器器端。圖1,根據(jù)組組成素關(guān)系,描描述個(gè)富客客戶端移動(dòng)動(dòng)應(yīng)架構(gòu)。圖1:常富客戶戶端應(yīng)架構(gòu)構(gòu)Dessign Conssi

6、derratioonsThee folllowiing ddesiggn guuidelliness proovidee infformaationn aboout ddiffeerentt asppectss youu shoould conssiderr wheen deesignning a moobilee appplicaationn. Foolloww theese gguideelinees too enssure thatt youur apppliccatioon meeets yourr reqquireementts annd peerforrms eefficcient

7、tly iin sccenarrios commmon tto moobilee appplicaationns:設(shè)計(jì)考考慮當(dāng)設(shè)計(jì)計(jì)個(gè)移動(dòng)應(yīng)應(yīng)時(shí),面設(shè)計(jì)方針針提供應(yīng)該考考慮不同方方面信息。遵循這些些指能夠確確保應(yīng)能夠滿足足需求,同同時(shí),于般移動(dòng)應(yīng)能夠夠有效。 DDecidde iff youu willl buuild a riich ccliennt, aa thiin Weeb cllientt, orr ricch Innternnet aappliicatiion (RIA). Iff youur apppliccatioon reequirres llocall proocesssi

8、ng and mustt worrk inn an occaasionnallyy connnectted sscenaario, connsideer deesignning a riich ccliennt. KKeep in mmind thatt a rrich clieent aappliicatiion wwill conssume moree devvice resoourcees annd wiill bbe moore ccompllex tto innstalll annd maaintaain. If yyour appllicattion can depeend oon

9、 seerverr proocesssing and willl alwways be ffullyy connnectted, conssiderr dessigniing aa thiin cllientt. Iff youur apppliccatioon reequirres aa ricch usser iinterrfacee (UII), oonly limiited acceess tto loocal resoourcees, aand mmust be pportaable to ootherr plaatforrms, desiign aan RIIA cllientt.

10、決定建建立個(gè)富客客戶端、基基于網(wǎng)絡(luò)瘦瘦客戶端或或富Inteernett應(yīng)(RIAA)。如果果應(yīng)需本地處理理,偶爾聯(lián)聯(lián)網(wǎng)必須工工作,那么么就考慮設(shè)設(shè)計(jì)成個(gè)富富客戶端。記住,個(gè)個(gè)富客戶端端應(yīng)消耗更更設(shè)備資源源,按照維維護(hù)工作比比較責(zé)。如如果應(yīng)能夠依靠靠服務(wù)器處處理,并且且直保持聯(lián)聯(lián)網(wǎng),那么么就考慮設(shè)設(shè)計(jì)瘦客戶戶端。如果果應(yīng)需豐富戶體驗(yàn)驗(yàn),使本地地資源受限限,并且必必須能夠移移植其,那么就就設(shè)計(jì)成RRIA客戶戶端。 DDeterrminee thee devvice typees yoou wiill ssuppoort. Whenn chooosinng whhich deviice ttypes

11、s to suppport, connsideer sccreenn sizze, rresollutioon (DDPI), CPUU perrformmancee chaaractterissticss, meemoryy andd stooragee spaace, and deveelopmment tooll envvironnmentt avaailabbilitty. IIn addditiion, facttor iin usser rrequiiremeents and orgaanizaationnal cconsttrainnts.決定支支持設(shè)備類類型。選擇擇支持設(shè)備備類

12、型時(shí),考慮屏幕、分辨率(DPI)、CPU特性、主存、擴(kuò)展存儲(chǔ)工具環(huán)境。另,還考慮戶需求組織限制因素。 DDesiggn thhe apppliccatioon wiith ooccassionaally connnecteed liimiteed-baandwiidth scennarioos inn minnd. MMost mobiile aappliicatiions mustt worrk whhen aa nettworkk connnecttion is iinterrmitttent or nnot aavaillablee. Itt is vitaal inn thiis si

13、ituattion to ddesiggn yoour ccachiing, statte maanageementt, annd daata aaccesss meechannismss witth inntermmitteent nnetwoork cconneectivvity in mmind. Battch ccommuunicaationns foor tiimes of cconneectivvity. Chooose harddwaree andd sofftwarre prrotoccols baseed onn speeed, poweer coonsummptioon,

14、aand “chatttineess,” andd nott jusst onn easse off proogrammmingg設(shè)計(jì)偶偶爾聯(lián)網(wǎng),并并且?guī)捠苁芟迲?yīng)。數(shù)移動(dòng)應(yīng)應(yīng)必須間歇性性地連接網(wǎng)網(wǎng)絡(luò)或網(wǎng)絡(luò)絡(luò)不都能工工作。這種種間歇性網(wǎng)網(wǎng)絡(luò)連接,設(shè)設(shè)計(jì)存、狀狀態(tài)管理數(shù)數(shù)據(jù)獲機(jī)制制重。有網(wǎng)絡(luò)連連接,就進(jìn)進(jìn)行通信批批處理。基基于速度、功耗“繁瑣”程度選擇硬硬軟協(xié)議,而而并不從編編程難易程程度做。 DDesiggn a UI aapproopriaate ffor mmobille deevicees, ttakinng innto aaccouunt pplatfform consstraiint

15、s. Mobbile deviices requuire a siimpleer arrchittectuure, simppler UI, and otheer sppeciffic ddesiggn deecisiions in oorderr to workk witthin the consstraiints impoosed by tthe ddevicce haardwaare. Keepp theese cconsttrainnts iin miind aand ddesiggn sppecifficallly ffor tthe ddevicce innsteaad off t

16、ryying to rreusee thee arcchiteecturre orr UI fromm a ddeskttop oor Weeb apppliccatioon. TThe mmain consstraiints are memoory, batttery lifee, abbilitty too adaapt tto diifferrencee scrreen sizees annd orrienttatioons, secuurityy, annd neetworrk baandwiidth.考慮約約束,設(shè)計(jì)計(jì)適合移動(dòng)動(dòng)設(shè)備UII。移動(dòng)設(shè)設(shè)備需簡(jiǎn)單單架構(gòu)、簡(jiǎn)簡(jiǎn)潔UI其特定設(shè)計(jì)

17、滿足設(shè)設(shè)備硬所帶帶資源受限限。牢記這這些限制設(shè)設(shè)計(jì)適合設(shè)設(shè)備程序,而而非嘗試著著重桌面或或網(wǎng)絡(luò)應(yīng)架構(gòu)構(gòu)。最主限限制包括存存容量、電電池壽命、適應(yīng)不同同屏幕分辨辨率能力、安全網(wǎng)絡(luò)絡(luò)帶寬。 DDesiggn a layeered archhiteccturee appproprriatee forr mobbile deviices thatt impprovees reeuse and mainntainnabillity. Deppendiing oon thhe apppliccatioon tyype, multtiplee layyers may be llocatted oon thh

18、e deevicee itsself. Usee thee connceptt of layeers tto maaximiize sseparratioon off conncernns, aand tto immprovve reeuse and mainntainnabillity for yourr mobbile appllicattion. Howweverr, aiim too achhievee thee smaallesst foootprrint on tthe ddevicce byy simmpliffyingg youur deesignn commpareed to

19、o a ddeskttop oor Weeb apppliccatioon.設(shè)計(jì)分分層架構(gòu),適適應(yīng)移動(dòng)設(shè)設(shè)備,提重重性維護(hù)性。基于應(yīng)類類型,不同同層位于設(shè)設(shè)備本身部部。利層概念最化地分離離考慮因素素,并且提提移動(dòng)應(yīng)重性維護(hù)性。但,桌面或網(wǎng)絡(luò)絡(luò)應(yīng)相比,通通過簡(jiǎn)化設(shè)設(shè)計(jì)實(shí)現(xiàn)這這個(gè)最覆蓋蓋區(qū)。 DDesiggn coonsidderinng deevicee ressourcce coonstrraintts suuch aas baatterry liife, memoory ssize, andd proocesssor sspeedd. Evvery desiign ddecission sh

20、ouuld ttake intoo acccountt thee limmitedd CPUU, meemoryy, sttoragge caapaciity, and batttery lifee of mobiile ddevicces. Batttery lifee is usuaally the mostt limmitinng faactorr in mobiile ddevicces. Backklighhtingg, reeadinng annd wrritinng too memmory, wirrelesss coonnecctionns, sspeciializzed hh

21、ardwware, andd proocesssor sspeedd alll havve ann imppact on tthe ooveraall ppowerr usaage. Whenn thee amoount of mmemorry avvailaable is llow, the Micrrosofft Winndowss Mobbile opeeratiing ssysteem maay assk yoour aappliicatiion tto shhut ddown or ssacriificee cacched dataa, sllowinng prrograam exx

22、ecuttion. Opttimizze yoour aappliicatiion tto miinimiize iits ppowerr andd memmory foottprinnt whhile conssiderring perfformaance duriing tthis proccess.考慮設(shè)設(shè)備資源受受限因素,如如電池壽命命、存處理器速速度等。每每個(gè)設(shè)計(jì)應(yīng)應(yīng)該考慮移移動(dòng)設(shè)備CCPU受限限、存/存儲(chǔ)容量量電池壽命命。般說(shuō),電池池壽命移動(dòng)動(dòng)設(shè)備最受受限因素。背景燈、讀存、無(wú)無(wú)線連接、特殊硬處理器速速度,所有有這些總體體功耗產(chǎn)生生重影響。存少,Micrrosofft Winndo

23、wss Mobbile操作系統(tǒng)統(tǒng)提醒關(guān)閉應(yīng)應(yīng)程序或丟失失緩存數(shù)據(jù)據(jù)、降程序序執(zhí)行速度度等等??伎紤]性能表表現(xiàn),優(yōu)化化應(yīng)程序,功耗耗存使降最。Mobbile Clieent FFrameeTheere aare sseverral ccommoon isssuess thaat yoou muust cconsiider as yyour deveelop yourr dessign. Theese iissuees caan bee cattegorrizedd intto sppeciffic aareass of the desiign. The folllowinng taable li

24、stts thhe coommonn isssues for eachh cattegorry whhere misttakess aree mosst offten madee.移動(dòng)客客戶端框架架應(yīng)程序序時(shí)候,有有些問題必須須考慮。這些些問題以分分成不同類類型。面表格列出出通常容易易出問題。表1 移動(dòng)客戶戶端框架類型主問題認(rèn)證授權(quán)l(xiāng)偶爾連連接網(wǎng)絡(luò),未未使認(rèn)證。 l偶偶爾連接網(wǎng)網(wǎng)絡(luò),未使使授權(quán)。lVVPN網(wǎng)絡(luò)絡(luò),未使認(rèn)證證授權(quán)。l使使空接口同步步時(shí),未使使認(rèn)證。l主主機(jī)同步時(shí)時(shí),未使認(rèn)認(rèn)證。l有有連接,比比如空接口口、插座、藍(lán)牙SDD卡,未使使認(rèn)證。l不不能辨別不不同設(shè)備間間安全模式式差異。緩

25、存l資源受受限設(shè)備緩存不不必?cái)?shù)據(jù)。 l間間歇性網(wǎng)絡(luò)絡(luò)連接,依依靠能無(wú)法法獲得緩存存數(shù)據(jù)。l選選擇不合理理緩存地址址數(shù)據(jù)格式式l使使未加密格式式存放敏感感數(shù)據(jù)l未未使合適緩存技技術(shù)通信l未能保保護(hù)空接口口敏感數(shù)據(jù)據(jù)。 l未未網(wǎng)絡(luò)服務(wù)務(wù)通信進(jìn)行行加密。l未未VPN通信信進(jìn)行加密密。l帶帶寬受限網(wǎng)網(wǎng)絡(luò)連接,未未通信進(jìn)行行加密。l未未受限帶寬寬連接進(jìn)行行有效管理理。l未未個(gè)網(wǎng)絡(luò)服服務(wù)進(jìn)行有有效管理。l未未考慮間歇歇性網(wǎng)絡(luò)連連接工作。l未未考慮連接接成本,并并讓戶管理連接接。l使使電池,未考考慮最化功功耗。l未未使合適通信協(xié)協(xié)議。配置管理l設(shè)備重重啟,未恢恢復(fù)配置狀狀態(tài)。 l未未考慮通過過空接口進(jìn)進(jìn)行配

26、置管管理同步。l未未考慮通過過主機(jī)進(jìn)行行配置管理理同步。l采采不合適數(shù)據(jù)據(jù)格式存儲(chǔ)儲(chǔ)配置信息息。l未未保護(hù)敏感感配置信息息。l未未考慮不同同設(shè)備制造造商于重載載配置參數(shù)數(shù)差異。數(shù)據(jù)獲l未考慮慮間歇性網(wǎng)網(wǎng)絡(luò)連接數(shù)數(shù)據(jù)獲機(jī)制制。 l未未考慮數(shù)據(jù)據(jù)庫(kù)接入性性能。lddatasset進(jìn)行行查詢。l未未考慮合適適復(fù)制技術(shù)。l未未考慮使設(shè)設(shè)備數(shù)據(jù)庫(kù)庫(kù)服務(wù),如如Micrrosofft SQQL Seerverr Commpactt Ediitionn。調(diào)試l選擇支支持種設(shè)備備時(shí)候,未未考慮調(diào)試試成本。 l設(shè)設(shè)計(jì)時(shí),未未考慮調(diào)試試,例如,使使模擬器而而不真實(shí)設(shè)設(shè)備。l未未考慮所有有連接調(diào)試試。設(shè)備l未考慮慮設(shè)

27、備差異異性,如屏屏幕CPUU能力。 l給給戶展示不不友好出信息。l未未保護(hù)敏感感信息。l未未考慮設(shè)備備處理能力力。異常管理l拋出異異常以,未未恢復(fù)應(yīng)程程序狀態(tài)。 l暴暴露敏感信信息給戶。l未未記錄詳盡盡異常信息息。l使使異常控制應(yīng)應(yīng)流程。日志l未考慮慮遠(yuǎn)端日志志記錄,而而只考慮設(shè)設(shè)備。 l未未考慮獲設(shè)備日志志。l未未考慮記錄錄日志時(shí),資資源受限。l未未保護(hù)日志志文敏感信信息。移植l未重現(xiàn)現(xiàn)存富客戶戶端UI適合設(shè)設(shè)備。 l未未探究移植植工具。同步l通信過過程,未同步進(jìn)進(jìn)行安全保保護(hù)。 l未未管理空接接口同步,而而不插座同同步。l未未管理同步步斷。l未未處理同步步?jīng)_突。l未未考慮合適適合并復(fù)制制。

28、戶界面l未考慮慮受限UII因素。 l未未考慮單窗窗口環(huán)境。l未未考慮單戶戶程序運(yùn)行行。l未未設(shè)計(jì)觸摸摸屏或觸筆筆UI。l未未包含不同同屏幕方向向支持。l未未管理設(shè)備備重啟恢復(fù)復(fù)。l桌桌面應(yīng)相比比,未考慮慮受限APPIUI控。驗(yàn)證l主機(jī)通通信過程,未未輸入數(shù)據(jù)進(jìn)進(jìn)行驗(yàn)證。 l空空接口通信信過程,未未輸入數(shù)據(jù)進(jìn)進(jìn)行驗(yàn)證。l未未保護(hù)硬資資源,例如如攝像頭電電話始化。l設(shè)設(shè)計(jì)時(shí),未未考慮受限限資源性能。本文翻譯“Authhentiicatiion aand AAuthoorizaationn”、“Cachhing”、“Commmuniccatioon”“Conffigurratioon Maanage

29、ementt”部分。Autthentticattion and AuthhorizzatioonDessigniing aan efffecttive authhentiicatiion aand aauthoorizaationn strrateggy iss impportaant ffor tthe ssecurrity and reliiabillity of yyour appllicattion. Weaak auuthennticaationn cann leaave yyour appllicattion vulnnerabble tto unnauthhorizzed uus

30、e. Mobiile ddevicces aare uusuallly ddesiggned to bbe siinglee-useer deevicees annd noormallly llack basiic usser pprofiile aand ssecurrity tracckingg beyyond justt a ssimplle paasswoord. Otheer coommonn dessktopp mecchaniisms are alsoo likkely to bbe miissinng. TThe ddiscooveraabiliity oof moobilee

31、 devvicess oveer prrotoccols suchh as Blueetootth caan prresennt ussers withh uneexpeccted scennarioos. MMobille apppliccatioons ccan aalso be eespecciallly chhalleenginng duue too connnecttivitty innterrruptiions. Connsideer alll poossibble cconneectivvity scennarioos, wwhethher oover-the-air or hh

32、ard-wireed.認(rèn)證授授權(quán)于應(yīng)程程序安全性性靠性說(shuō),設(shè)設(shè)計(jì)個(gè)有效效認(rèn)證授權(quán)策策略非常重重。相說(shuō)較弱弱認(rèn)證以讓您您應(yīng)程序容易易受未經(jīng)授授權(quán)使。移動(dòng)設(shè)設(shè)備般設(shè)計(jì)單個(gè)戶使,除個(gè)簡(jiǎn)單單密碼以,經(jīng)經(jīng)常缺少基基本戶配置置文安全追追蹤策略。同時(shí),移移動(dòng)設(shè)備,其其通桌面安全全機(jī)制容易易被忽略。通過諸如如藍(lán)牙等協(xié)協(xié)議,移動(dòng)動(dòng)設(shè)備容易易被,這就就給戶帶意料不不。連接斷能性給移動(dòng)動(dòng)應(yīng)帶極挑戰(zhàn)。無(wú)無(wú)論通過無(wú)無(wú)線或有線線,們必須須考慮所有有能連接場(chǎng)景景。Consiider the folllowinng guuidelliness wheen deesignning authhentiicatiion aand

33、aauthoorizaationn: DDesiggn auuthennticaationn forr oveer-thhe-aiir, ccradlled ssynchhroniizatiion, Blueetootth diiscovvery, andd loccal SSD caard sscenaarioss. CConsiider thatt difffereent ddevicces mmightt havve vaariattionss in theiir prrograamminng seecuriity mmodells, wwhichh cann afffect authh

34、orizzatioon too acccess resoourcees DDo noot asssumee thaat seecuriity mmechaanismms avvailaable on llargeer pllatfoorms willl be avaiilablle onn a mmobille pllatfoorm, evenn if you are usinng thhe saame ttoolss. Foor exxamplle, aaccesss coontrool liists(ACLss) arre noot avvailaable in WWindoows MMo

35、bille, aand cconseequenntly therre iss no operratinng syystemmlevvel ffile secuurityy. EEnsurre thhat yyou rrequiire aautheenticcatioon foor acccesss by Blueetootth deevicees. IIdenttify trusst booundaariess witthin yourr mobbile appllicattion layeers; for insttancee, beetweeen thhe cllientt andd th

36、ee serrver or tthe sserveer annd thhe daatabaase. Thiss willl heelp yyou tto deetermmine wherre annd hoow too autthentticatte.設(shè)計(jì)認(rèn)認(rèn)證授權(quán)時(shí)時(shí),考慮以以幾點(diǎn)指方針針:無(wú)線線連接、插插座同步、藍(lán)牙本機(jī)機(jī)SD卡設(shè)計(jì)計(jì)認(rèn)證。編程程安全模式式,不同設(shè)備備能有所差差異,這就就影響資源源獲認(rèn)證。即使使相相同工具,不認(rèn)安全機(jī)制制就以移動(dòng)。例如如,Winndowss Mobbile,訪訪問控制表表不,因此就就沒有操作作系統(tǒng)級(jí)文文安全機(jī)制制。通過過藍(lán)牙接入入設(shè)備時(shí),確確保使認(rèn)證證機(jī)制。

37、明確確您移動(dòng)應(yīng)應(yīng)層信任界限限。例如,客戶端服務(wù)器間,還服務(wù)器數(shù)據(jù)庫(kù)間。這有助于確定何處以何種方式進(jìn)行認(rèn)證。CachiingUsee cacchingg to imprrove the perfformaance and respponsiiveneess oof yoour aappliicatiion, and to ssuppoort ooperaationn wheen thhere is nno neetworrk coonnecctionn. Usse caachinng too opttimizze reefereence dataa loookupss, too avooid n

38、netwoork rroundd triips, and to aavoidd unnnecesssariily ddupliicateed prrocesssingg. Whhen ddecidding whatt datta too cacche, conssiderr thee limmitedd ressourcces oof thhe deevicee; yoou wiill hhave lesss stooragee spaace aavaillablee thaan onn a PPC.緩存利緩存存提應(yīng)程序性能響應(yīng),并并且沒有網(wǎng)網(wǎng)絡(luò)連接,支支持程序操操作。使緩緩存優(yōu)化參參考數(shù)據(jù)查

39、查詢,避免免網(wǎng)絡(luò)往返返時(shí)延影響響,減少不不必重復(fù)操操作。決定定緩存哪些些數(shù)據(jù)時(shí),必必須考慮設(shè)設(shè)備有限資資源;PCC機(jī)相比,移移動(dòng)設(shè)備具具有更少存存儲(chǔ)空間。Connsideer thhe foollowwing guiddelinnes wwhen desiigninng caachinng: IIdenttify yourr perrformmancee objjectiives. Forr exaamplee, deetermmine yourr minnimumm ressponsse tiime aand bbatteery llife. Tesst thhe peerforrmancc

40、e off thee speecifiic deevicees yoou wiill bbe ussing. Mosst moobilee devvicess usee onlly fllash memoory, whicch iss likkely to bbe sllowerr thaan thhe meemoryy useed inn dessktopp macchinees. CCachee staatic dataa thaat iss useeful, andd avooid ccachiing vvolattile dataa. CConsiider cachhing the d

41、ataa thaat thhe apppliccatioon iss mosst liikelyy to needd in an ooccassionaally connnecteed sccenarrio. CChoosse thhe appproppriatte caache locaationn, suuch aas onn thee devvice, at the mobiile ggatewway, or iin thhe daatabaase sserveer. DDesiggn foor miinimuum meemoryy foootpriint. Cachhe onnly d

42、data thatt is absooluteely nnecesssaryy forr thee appplicaationn to funcctionn, orr exppensiive tto trransfform intoo a rreadyy-to-use formmat. If ddesiggningg a mmemorry-inntenssive appllicattion, dettect low-memoory sscenaarioss andd dessign a meechannism for priooritiizingg thee datta too disscar

43、dd as avaiilablle meemoryy deccreasses.設(shè)計(jì)緩存時(shí)時(shí),考慮以以指方針:明確確性能目標(biāo)標(biāo)。例如,制制定最響應(yīng)應(yīng)時(shí)間電池池壽命,使特定設(shè)備備進(jìn)行測(cè)試試。數(shù)移動(dòng)動(dòng)設(shè)備只使使閃存,桌面面機(jī)器相比比,讀速度更慢慢。緩存存有靜態(tài)數(shù)數(shù)據(jù),而非非易失性數(shù)數(shù)據(jù)。間歇歇性網(wǎng)絡(luò)連連接場(chǎng)景,考慮慮緩存那些些應(yīng)程序需需數(shù)據(jù)。選擇擇合適緩存存地點(diǎn),例例如設(shè)備、移動(dòng)動(dòng)網(wǎng)關(guān)或數(shù)數(shù)據(jù)庫(kù)服務(wù)務(wù)器。設(shè)計(jì)計(jì)所需存最最程序。緩緩存那些實(shí)實(shí)現(xiàn)程序功功能所必須須數(shù)據(jù),或或轉(zhuǎn)變成格式式數(shù)據(jù)。如如果設(shè)計(jì)個(gè)個(gè)存密集型型程序,就就需檢測(cè)存,并設(shè)計(jì)計(jì)個(gè)機(jī)制,存存減,決定定數(shù)據(jù)丟棄棄優(yōu)先級(jí)。Commmuniica

44、tiionDevvice commmuniccatioon inncluddes wwirelless commmuniccatioon (oover the air) andd wirred ccommuunicaationn witth a hostt PC, as welll as moree speeciallizedd commmuniicatiion ssuch as BBluettoothh or Infrraredd Datta Asssociiatioon (IIrDA). Whhen ccommuunicaatingg oveer thhe aiir, cconsiider

45、 dataa seccuritty too prootectt sennsitiive ddata fromm theeft oor taamperring. If you are commmuniccatinng thhrouggh Weeb seervicce innterffacess, usse meechannismss succh ass thee WS-Secuure sstanddardss to secuure tthe ddata. Keeep inn minnd thhat wwirelless deviice ccommuunicaationn is moree lik

46、kely to bbe innterrrupteed thhan ccommuunicaationn froom a PC, and thatt youur apppliccatioon miight be rrequiired to ooperaate ffor llong periiods in aa dissconnnecteed sttate.通信設(shè)備通通信包括無(wú)無(wú)線通信,主機(jī)有線通信,更加特殊諸如藍(lán)牙或紅線通信。使無(wú)線通信,必須考慮數(shù)據(jù)安全性,防止敏感數(shù)據(jù)被盜或被篡改。如果通過網(wǎng)絡(luò)接口進(jìn)行通信,那么就使諸如WS安全標(biāo)準(zhǔn)機(jī)制保護(hù)數(shù)據(jù)。牢記設(shè)備無(wú)線通信PC機(jī)相比,被斷能性更。那樣,應(yīng)程序

47、必須長(zhǎng)時(shí)間沒有網(wǎng)絡(luò)連接常工作Consiider the folllowinng guuidelliness wheen deesignning yourr commmuniicatiion sstrattegy: DDesiggn assynchhronoous, threeadedd commmuniicatiion tto immprovve ussabillity in ooccassionaally connnecteed sccenarrios. IIf yoou arre deesignning an aappliicatiion tthat willl runn on a moo

48、bilee phoone, conssiderr thee efffectss of receeivinng a phonne caall ddurinng coommunnicattion or pprogrram eexecuutionn. Deesignn thee appplicaationn to alloow itt to susppend and resuume, or eeven exitt thee appplicaationn. PProteect ccommuunicaationn oveer unntrussted connnectiions, succh ass We

49、bb serrvicees annd otther overr-thee- aiir meethodds. IIf yoou muust aaccesss daata ffrom multtiplee souurcess, innterooperaate wwith otheer apppliccatioons, or wwork whille diisconnnectted, conssiderr usiing WWeb sserviices for commmuniccatioon. IIf yoou arre ussing WCF for commmuniccatioon annd ne

50、eed tto immplemment messsage queuuing, connsideer ussing WCF storre annd foorwarrd.設(shè)計(jì)通通信策略時(shí)時(shí),考慮以以指方針:設(shè)計(jì)計(jì)異步線程程通信提間歇性網(wǎng)網(wǎng)絡(luò)連接場(chǎng)場(chǎng)景性。如果果設(shè)計(jì)個(gè)運(yùn)運(yùn)行于移動(dòng)動(dòng)電話應(yīng)程序,考考慮通信或或程序執(zhí)行行期間接電電話影響。應(yīng)程序設(shè)計(jì)計(jì)暫停,繼繼續(xù),或退退出。防止止設(shè)備不靠連接進(jìn)行通通信,例如如網(wǎng)絡(luò)服務(wù)務(wù)其無(wú)線方式式服務(wù)。如果果必須從個(gè)源源獲數(shù)據(jù),其應(yīng)程序協(xié)作作,或未聯(lián)聯(lián)網(wǎng)工作,那那么就考慮慮使網(wǎng)絡(luò)服服務(wù)進(jìn)行通通信。如果果使WCF進(jìn)行行通信,同同時(shí)需實(shí)現(xiàn)現(xiàn)消息隊(duì)列列,那么就就考慮使WWCF

51、存儲(chǔ)儲(chǔ)轉(zhuǎn)發(fā)Confiiguraationn MannagemmentWheen deesignning deviice cconfiiguraationn mannagemment, connsideer hoow too hanndle deviice rresetts, aas weell aas whhetheer yoou waant tto alllow conffigurratioon off youur apppliccatioon ovver tthe aair oor frrom aa hosst PCC.Connsideer thhe foollowwing guiddel

52、innes wwhen desiigninng yoour cconfiiguraationn-mannagemment straategyy:配置管管理設(shè)計(jì)設(shè)設(shè)備配置管管理時(shí),考考慮處理設(shè)設(shè)備復(fù)位,否通過無(wú)線方式或主機(jī)方式配置應(yīng)程序。設(shè)計(jì)配置管理策略時(shí),考慮以指方針: DDesiggn foor thhe reestorratioon off connfiguuratiion aafterr a ddevicce reeset. IIf yoou haave yyou eenterrprisse daata iin Miicrossoft SQL Servver 22005 or 22008

53、 and desiire aan accceleerateed tiime tto maarkett, coonsidder uusingg merrge rrepliicatiion wwith a “buy and conffigurre” appplicaationn froom a thirrd paarty. Merrge rrepliicatiion ccan ssynchhroniize ddata in aa sinngle operratioon reegarddlesss of netwwork banddwidtth orr datta siize. DDue tto m

54、eemoryy limmitattionss, chhoosee binnary formmat oover Exteensibble MMarkuup Laanguaage (XML) forr connfiguuratiion ffiless PProteect ssensiitivee datta inn devvice conffigurratioon fiiles. CConsiider usinng coompreessioon liibrarry rooutinnes tto reeducee thee memmory requuiremmentss forr connfiguu

55、ratiion aand sstatee infformaationn. IIf yoou haave aa Miccrosooft AActivve Diirecttory dirrectoory sserviice iinfraastruucturre, cconsiider usinng thhe Syystemm Cennter Mobiile DDevicce Maanageer innterfface to mmanagge grroup conffigurratioon, aautheenticcatioon, aand aauthoorizaationn of deviices

56、. Seee thee Tecchnollogy Conssiderratioons ssectiion ffor rrequiiremeents for the Mobiile DDevicce Maanageer.考慮慮設(shè)備復(fù)位位配置參數(shù)數(shù)恢復(fù)。如果果Micrrosofft SQQL Seerverr 20005 或20088擁有企業(yè)業(yè)級(jí)數(shù)據(jù),同同時(shí)期望縮縮短市時(shí)間間,那么就就考慮使第第三方“buy and conffigurre”應(yīng)進(jìn)行合并并復(fù)制。合合并復(fù)制以以通過單步步操作同步步數(shù)據(jù),而而不管網(wǎng)絡(luò)絡(luò)帶寬或數(shù)數(shù)據(jù)。從配配置文存儲(chǔ)儲(chǔ)所需看,選選擇二進(jìn)制制格式,而而非XMLL格式。保護(hù)護(hù)設(shè)備

57、配置置文敏感數(shù)數(shù)據(jù)。考慮慮使壓縮文文減配置狀態(tài)信信息存儲(chǔ)空空間需求。如果果擁有Miccrosooft AActivve Diirecttory服務(wù)基礎(chǔ)礎(chǔ)設(shè)施,那那么就考慮慮使Sysstem Centter MMobille Deevicee Mannagerr接口管理設(shè)設(shè)備群組配配置、認(rèn)證證授權(quán)信息息。參考Tecchnollogy Conssiderratioons節(jié)關(guān)于Mobbile Deviice MManagger需求求部分。本文翻譯”Dataa Acccess”、” Debbuggiing”、” Devvice”、” Excceptiion MManaggemennt” Logggin

58、gg”部分。Datta AcccesssDatta acccesss on a moobilee devvice is cconsttrainned bby unnreliiablee nettworkk connnecttionss andd thee harrdwarre coonstrraintts off thee devvice itseelf. Whenn dessigniing ddata acceess, conssiderr howw loww banndwiddth, highh lattencyy, annd inntermmitteent cconneectivvity

59、 willl imppact yourr dessign.數(shù)據(jù)存存移動(dòng)設(shè)設(shè)備數(shù)據(jù)存存受不靠網(wǎng)絡(luò)連接接設(shè)備本身身硬限制。因此,設(shè)設(shè)計(jì)數(shù)據(jù)存存策略時(shí)候,考慮慮帶寬、延時(shí)時(shí)間歇性網(wǎng)網(wǎng)絡(luò)連接影影響。Connsideer thhe foollowwing guiddelinnes wwhen desiigninng daata aaccesss: PProgrram ffor ddata inteegritty. FFiless lefft oppen ddurinng deevicee susspendd andd powwer ffailuures may causse daata-iinteggr

60、ityy isssues, esppeciaally whenn datta iss stoored on aa remmovabble sstoraage ddevicce. IIncluude eexcepptionn hanndlinng annd reetry logiic too enssure thatt fille opperattionss succceedd. DDo noot asssumee thaat reemovaable storrage willl alwways be aavaillablee, ass a uuser can remoove iit att a

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論