飞信symbian客户端接口规范_第1页
飞信symbian客户端接口规范_第2页
飞信symbian客户端接口规范_第3页
飞信symbian客户端接口规范_第4页
飞信symbian客户端接口规范_第5页
已阅读5页,还剩25页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

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.目的定义个挪动应。了解建立个挪动应素。学习挪动应重户场景。学习挪动应设计思索要素。鉴别特定挪动应场景,如部署,电量同步等。学习挪动应关键模型技术要素。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.概述通常,挪动应由个层应构造,包括户体验、业务数据等。挪动应时,以选择做个基于网络瘦客户端或个富客户端。假设选择富客户端,那么业务数据效力层般位于设备本身。假设选择瘦客户端,那么业务数据层那么位于

5、效力器端。图1,根据组成素关系,描画个富客户端挪动应架构。图1:常富客户端应架构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:设计思索当设计个挪动应时,面设计方针提供应该思索不同方面信息。遵照这些指可以确保应可以满足需求,同时,于般挪动应可以有效。 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.决议建立个富客户端、基于网络瘦客户端或富Internet应(RIA)。假设应需本地处置,偶尔联网必需任务,那么就思索设计成个富客户端。记住,个富客户端应耗费更设备资源,按照维护任务比较责。假设应可以依托效力器处置,并且直坚持联网,那么就思索设计瘦客户端。假设应需丰富户体验,使本地资源受限,并且必需可以移植其,那么就

9、设计成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.决议支持设备类型。选择支持设备类型时,思索屏幕、分辨率DPI、CPU特性、主存、扩展存储工具环境。另,还思索户需求组织限制要素。 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设计偶尔联网,并且带宽受

12、限应。数挪动应必需间歇性地衔接网络或网络不都能任务。这种间歇性网络衔接,设计存、形状管理数据获机制重。有网络衔接,就进展通讯批处置。基于速度、功耗“繁琐程度选择硬软协议,而并不从编程难易程度做。 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.思索约束,设计适宜挪动设备UI。挪动设备需简单架构、简约UI其特定设计满足设备硬所带资源受限。牢记这些限制设计适宜设备程序,而非尝试着重桌面或网络应架构。最主限制包括存容量、电池寿命、顺应不同屏幕分辨率才干、平安网络带宽。 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.设计分层架构,顺应挪动设备,提重性维护性。基于应类型,不同层位于设备本身部。利层概念最化地分别思索要素,并且提挪动应重性维护性。但,桌面或网络应相比,经过简化设计实现这个最覆盖区。 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.思索设备资源受限要素,如电池寿命、存处置器速度等。每个设计应该思索挪动设备CPU受限、存/存

19、储容量电池寿命。般说,电池寿命挪动设备最受限要素。背景灯、读存、无线衔接、特殊硬处置器速度,一切这些总体功耗产生重影响。存少,Microsoft Windows Mobile操作系统提示封锁应程序或丧失缓存数据、降程序执行速度等等。思索性能表现,优化应程序,功耗存使降最。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.挪动客户端框架应程序时候,有些问题必需思索。这些问题以分成不同类型。面表格列出通常容易出问题。表1 挪动客户端框架类型主问题认证授权l偶尔衔接网络,未使认证。 l偶尔衔接网络,未使授权。lVPN网络,未使认证授权。l使空接口同步时,未使认证。l主机同步时,未使认证。l有衔接,比如空接口、插座、蓝牙SD卡,未使认证。l不能区分不同设备间平安方式差别。缓存l资源受限设备缓存不用数据。 l间歇性网

21、络衔接,依托能无法获得缓存数据。l选择不合理缓存地址数据格式l使未加密格式存放敏感数据l未使适宜缓存技术通讯l未能维护空接口敏感数据。 l未网络效力通讯进展加密。l未VPN通讯进展加密。l带宽受限网络衔接,未通讯进展加密。l未受限带宽衔接进展有效管理。l未个网络效力进展有效管理。l未思索间歇性网络衔接任务。l未思索衔接本钱,并让户管理衔接。l使电池,未思索最化功耗。l未使适宜通讯协议。配置管理l设备重启,未恢复配置形状。 l未思索经过空接口进展配置管理同步。l未思索经过主机进展配置管理同步。l采不适宜数据格式存储配置信息。l未维护敏感配置信息。l未思索不同设备制造商于重载配置参数差别。数据获l

22、未思索间歇性网络衔接数据获机制。 l未思索数据库接入性能。ldataset进展查询。l未思索适宜复制技术。l未思索使设备数据库效力,如Microsoft SQL Server Compact Edition。调试l选择支持种设备时候,未思索调试本钱。 l设计时,未思索调试,例如,使模拟器而不真实设备。l未思索一切衔接调试。设备l未思索设备差别性,如屏幕CPU才干。 l给户展现不友好出信息。l未维护敏感信息。l未思索设备处置才干。异常管理l抛出异常以,未恢复应程序形状。 l暴露敏感信息给户。l未记录详尽异常信息。l使异常控制应流程。日志l未思索远端日志记录,而只思索设备。 l未思索获设备日志。l

23、未思索记录日志时,资源受限。l未维护日志文敏感信息。移植l未重现存富客户端UI适宜设备。 l未探求移植工具。同步l通讯过程,未同步进展平安维护。 l未管理空接口同步,而不插座同步。l未管理同步断。l未处置同步冲突。l未思索适宜合并复制。户界面l未思索受限UI要素。 l未思索单窗口环境。l未思索单户程序运转。l未设计触摸屏或触笔UI。l未包含不同屏幕方向支持。l未管理设备重启恢复。l桌面应相比,未思索受限APIUI控。验证l主机通讯过程,未输入数据进展验证。 l空接口通讯过程,未输入数据进展验证。l未维护硬资源,例如摄像头始化。l设计时,未思索受限资源性能。本文翻译“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.认证授权于应程序平安性靠性说,设计个有效认证授权战略非常重。相说较弱认证以让您应程序容易受未经授权使。挪动设备般设计单个户使,除个简单密码以,经常短少根本户配置文平安追踪

27、战略。同时,挪动设备,其通桌面平安机制容易被忽略。经过诸如蓝牙等协议,挪动设备容易被,这就给户带预料不。衔接断能性给挪动应带极挑战。无论经过无线或有线,们必需思索一切能衔接场景。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.设计认证授权时,思索以几点指方针:无线衔接、插座同步、蓝牙本机SD卡设计认证。编程平安方式,不同设备能有所差别,这就影响资源获认证。即使使一样工具,不认平安机制就以挪动。例如,Windows Mobile,访问控制表不,因此就没有操作系统级文平安机制。经过蓝牙接入设备时,确保使认证机制。明确您挪动应层信任界限。例如,客户端效力器间,还效力器数据库间。这有助于确定何处以何种方式进展认证。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.缓存利缓存提应程序性能呼应,并且没有网络衔接,支持程序操作。使缓存优化参考数据查询,防止网络往返时延影响,减少不用反复操作。决议缓存哪些数据时,必需思索设备有限资源;PC机相比,挪动设备具有更少存储空间。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.设计缓存时,思索以指方针:明确性能目的。例如,制定最呼应时间电

36、池寿命,使特定设备进展测试。数挪动设备只使闪存,桌面机器相比,读速度更慢。缓存有静态数据,而非易失性数据。间歇性网络衔接场景,思索缓存那些应程序需数据。选择适宜缓存地点,例如设备、挪动网关或数据库效力器。设计所需存最程序。缓存那些实现程序功能所必需数据,或转变成格式数据。假设设计个存密集型程序,就需检测存,并设计个机制,存减,决议数据丢弃优先级。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.通讯设备通讯包括无线通讯,主机有线通讯,更加特殊诸如蓝牙或红线通讯。使无线通讯,必需思索数据平安性,防止敏感数据被盗或被篡改。假设经过网络接

39、口进展通讯,那么就使诸如WS平安规范机制维护数据。牢记设备无线通讯PC机相比,被断能性更。那样,应程序必需长时间没有网络衔接常任务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.设计通讯战略时,思索以指方针:设计异步线程通讯提间歇性网络

42、衔接场景性。假设设计个运转于挪动应程序,思索通讯或程序执行期间接影响。应程序设计暂停,继续,或退出。防止设备不靠衔接进展通讯,例如网络效力其无线方式效力。假设必需从个源获数据,其应程序协作,或未联网任务,那么就思索使网络效力进展通讯。假设使WCF进展通讯,同时需实现音讯队列,那么就思索使WCF存储转发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:配置管理设计设备配置管理时,思索处置设备复位,否经过无线方式或主机方式配置应程序。设计配置管理战略时,思索以指方针: 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.思索设备复位配置参数恢复。假设Microsoft S

47、QL Server 2005 或2021拥有企业级数据,同时期望缩短市时间,那么就思索使第三方“buy and configure应进展合并复制。合并复制以经过单步操作同步数据,而不论网络带宽或数据。从配置文存储所需看,选择二进制格式,而非XML格式。维护设备配置文敏感数据。思索使紧缩文减配置形状信息存储空间需求。假设拥有Microsoft Active Directory效力根底设备,那么就思索使System Center Mobile Device Manager接口管理设备群组配置、认证授权信息。参考Technology Considerations节关于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.数据存挪动设备数据存受不靠网络衔接设备本身硬限制。因此,设计数据存战略时候,思索带宽、延时间歇性网络衔接影响。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.设计数据存战略时,思索以指方针:数据完好性设计。设备暂停或断电时,仍文处于翻开形状,那样能引起数据完好性问题,特别当数据存储挪动存储设备时。确保文胜利操作,参与异常重试逻辑处置。由于户能随时插拔挪动存储,因此

54、不认永远。操作或使FlushFileBuffer,检查挪动存储否存。设备掉电或衔接丧失,确保数据完好性,那么以思索使SQL Server Mobile事务。假设应程序必需使非线数据库,那么思索使设备数据库效力例如SQL Server Compact Edition。假设使XML存储或传送数据,那么思索总体性能影响。因XML同时增带宽本地存储需求。处理思索使紧缩算法或使非XML传送。思索使自定义象替代DataSets,这样以减存开销,提系统性能。假设需种数据库同步,那么就使ADO.NETSync效力。应程序数据存储于Microsoft SQL Server、Oracle或DB2数据库。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.调试类似PC应程序调试相比,挪动设备调试能更加昂贵。决议应程序支持设备种类数量时候,思索这个调试本钱。同时,从设备获得调试信息难,而且设备模拟器不能完全模拟设备硬环境,这点必需牢记。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.设计调试战略时,思索以指方针:选择支持设备时,解程序调试本钱。包括工具支持、始替代测试设备破费基于软模拟器破费等要素。假设手头有目的设备,那么尽量真实设备调试代码,而非模拟器调试。假设手头没有目的设备,那么就使模拟器进展始调试测试。真实设备相比,模拟器运转速度能慢些。旦得真实设

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论