版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、.:.;Chapter 19: Mobile ApplicationsObjectives Define a mobile application. Understand components found in a mobile application. Learn the key scenarios where mobile applications would be used. Learn the design considerations for mobile applications. Identify specific scenarios for mobile application
2、s, such as deployment, power usage, and synchronization. Learn the key patterns and technology considerations for designing mobile applications.目的定義個(gè)挪動(dòng)應(yīng)。了解建立個(gè)挪動(dòng)應(yīng)素。學(xué)習(xí)挪動(dòng)應(yīng)重戶場(chǎng)景。學(xué)習(xí)挪動(dòng)應(yīng)設(shè)計(jì)思索要素。鑒別特定挪動(dòng)應(yīng)場(chǎng)景,如部署,電量同步等。學(xué)習(xí)挪動(dòng)應(yīng)關(guān)鍵模型技術(shù)要素。OverviewA mobile application will normally be structured as a multi-layered appli
3、cation consisting of user experience, business, and data layers. When developing a mobile application, you may choose to develop a thin Web-based client or a rich client. If you are building a rich client, the business and data services layers are likely to be located on the device itself. If you ar
4、e building a thin client, the business and data layers will be located on the server. Figure 1 illustrates common rich client mobile application architecture with components grouped by areas of concern.概述通常,挪動(dòng)應(yīng)由個(gè)層應(yīng)構(gòu)造,包括戶體驗(yàn)、業(yè)務(wù)數(shù)據(jù)等。挪動(dòng)應(yīng)時(shí),以選擇做個(gè)基于網(wǎng)絡(luò)瘦客戶端或個(gè)富客戶端。假設(shè)選擇富客戶端,那么業(yè)務(wù)數(shù)據(jù)效力層般位于設(shè)備本身。假設(shè)選擇瘦客戶端,那么業(yè)務(wù)數(shù)據(jù)層那么位于
5、效力器端。圖1,根據(jù)組成素關(guān)系,描畫個(gè)富客戶端挪動(dòng)應(yīng)架構(gòu)。圖1:常富客戶端應(yīng)架構(gòu)Design ConsiderationsThe following design guidelines provide information about different aspects you should consider when designing a mobile application. Follow these guidelines to ensure that your application meets your requirements and performs efficiently i
6、n scenarios common to mobile applications:設(shè)計(jì)思索當(dāng)設(shè)計(jì)個(gè)挪動(dòng)應(yīng)時(shí),面設(shè)計(jì)方針提供應(yīng)該思索不同方面信息。遵照這些指可以確保應(yīng)可以滿足需求,同時(shí),于般挪動(dòng)應(yīng)可以有效。 Decide if you will build a rich client, a thin Web client, or rich Internet application (RIA). If your application requires local processing and must work in an occasionally connected scenario, co
7、nsider designing a rich client. Keep in mind that a rich client application will consume more device resources and will be more complex to install and maintain. If your application can depend on server processing and will always be fully connected, consider designing a thin client. If your applicati
8、on requires a rich user interface (UI), only limited access to local resources, and must be portable to other platforms, design an RIA client.決議建立個(gè)富客戶端、基于網(wǎng)絡(luò)瘦客戶端或富Internet應(yīng)(RIA)。假設(shè)應(yīng)需本地處置,偶爾聯(lián)網(wǎng)必需任務(wù),那么就思索設(shè)計(jì)成個(gè)富客戶端。記住,個(gè)富客戶端應(yīng)耗費(fèi)更設(shè)備資源,按照維護(hù)任務(wù)比較責(zé)。假設(shè)應(yīng)可以依托效力器處置,并且直堅(jiān)持聯(lián)網(wǎng),那么就思索設(shè)計(jì)瘦客戶端。假設(shè)應(yīng)需豐富戶體驗(yàn),使本地資源受限,并且必需可以移植其,那么就
9、設(shè)計(jì)成RIA客戶端。 Determine the device types you will support. When choosing which device types to support, consider screen size, resolution (DPI), CPU performance characteristics, memory and storage space, and development tool environment availability. In addition, factor in user requirements and organiza
10、tional constraints.決議支持設(shè)備類型。選擇支持設(shè)備類型時(shí),思索屏幕、分辨率DPI、CPU特性、主存、擴(kuò)展存儲(chǔ)工具環(huán)境。另,還思索戶需求組織限制要素。 Design the application with occasionally connected limited-bandwidth scenarios in mind. Most mobile applications must work when a network connection is intermittent or not available. It is vital in this situation to
11、design your caching, state management, and data access mechanisms with intermittent network connectivity in mind. Batch communications for times of connectivity. Choose hardware and software protocols based on speed, power consumption, and “chattiness, and not just on ease of programming設(shè)計(jì)偶爾聯(lián)網(wǎng),并且?guī)捠?/p>
12、限應(yīng)。數(shù)挪動(dòng)應(yīng)必需間歇性地銜接網(wǎng)絡(luò)或網(wǎng)絡(luò)不都能任務(wù)。這種間歇性網(wǎng)絡(luò)銜接,設(shè)計(jì)存、形狀管理數(shù)據(jù)獲機(jī)制重。有網(wǎng)絡(luò)銜接,就進(jìn)展通訊批處置?;谒俣?、功耗“繁瑣程度選擇硬軟協(xié)議,而并不從編程難易程度做。 Design a UI appropriate for mobile devices, taking into account platform constraints. Mobile devices require a simpler architecture, simpler UI, and other specific design decisions in order to work with
13、in the constraints imposed by the device hardware. Keep these constraints in mind and design specifically for the device instead of trying to reuse the architecture or UI from a desktop or Web application. The main constraints are memory, battery life, ability to adapt to difference screen sizes and
14、 orientations, security, and network bandwidth.思索約束,設(shè)計(jì)適宜挪動(dòng)設(shè)備UI。挪動(dòng)設(shè)備需簡單架構(gòu)、簡約UI其特定設(shè)計(jì)滿足設(shè)備硬所帶資源受限。牢記這些限制設(shè)計(jì)適宜設(shè)備程序,而非嘗試著重桌面或網(wǎng)絡(luò)應(yīng)架構(gòu)。最主限制包括存容量、電池壽命、順應(yīng)不同屏幕分辨率才干、平安網(wǎng)絡(luò)帶寬。 Design a layered architecture appropriate for mobile devices that improves reuse and maintainability. Depending on the application type, mult
15、iple layers may be located on the device itself. Use the concept of layers to maximize separation of concerns, and to improve reuse and maintainability for your mobile application. However, aim to achieve the smallest footprint on the device by simplifying your design compared to a desktop or Web ap
16、plication.設(shè)計(jì)分層架構(gòu),順應(yīng)挪動(dòng)設(shè)備,提重性維護(hù)性?;趹?yīng)類型,不同層位于設(shè)備本身部。利層概念最化地分別思索要素,并且提挪動(dòng)應(yīng)重性維護(hù)性。但,桌面或網(wǎng)絡(luò)應(yīng)相比,經(jīng)過簡化設(shè)計(jì)實(shí)現(xiàn)這個(gè)最覆蓋區(qū)。 Design considering device resource constraints such as battery life, memory size, and processor speed. Every design decision should take into account the limited CPU, memory, storage capacity, and ba
17、ttery life of mobile devices. Battery life is usually the most limiting factor in mobile devices. Backlighting, reading and writing to memory, wireless connections, specialized hardware, and processor speed all have an impact on the overall power usage. When the amount of memory available is low, th
18、e Microsoft Windows Mobile operating system may ask your application to shut down or sacrifice cached data, slowing program execution. Optimize your application to minimize its power and memory footprint while considering performance during this process.思索設(shè)備資源受限要素,如電池壽命、存處置器速度等。每個(gè)設(shè)計(jì)應(yīng)該思索挪動(dòng)設(shè)備CPU受限、存/存
19、儲(chǔ)容量電池壽命。般說,電池壽命挪動(dòng)設(shè)備最受限要素。背景燈、讀存、無線銜接、特殊硬處置器速度,一切這些總體功耗產(chǎn)生重影響。存少,Microsoft Windows Mobile操作系統(tǒng)提示封鎖應(yīng)程序或喪失緩存數(shù)據(jù)、降程序執(zhí)行速度等等。思索性能表現(xiàn),優(yōu)化應(yīng)程序,功耗存使降最。Mobile Client FrameThere are several common issues that you must consider as your develop your design. These issues can be categorized into specific areas of the de
20、sign. The following table lists the common issues for each category where mistakes are most often made.挪動(dòng)客戶端框架應(yīng)程序時(shí)候,有些問題必需思索。這些問題以分成不同類型。面表格列出通常容易出問題。表1 挪動(dòng)客戶端框架類型主問題認(rèn)證授權(quán)l(xiāng)偶爾銜接網(wǎng)絡(luò),未使認(rèn)證。 l偶爾銜接網(wǎng)絡(luò),未使授權(quán)。lVPN網(wǎng)絡(luò),未使認(rèn)證授權(quán)。l使空接口同步時(shí),未使認(rèn)證。l主機(jī)同步時(shí),未使認(rèn)證。l有銜接,比如空接口、插座、藍(lán)牙SD卡,未使認(rèn)證。l不能區(qū)分不同設(shè)備間平安方式差別。緩存l資源受限設(shè)備緩存不用數(shù)據(jù)。 l間歇性網(wǎng)
21、絡(luò)銜接,依托能無法獲得緩存數(shù)據(jù)。l選擇不合理緩存地址數(shù)據(jù)格式l使未加密格式存放敏感數(shù)據(jù)l未使適宜緩存技術(shù)通訊l未能維護(hù)空接口敏感數(shù)據(jù)。 l未網(wǎng)絡(luò)效力通訊進(jìn)展加密。l未VPN通訊進(jìn)展加密。l帶寬受限網(wǎng)絡(luò)銜接,未通訊進(jìn)展加密。l未受限帶寬銜接進(jìn)展有效管理。l未個(gè)網(wǎng)絡(luò)效力進(jìn)展有效管理。l未思索間歇性網(wǎng)絡(luò)銜接任務(wù)。l未思索銜接本錢,并讓戶管理銜接。l使電池,未思索最化功耗。l未使適宜通訊協(xié)議。配置管理l設(shè)備重啟,未恢復(fù)配置形狀。 l未思索經(jīng)過空接口進(jìn)展配置管理同步。l未思索經(jīng)過主機(jī)進(jìn)展配置管理同步。l采不適宜數(shù)據(jù)格式存儲(chǔ)配置信息。l未維護(hù)敏感配置信息。l未思索不同設(shè)備制造商于重載配置參數(shù)差別。數(shù)據(jù)獲l
22、未思索間歇性網(wǎng)絡(luò)銜接數(shù)據(jù)獲機(jī)制。 l未思索數(shù)據(jù)庫接入性能。ldataset進(jìn)展查詢。l未思索適宜復(fù)制技術(shù)。l未思索使設(shè)備數(shù)據(jù)庫效力,如Microsoft SQL Server Compact Edition。調(diào)試l選擇支持種設(shè)備時(shí)候,未思索調(diào)試本錢。 l設(shè)計(jì)時(shí),未思索調(diào)試,例如,使模擬器而不真實(shí)設(shè)備。l未思索一切銜接調(diào)試。設(shè)備l未思索設(shè)備差別性,如屏幕CPU才干。 l給戶展現(xiàn)不友好出信息。l未維護(hù)敏感信息。l未思索設(shè)備處置才干。異常管理l拋出異常以,未恢復(fù)應(yīng)程序形狀。 l暴露敏感信息給戶。l未記錄詳盡異常信息。l使異常控制應(yīng)流程。日志l未思索遠(yuǎn)端日志記錄,而只思索設(shè)備。 l未思索獲設(shè)備日志。l
23、未思索記錄日志時(shí),資源受限。l未維護(hù)日志文敏感信息。移植l未重現(xiàn)存富客戶端UI適宜設(shè)備。 l未探求移植工具。同步l通訊過程,未同步進(jìn)展平安維護(hù)。 l未管理空接口同步,而不插座同步。l未管理同步斷。l未處置同步?jīng)_突。l未思索適宜合并復(fù)制。戶界面l未思索受限UI要素。 l未思索單窗口環(huán)境。l未思索單戶程序運(yùn)轉(zhuǎn)。l未設(shè)計(jì)觸摸屏或觸筆UI。l未包含不同屏幕方向支持。l未管理設(shè)備重啟恢復(fù)。l桌面應(yīng)相比,未思索受限APIUI控。驗(yàn)證l主機(jī)通訊過程,未輸入數(shù)據(jù)進(jìn)展驗(yàn)證。 l空接口通訊過程,未輸入數(shù)據(jù)進(jìn)展驗(yàn)證。l未維護(hù)硬資源,例如攝像頭始化。l設(shè)計(jì)時(shí),未思索受限資源性能。本文翻譯“Authentication
24、 and Authorization、“Caching、“Communication“Configuration Management部分。Authentication and AuthorizationDesigning an effective authentication and authorization strategy is important for the security and reliability of your application. Weak authentication can leave your application vulnerable to unaut
25、horized use. Mobile devices are usually designed to be single-user devices and normally lack basic user profile and security tracking beyond just a simple password. Other common desktop mechanisms are also likely to be missing. The discoverability of mobile devices over protocols such as Bluetooth c
26、an present users with unexpected scenarios. Mobile applications can also be especially challenging due to connectivity interruptions. Consider all possible connectivity scenarios, whether over-the-air or hard-wired.認(rèn)證授權(quán)于應(yīng)程序平安性靠性說,設(shè)計(jì)個(gè)有效認(rèn)證授權(quán)戰(zhàn)略非常重。相說較弱認(rèn)證以讓您應(yīng)程序容易受未經(jīng)授權(quán)使。挪動(dòng)設(shè)備般設(shè)計(jì)單個(gè)戶使,除個(gè)簡單密碼以,經(jīng)常短少根本戶配置文平安追蹤
27、戰(zhàn)略。同時(shí),挪動(dòng)設(shè)備,其通桌面平安機(jī)制容易被忽略。經(jīng)過諸如藍(lán)牙等協(xié)議,挪動(dòng)設(shè)備容易被,這就給戶帶預(yù)料不。銜接斷能性給挪動(dòng)應(yīng)帶極挑戰(zhàn)。無論經(jīng)過無線或有線,們必需思索一切能銜接場(chǎng)景。Consider the following guidelines when designing authentication and authorization: Design authentication for over-the-air, cradled synchronization, Bluetooth discovery, and local SD card scenarios. Consider that
28、 different devices might have variations in their programming security models, which can affect authorization to access resources Do not assume that security mechanisms available on larger platforms will be available on a mobile platform, even if you are using the same tools. For example, access con
29、trol lists(ACLs) are not available in Windows Mobile, and consequently there is no operating systemlevel file security. Ensure that you require authentication for access by Bluetooth devices. Identify trust boundaries within your mobile application layers; for instance, between the client and the se
30、rver or the server and the database. This will help you to determine where and how to authenticate.設(shè)計(jì)認(rèn)證授權(quán)時(shí),思索以幾點(diǎn)指方針:無線銜接、插座同步、藍(lán)牙本機(jī)SD卡設(shè)計(jì)認(rèn)證。編程平安方式,不同設(shè)備能有所差別,這就影響資源獲認(rèn)證。即使使一樣工具,不認(rèn)平安機(jī)制就以挪動(dòng)。例如,Windows Mobile,訪問控制表不,因此就沒有操作系統(tǒng)級(jí)文平安機(jī)制。經(jīng)過藍(lán)牙接入設(shè)備時(shí),確保使認(rèn)證機(jī)制。明確您挪動(dòng)應(yīng)層信任界限。例如,客戶端效力器間,還效力器數(shù)據(jù)庫間。這有助于確定何處以何種方式進(jìn)展認(rèn)證。Caching
31、Use caching to improve the performance and responsiveness of your application, and to support operation when there is no network connection. Use caching to optimize reference data lookups, to avoid network round trips, and to avoid unnecessarily duplicated processing. When deciding what data to cach
32、e, consider the limited resources of the device; you will have less storage space available than on a PC.緩存利緩存提應(yīng)程序性能呼應(yīng),并且沒有網(wǎng)絡(luò)銜接,支持程序操作。使緩存優(yōu)化參考數(shù)據(jù)查詢,防止網(wǎng)絡(luò)往返時(shí)延影響,減少不用反復(fù)操作。決議緩存哪些數(shù)據(jù)時(shí),必需思索設(shè)備有限資源;PC機(jī)相比,挪動(dòng)設(shè)備具有更少存儲(chǔ)空間。Consider the following guidelines when designing caching: Identify your performance objective
33、s. For example, determine your minimum response time and battery life. Test the performance of the specific devices you will be using. Most mobile devices use only flash memory, which is likely to be slower than the memory used in desktop machines. Cache static data that is useful, and avoid caching
34、 volatile data. Consider caching the data that the application is most likely to need in an occasionally connected scenario. Choose the appropriate cache location, such as on the device, at the mobile gateway, or in the database server. Design for minimum memory footprint. Cache only data that is ab
35、solutely necessary for the application to function, or expensive to transform into a ready-to-use format. If designing a memory-intensive application, detect low-memory scenarios and design a mechanism for prioritizing the data to discard as available memory decreases.設(shè)計(jì)緩存時(shí),思索以指方針:明確性能目的。例如,制定最呼應(yīng)時(shí)間電
36、池壽命,使特定設(shè)備進(jìn)展測(cè)試。數(shù)挪動(dòng)設(shè)備只使閃存,桌面機(jī)器相比,讀速度更慢。緩存有靜態(tài)數(shù)據(jù),而非易失性數(shù)據(jù)。間歇性網(wǎng)絡(luò)銜接場(chǎng)景,思索緩存那些應(yīng)程序需數(shù)據(jù)。選擇適宜緩存地點(diǎn),例如設(shè)備、挪動(dòng)網(wǎng)關(guān)或數(shù)據(jù)庫效力器。設(shè)計(jì)所需存最程序。緩存那些實(shí)現(xiàn)程序功能所必需數(shù)據(jù),或轉(zhuǎn)變成格式數(shù)據(jù)。假設(shè)設(shè)計(jì)個(gè)存密集型程序,就需檢測(cè)存,并設(shè)計(jì)個(gè)機(jī)制,存減,決議數(shù)據(jù)丟棄優(yōu)先級(jí)。CommunicationDevice communication includes wireless communication (over the air) and wired communication with a host PC, as we
37、ll as more specialized communication such as Bluetooth or Infrared Data Association (IrDA). When communicating over the air, consider data security to protect sensitive data from theft or tampering. If you are communicating through Web service interfaces, use mechanisms such as the WS-Secure standar
38、ds to secure the data. Keep in mind that wireless device communication is more likely to be interrupted than communication from a PC, and that your application might be required to operate for long periods in a disconnected state.通訊設(shè)備通訊包括無線通訊,主機(jī)有線通訊,更加特殊諸如藍(lán)牙或紅線通訊。使無線通訊,必需思索數(shù)據(jù)平安性,防止敏感數(shù)據(jù)被盜或被篡改。假設(shè)經(jīng)過網(wǎng)絡(luò)接
39、口進(jìn)展通訊,那么就使諸如WS平安規(guī)范機(jī)制維護(hù)數(shù)據(jù)。牢記設(shè)備無線通訊PC機(jī)相比,被斷能性更。那樣,應(yīng)程序必需長時(shí)間沒有網(wǎng)絡(luò)銜接常任務(wù)Consider the following guidelines when designing your communication strategy: Design asynchronous, threaded communication to improve usability in occasionally connected scenarios. If you are designing an application that will run on a
40、mobile phone, consider the effects of receiving a phone call during communication or program execution. Design the application to allow it to suspend and resume, or even exit the application. Protect communication over untrusted connections, such as Web services and other over-the- air methods. If y
41、ou must access data from multiple sources, interoperate with other applications, or work while disconnected, consider using Web services for communication. If you are using WCF for communication and need to implement message queuing, consider using WCF store and forward.設(shè)計(jì)通訊戰(zhàn)略時(shí),思索以指方針:設(shè)計(jì)異步線程通訊提間歇性網(wǎng)絡(luò)
42、銜接場(chǎng)景性。假設(shè)設(shè)計(jì)個(gè)運(yùn)轉(zhuǎn)于挪動(dòng)應(yīng)程序,思索通訊或程序執(zhí)行期間接影響。應(yīng)程序設(shè)計(jì)暫停,繼續(xù),或退出。防止設(shè)備不靠銜接進(jìn)展通訊,例如網(wǎng)絡(luò)效力其無線方式效力。假設(shè)必需從個(gè)源獲數(shù)據(jù),其應(yīng)程序協(xié)作,或未聯(lián)網(wǎng)任務(wù),那么就思索使網(wǎng)絡(luò)效力進(jìn)展通訊。假設(shè)使WCF進(jìn)展通訊,同時(shí)需實(shí)現(xiàn)音訊隊(duì)列,那么就思索使WCF存儲(chǔ)轉(zhuǎn)發(fā)Configuration ManagementWhen designing device configuration management, consider how to handle device resets, as well as whether you want to allow co
43、nfiguration of your application over the air or from a host PC.Consider the following guidelines when designing your configuration-management strategy:配置管理設(shè)計(jì)設(shè)備配置管理時(shí),思索處置設(shè)備復(fù)位,否經(jīng)過無線方式或主機(jī)方式配置應(yīng)程序。設(shè)計(jì)配置管理戰(zhàn)略時(shí),思索以指方針: Design for the restoration of configuration after a device reset. If you have you enterpri
44、se data in Microsoft SQL Server 2005 or 2021 and desire an accelerated time to market, consider using merge replication with a “buy and configure application from a third party. Merge replication can synchronize data in a single operation regardless of network bandwidth or data size. Due to memory l
45、imitations, choose binary format over Extensible Markup Language (XML) for configuration files Protect sensitive data in device configuration files. Consider using compression library routines to reduce the memory requirements for configuration and state information. If you have a Microsoft Active D
46、irectory directory service infrastructure, consider using the System Center Mobile Device Manager interface to manage group configuration, authentication, and authorization of devices. See the Technology Considerations section for requirements for the Mobile Device Manager.思索設(shè)備復(fù)位配置參數(shù)恢復(fù)。假設(shè)Microsoft S
47、QL Server 2005 或2021擁有企業(yè)級(jí)數(shù)據(jù),同時(shí)期望縮短市時(shí)間,那么就思索使第三方“buy and configure應(yīng)進(jìn)展合并復(fù)制。合并復(fù)制以經(jīng)過單步操作同步數(shù)據(jù),而不論網(wǎng)絡(luò)帶寬或數(shù)據(jù)。從配置文存儲(chǔ)所需看,選擇二進(jìn)制格式,而非XML格式。維護(hù)設(shè)備配置文敏感數(shù)據(jù)。思索使緊縮文減配置形狀信息存儲(chǔ)空間需求。假設(shè)擁有Microsoft Active Directory效力根底設(shè)備,那么就思索使System Center Mobile Device Manager接口管理設(shè)備群組配置、認(rèn)證授權(quán)信息。參考Technology Considerations節(jié)關(guān)于Mobile Device Ma
48、nager需求部分。本文翻譯Data Access、 Debugging、 Device、 Exception Management Logging部分。Data AccessData access on a mobile device is constrained by unreliable network connections and the hardware constraints of the device itself. When designing data access, consider how low bandwidth, high latency, and intermi
49、ttent connectivity will impact your design.數(shù)據(jù)存挪動(dòng)設(shè)備數(shù)據(jù)存受不靠網(wǎng)絡(luò)銜接設(shè)備本身硬限制。因此,設(shè)計(jì)數(shù)據(jù)存戰(zhàn)略時(shí)候,思索帶寬、延時(shí)間歇性網(wǎng)絡(luò)銜接影響。Consider the following guidelines when designing data access: Program for data integrity. Files left open during device suspend and power failures may cause data-integrity issues, especially when data i
50、s stored on a removable storage device. Include exception handling and retry logic to ensure that file operations succeed. Do not assume that removable storage will always be available, as a user can remove it at any time. Check for the existence of a removable storage device before writing or using
51、 FlushFileBuffers. If you need to ensure data integrity in case the device loses power or has connectivity disruptions, considering using transactions with SQL Server Mobile. If your application must access a disconnected database, consider using the device database services (such as SQL Server Comp
52、act Edition). If you use XML to store or transfer data, consider its overall size and impact on performance. XML increases both bandwidth and local storage requirements. Use compression algorithms or a non-XML transfer method. Consider the use of custom objects instead of DataSets to reduce memory o
53、verhead and improve performance. If your application needs to sync with multiple database types, use Sync Services for ADO.NET. It allows you to store data in Microsoft SQL Server, Oracle, or DB2.設(shè)計(jì)數(shù)據(jù)存戰(zhàn)略時(shí),思索以指方針:數(shù)據(jù)完好性設(shè)計(jì)。設(shè)備暫停或斷電時(shí),仍文處于翻開形狀,那樣能引起數(shù)據(jù)完好性問題,特別當(dāng)數(shù)據(jù)存儲(chǔ)挪動(dòng)存儲(chǔ)設(shè)備時(shí)。確保文勝利操作,參與異常重試邏輯處置。由于戶能隨時(shí)插拔挪動(dòng)存儲(chǔ),因此
54、不認(rèn)永遠(yuǎn)。操作或使FlushFileBuffer,檢查挪動(dòng)存儲(chǔ)否存。設(shè)備掉電或銜接喪失,確保數(shù)據(jù)完好性,那么以思索使SQL Server Mobile事務(wù)。假設(shè)應(yīng)程序必需使非線數(shù)據(jù)庫,那么思索使設(shè)備數(shù)據(jù)庫效力例如SQL Server Compact Edition。假設(shè)使XML存儲(chǔ)或傳送數(shù)據(jù),那么思索總體性能影響。因XML同時(shí)增帶寬本地存儲(chǔ)需求。處理思索使緊縮算法或使非XML傳送。思索使自定義象替代DataSets,這樣以減存開銷,提系統(tǒng)性能。假設(shè)需種數(shù)據(jù)庫同步,那么就使ADO.NETSync效力。應(yīng)程序數(shù)據(jù)存儲(chǔ)于Microsoft SQL Server、Oracle或DB2數(shù)據(jù)庫。Debug
55、gingMobile application debugging can be much more expensive than debugging a similar application on a PC. Consider this debugging cost when deciding which devices, and how many devices, your application will support. Also keep in mind that it can be harder to get debug information from the device, a
56、nd that device emulators do not always perfectly simulate the device hardware environment.調(diào)試類似PC應(yīng)程序調(diào)試相比,挪動(dòng)設(shè)備調(diào)試能更加昂貴。決議應(yīng)程序支持設(shè)備種類數(shù)量時(shí)候,思索這個(gè)調(diào)試本錢。同時(shí),從設(shè)備獲得調(diào)試信息難,而且設(shè)備模擬器不能完全模擬設(shè)備硬環(huán)境,這點(diǎn)必需牢記。Consider the following guidelines when designing your debugging strategy: Understand your debugging costs when choosing
57、 which devices to support. Factor in tools support, the cost of initial (and perhaps replacement) test devices, and the cost of software based device emulators. If you have the device you are targeting, debug your code on the actual device rather than on an emulator. If the device is not available,
58、use an emulator for initial testing and debugging. Consider that an emulator might run code slower than the actual device. As soon as you obtain the device, switch to running code on the device connected to a normal PC. Perform final testing on your device when not connected to a PC. Add in temporar
59、y or permanent mechanisms to debug problems in this scenario. Consider the needs of people who will support the device. Test scenarios where your device is fully disconnected from any network or connection, including a PC debugging session. If you are an OEM or ODM and your device has not yet been c
60、reated, note that it is possible to debug a mobile program on a dedicated x86-based Microsoft Windows CE PC. Consider this option until your device is available.設(shè)計(jì)調(diào)試戰(zhàn)略時(shí),思索以指方針:選擇支持設(shè)備時(shí),解程序調(diào)試本錢。包括工具支持、始替代測(cè)試設(shè)備破費(fèi)基于軟模擬器破費(fèi)等要素。假設(shè)手頭有目的設(shè)備,那么盡量真實(shí)設(shè)備調(diào)試代碼,而非模擬器調(diào)試。假設(shè)手頭沒有目的設(shè)備,那么就使模擬器進(jìn)展始調(diào)試測(cè)試。真實(shí)設(shè)備相比,模擬器運(yùn)轉(zhuǎn)速度能慢些。旦得真實(shí)設(shè)
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 三方參與股權(quán)轉(zhuǎn)讓合同示范文本版
- 初中英語七年級(jí)知識(shí)點(diǎn)總結(jié)
- 2024西安存量房買賣資金監(jiān)管服務(wù)協(xié)議
- 2025年度智能制造勞動(dòng)合同法實(shí)施細(xì)則3篇
- 2024期限內(nèi)渣土外運(yùn)進(jìn)度保障合同
- 2025年度創(chuàng)意辦公空間轉(zhuǎn)租及配套服務(wù)合同3篇
- 2024年租賃場(chǎng)所安全協(xié)議書2篇
- 2024年蘋果手機(jī)維修服務(wù)合同范本3篇
- 2024藥品采購合同范本:慢性病藥品采購合作協(xié)議3篇
- 專業(yè)化運(yùn)輸作業(yè)承包協(xié)議模板
- 硅石項(xiàng)目建議書范本
- 起重機(jī)械安全生產(chǎn)隱患課件
- 概率論在金融風(fēng)險(xiǎn)評(píng)估中的應(yīng)用研究
- 外墻外保溫工程檢驗(yàn)批質(zhì)量驗(yàn)收記錄表
- 信訪十種情形追責(zé)問責(zé)制度
- 大型儲(chǔ)罐施工工法倒裝法安裝
- 手機(jī)歸屬地表格
- 一年級(jí)上冊(cè)數(shù)學(xué)思維教材
- GB/T 24479-2023火災(zāi)情況下的電梯特性
- 鼻空腸管的護(hù)理
- 中國重汽集團(tuán)服務(wù)手冊(cè)
評(píng)論
0/150
提交評(píng)論