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

下载本文档

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

文档简介

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 applications, 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 application 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 are 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.概述通常,移动应由个层应结构,包括户体验、业务数据等。移动应时,以选择做个基于网络瘦客户端或个富客户端。如果选择富客户端,那么业务数据服务层般位于设备本身。如果选择瘦客户端,那么业务数据层则位于服务器端。图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 in 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, consider 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 application 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)。如果应需本地处理,偶尔联网必须工作,那么就考虑设计成个富客户端。记住,个富客户端应消耗更设备资源,按照维护工作比较责。如果应能够依靠服务器处理,并且直保持联网,那么就考虑设计瘦客户端。如果应需丰富户体验,使本地资源受限,并且必须能够移植其,那么就设计成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 organizational 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 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设计偶尔联网,并且带宽受限应。数移动应必须间歇性地连接网络或网络不都能工作。这种间歇性网络连接,设计存、状态管理数据获机制重。有网络连接,就进行通信批处理。基于速度、功耗“繁琐”程度选择硬软协议,而并不从编程难易程度做。 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 within 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 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, multiple 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 application.设计分层架构,适应移动设备,提重性维护性。基于应类型,不同层位于设备本身部。利层概念最化地分离考虑因素,并且提移动应重性维护性。但,桌面或网络应相比,通过简化设计实现这个最覆盖区。 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 battery 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, the 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受限、存/存储容量电池寿命。般说,电池寿命移动设备最受限因素。背景灯、读存、无线连接、特殊硬处理器速度,所有这些总体功耗产生重影响。存少,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 design. 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间歇性网络连接,依靠能无法获得缓存数据。l选择不合理缓存地址数据格式l使未加密格式存放敏感数据l未使合适缓存技术通信l未能保护空接口敏感数据。 l未网络服务通信进行加密。l未VPN通信进行加密。l带宽受限网络连接,未通信进行加密。l未受限带宽连接进行有效管理。l未个网络服务进行有效管理。l未考虑间歇性网络连接工作。l未考虑连接成本,并让户管理连接。l使电池,未考虑最化功耗。l未使合适通信协议。配置管理l设备重启,未恢复配置状态。 l未考虑通过空接口进行配置管理同步。l未考虑通过主机进行配置管理同步。l采不合适数据格式存储配置信息。l未保护敏感配置信息。l未考虑不同设备制造商于重载配置参数差异。数据获l未考虑间歇性网络连接数据获机制。 l未考虑数据库接入性能。ldataset进行查询。l未考虑合适复制技术。l未考虑使设备数据库服务,如Microsoft SQL Server Compact Edition。调试l选择支持种设备时候,未考虑调试成本。 l设计时,未考虑调试,例如,使模拟器而不真实设备。l未考虑所有连接调试。设备l未考虑设备差异性,如屏幕CPU能力。 l给户展示不友好出信息。l未保护敏感信息。l未考虑设备处理能力。异常管理l抛出异常以,未恢复应程序状态。 l暴露敏感信息给户。l未记录详尽异常信息。l使异常控制应流程。日志l未考虑远端日志记录,而只考虑设备。 l未考虑获设备日志。l未考虑记录日志时,资源受限。l未保护日志文敏感信息。移植l未重现存富客户端UI适合设备。 l未探究移植工具。同步l通信过程,未同步进行安全保护。 l未管理空接口同步,而不插座同步。l未管理同步断。l未处理同步冲突。l未考虑合适合并复制。户界面l未考虑受限UI因素。 l未考虑单窗口环境。l未考虑单户程序运行。l未设计触摸屏或触笔UI。l未包含不同屏幕方向支持。l未管理设备重启恢复。l桌面应相比,未考虑受限APIUI控。验证l主机通信过程,未输入数据进行验证。 l空接口通信过程,未输入数据进行验证。l未保护硬资源,例如摄像头电话始化。l设计时,未考虑受限资源性能。本文翻译“Authentication 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 unauthorized 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 can 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.认证授权于应程序安全性靠性说,设计个有效认证授权策略非常重。相说较弱认证以让您应程序容易受未经授权使。移动设备般设计单个户使,除个简单密码以,经常缺少基本户配置文安全追踪策略。同时,移动设备,其通桌面安全机制容易被忽略。通过诸如蓝牙等协议,移动设备容易被,这就给户带意料不。连接断能性给移动应带极挑战。无论通过无线或有线,们必须考虑所有能连接场景。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 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 control 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 server or the server and the database. This will help you to determine where and how to authenticate.设计认证授权时,考虑以几点指方针:无线连接、插座同步、蓝牙本机SD卡设计认证。编程安全模式,不同设备能有所差异,这就影响资源获认证。即使使相同工具,不认安全机制就以移动。例如,Windows Mobile,访问控制表不,因此就没有操作系统级文安全机制。通过蓝牙接入设备时,确保使认证机制。明确您移动应层信任界限。例如,客户端服务器间,还服务器数据库间。这有助于确定何处以何种方式进行认证。CachingUse 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 cache, 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 objectives. 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 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 absolutely 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.设计缓存时,考虑以指方针:明确性能目标。例如,制定最响应时间电池寿命,使特定设备进行测试。数移动设备只使闪存,桌面机器相比,读速度更慢。缓存有静态数据,而非易失性数据。间歇性网络连接场景,考虑缓存那些应程序需数据。选择合适缓存地点,例如设备、移动网关或数据库服务器。设计所需存最程序。缓存那些实现程序功能所必须数据,或转变成格式数据。如果设计个存密集型程序,就需检测存,并设计个机制,存减,决定数据丢弃优先级。CommunicationDevice communication includes wireless communication (over the air) and wired communication with a host PC, as well 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 standards 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.通信设备通信包括无线通信,主机有线通信,更加特殊诸如蓝牙或红线通信。使无线通信,必须考虑数据安全性,防止敏感数据被盗或被篡改。如果通过网络接口进行通信,那么就使诸如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 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 you 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.设计通信策略时,考虑以指方针:设计异步线程通信提间歇性网络连接场景性。如果设计个运行于移动电话应程序,考虑通信或程序执行期间接电话影响。应程序设计暂停,继续,或退出。防止设备不靠连接进行通信,例如网络服务其无线方式服务。如果必须从个源获数据,其应程序协作,或未联网工作,那么就考虑使网络服务进行通信。如果使WCF进行通信,同时需实现消息队列,那么就考虑使WCF存储转发Configuration ManagementWhen designing device configuration management, consider how to handle device resets, as well as whether you want to allow configuration 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 enterprise data in Microsoft SQL Server 2005 or 2008 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 limitations, 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 Directory 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 SQL Server 2005 或2008拥有企业级数据,同时期望缩短市时间,那么就考虑使第三方“buy and configure”应进行合并复制。合并复制以通过单步操作同步数据,而不管网络带宽或数据。从配置文存储所需看,选择二进制格式,而非XML格式。保护设备配置文敏感数据。考虑使压缩文减配置状态信息存储空间需求。如果拥有Microsoft Active Directory服务基础设施,那么就考虑使System Center Mobile Device Manager接口管理设备群组配置、认证授权信息。参考Technology Considerations节关于Mobile Device Manager需求部分。本文翻译”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 intermittent 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 is 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 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 Compact 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 overhead 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.设计数据存策略时,考虑以指方针:数据完整性设计。设备暂停或断电时,仍文处于打开状态,那样能引起数据完整性问题,特别当数据存储移动存储设备时。确保文成功操作,加入异常重试逻辑处理。由于户能随时插拔移动存储,因此不认永远。操作或使FlushFileBuffer,检查移动存储否存。设备掉电或连接丢失,确保数据完整性,则以考虑使SQL Server Mobile事务。如果应程序必须使非线数据库,那么考虑使设备数据库服务(例如SQL Server Compact Edition)。如果使XML存储或传递数据,那么考虑总体性能影响。因XML同时增带宽本地存储需求。解决考虑使压缩算法或使非XML传递。考虑使自定义象代替DataSets,这样以减存开销,提系统性能。如果需种数据库同步,那么就使ADO.NETSync服务。应程序数据存储于Microsoft SQL Server、Oracle或DB2数据库。DebuggingMobile 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, and 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 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

温馨提示

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

评论

0/150

提交评论