Application Architecture Guide 2.0 - CH 19 - Mobile Applications(5)

简介:

本文翻译"Deployment"、"Pattern Map"、"Pattern Descriptions"和"Technology Considerations"中的"Microsoft Silverlight for Mobile"部分。

Deployment

Mobile applications can be deployed using many different methods. Consider the requirements of your users, as well as how you will manage the application, when designing for deployment. Ensure that you design to allow for the appropriate management, administration, and security for application deployment.

Deployment scenarios listed for Windows Mobile device applications, with the more common ones listed first, are:

• Microsoft Exchange ActiveSync® using a Windows Installer file (MSI).

• Over the air, using HTTP, SMS, or CAB files to provide install and run functionality.

 Mobile Device Manager–based, using Active Directory to load from a CAB or MSI file.

• Post load and auto-run, which loads a company-specific package as part of the operating system.

• Site loading, manually using an SD card.

部署

移动应用程序可以通过很多不同的方法来部署。设计部署方案时,要兼顾用户需求和你自身应用程序的管理。确保你的设计能够进行适当的管理和监督,并进行安全地部署。

Windows Mobile设备应用部署场景如下:

通过Microsoft Exchange ActiveSync®,使用Windows Installer文件。

通过空中接口,使用HTTPSMS,或者是CAB文件来提供安装并运行功能。

•基于Mobile Device Manager,使用Active Directory来从CAB或者MSI文件加载。

•启动时自动加载并自动运行,加载一个公司定制的包作为操作系统的一部分。

•定点加载,手动使用SD卡。

 

Consider the following guidelines when designing your deployment strategy:

• If your users must be able to install and update applications while away from the office, consider designing for over-the-air deployment.

 If you are using CAB file distribution for multiple devices, include multiple device executables in the CAB file. Have the device detect which executable to install, and discard the rest.

 If your application relies heavily on a host PC, consider using ActiveSync to deploy your application.

 If you are deploying a baseline experience running on top of Windows Mobile, considering using the post-load mechanism to automatically load your application immediately after the Windows Mobile operating system starts up.

 If your application will be run only at a specific site, and you want to manually control distribution, consider deployment using an SD memory card.

在设计部署策略时,考虑以下指导方针:

如果用户需要在离开办公室的情况下,安装并升级软件,那么就考虑使用空中接口来部署。

如果你要使用CAB文件发布给多个设备,那么就在CAB文件中包含多个设备的可执行文件。让设备来检测安装哪个可执行文件,并丢弃其他的文件。

如果你的应用经常依靠主机,那么考虑使用ActiveSync来部署应用。

•如果你要部署一个运行于Windows Mobile设备上的基本的体验,那么考虑使用开机重启加载的机制,在Windows Mobile操作系统运行后,来自动加载你的应用程序。

•如果你的应用程序只能运行于一个特定的位置,并且你想要手动控制分发,那么就考虑使用SD卡来部署。

 

Pattern Map

Table 2 Pattern Map

 

模式图

模式图

类别

相关模式

缓存

惰性采集

通信

•活动对象

•通信器

•实体翻译

•可靠的会话

数据获取

•活动记录

•数据传送对象

•域模型

•执行脚本

同步

同步

UI

•应用控制器

•模型浏览控制器

•模型浏览呈现者

•分页

 

Pattern Descriptions

• Active Object. Support asynchronous processing by encapsulating the service request and service completion response.

 Active Record. Include a data access object within a domain entity.

• Application Controller. An object that contains all of the flow logic, and is used by other Controllers that work with a Model and display the appropriate View.

• Communicator. Encapsulate the internal details of communication in a separate component that can communicate through different channels.

 Data Transfer Object (DTO). An object that stores the data transported between processes, reducing the number of method calls required.

• Domain Model. A set of business objects that represents the entities in a domain and the relationships between them.

 Entity Translator. An object that transforms message data types into business types for requests, and reverses the transformation for responses.

 Lazy Acquisition. Defer the acquisition of resources as long as possible to optimize device resource use.

 Model-View-Controller. Separate the UI code into three separate units: Model (data), View (interface), and Presenter (processing logic), with a focus on the View. Two variations on this pattern include Passive View and Supervising Controller, which define how the View interacts with the Model.

 Model-View-Presenter. Separate request processing into three separate roles, with the View being responsible for handling user input and passing control to a Presenter object.

 Pagination. Separate large amounts of content into individual pages to optimize system resources and minimize use of screen space.

 Reliable Sessions. End-to-end reliable transfer of messages between a source and a destination, regardless of the number or type of intermediaries that separate the endpoints

 Synchronization. A component installed on a device tracks changes to data and exchanges information with a component on the server when a connection is available.

 Transaction Script. Organize the business logic for each transaction in a single procedure, making calls directly to the database or through a thin database wrapper.

模式描述

活动对象。通过封装服务请求和服务完成相应,支持异步处理操作。

•活动记录。包括在一个域实体中的数据访问对象。

•应用控制器。一个包含了所有流程逻辑的对象,被其他控制器用来与一个Model合作并显示合适的View

•通信器。将通信的内部具体信息封装在一个分离的元件中,使他可以通过不同的通道来通信。

•数据传送对象(DTO)。该对象存储了不同处理操作间的传送数据,以减少调用方法的次数。

•域模型。一个业务对象的集合,代表着域中的实体和他们之间的关系。

•实体翻译。该对象将消息数据类型翻译成需要的业务类型,并将相应翻译为消息数据类型。

•惰性采集。尽可能推迟资源的获取,来优化设备资源的使用。

•模型浏览控制器。将UI的代码分为三个部分:模型(数据),浏览(接口),以及呈现(处理逻辑),主要关心浏览部分。该模式下的两个不同就是被动的浏览和监视控制器,它定义了浏览如何与模型进行交互。

•模型浏览呈现者。将请求处理分为三种不同的部分,处理用户输入的浏览响应,并将控制信息传递给呈现对象。

•分页。将大量的内容分成单独的页来优化系统资源并最小化屏幕的使用。

•可靠的会话。指源节点和目的节点之间端对端可靠的消息传输,并不考虑分割他们的中间节点类型和数量。

•同步。一个安装在设备上的元件,跟踪记录数据的变化,并在连接可用时,记录与服务器之间的信息交换。

•执行脚本。组织单个程序中执行每个命令的业务逻辑,直接通过数据库或者瘦数据库封装进行调用。

 

Technology Considerations

The following guidelines contain suggestions and advice for common scenarios for mobile applications and technologies.

技术考虑

以下指导方针包含了对于移动应用和技术通用场景的意见和建议。

 

Microsoft Silverlight for Mobile

If you are using Microsoft Silverlight® for Mobile, consider the following guidelines:

 Consider that at the time of this writing, Silverlight for Mobile was an announced product under development, but not yet released.

• If you want to build applications that support rich media and interactivity and have the ability to run on both a mobile device and desktop as is, consider using Silverlight for Mobile. Silverlight 2.0 code created to run on the desktop in the Silverlight 2.0 plug-in will run in the Windows Mobile Silverlight plug-in in the latest version of Microsoft Internet Explorer for Mobile. Consider that while it is possible to use the same Silverlight code in both places, you should take into account the differing screen size and resource constraints on a mobile device. Consider optimizing the code for Windows Mobile.

• If you want to develop Web pages for both desktop and mobile platforms, consider Silverlight for Mobile or normal ASP.NET/HMTL over ASP.NET for Mobile unless you know that your device cannot support either of these alternatives. As devices browsers have become more powerful, they are able to process the same native HTML and ASP.NET targeted by the desktop, thus making ASP.NET Mobile development less important. ASP.NET Mobile Controls currently supports a variety of mobile devices through specific markup adapters and device profiles. While ASP.NET Mobile Controls automatically render content to match device capabilities at run time, there is overhead associated with testing and maintaining the device profiles. Development support for these controls is included in Microsoft Visual Studio 2003 and 2005 but is no longer supported in Visual Studio 2008. Run-time support is currently still available, but may be discontinued in the future. For more information, see the links available in the Additional Resources section.

如果你要使用Microsoft Silverlight® for Mobile,那么考虑如下指导方针:

•在当前,Silverlight for Mobile只是作为一个处于开发中的产品,并未正式发布。

•如果你要建立支持丰富多媒体的应用,并且在移动设备和桌面设备上都能运行,那么就考虑使用Silverlight for Mobile。用Silverlight 2.0创建的代码能够在装有Silverlight 2.0 plug-in的桌面机上运行,同时也能够在装有包含Silverlight plug-in的最新版本的Microsoft Internet Explorer for MobileWindows Mobile设备上运行。在这两种不同的场合使用相通的代码时,要考虑移动设备上的多种屏幕大小和资源限制。考虑为Windows Mobile进行代码优化。

•如果你想为桌面平台和移动平台同时开发Web页面的话,那么考虑使用Silverlight for Mobile或者基于ASP.NET for Mobile之上的标准ASP.NET/HMTL,除非你知道你的设备不能支持上面两种选择中的任何一个。由于设备浏览器变得越来越强大,与桌面应用一样,他们能够处理相同的本地HTMLASP.NET,因此使得ASP.NET Mobile开发变得越来越不重要。当前的ASP.NET Mobile控件支持很多移动设备,包括具有特殊标记适配器和设备信息的。ASP.NET Mobile控件具有在运行时能够将内容转化为设备匹配的信息的能力,而在测试以及维护设备信息时,会有一定的开销。对这些控件进行开发在Microsoft Visual Studio 20032005中是支持的,但是在Visual Studio 2008是不支持的。对于运行时的支持,当前仍然可用。但是将来可能变得不可用。更多信息请参考Additional Resources这一节给出的链接。


本文转自施炯博客园博客,原文链接:http://www.cnblogs.com/dearsj001/archive/2009/01/19/1378520.html,如需转载请自行联系原作者

相关文章
|
1月前
|
SQL 数据可视化 Apache
阿里云数据库内核 Apache Doris 兼容 Presto、Trino、ClickHouse、Hive 等近十种 SQL 方言,助力业务平滑迁移
阿里云数据库 SelectDB 内核 Doris 的 SQL 方言转换工具, Doris SQL Convertor 致力于提供高效、稳定的 SQL 迁移解决方案,满足用户多样化的业务需求。兼容 Presto、Trino、ClickHouse、Hive 等近十种 SQL 方言,助力业务平滑迁移。
阿里云数据库内核 Apache Doris 兼容 Presto、Trino、ClickHouse、Hive 等近十种 SQL 方言,助力业务平滑迁移
|
7月前
|
SQL 分布式计算 测试技术
从 Clickhouse 到阿里云数据库 SelectDB 版内核 Apache Doris:有赞业务场景下性能测试与迁移验证
从 Clickhouse 到阿里云数据库 SelectDB 版内核 Apache Doris 迁移实践:有赞查询提速近 10 倍,OLAP 分析更实时高效!
从 Clickhouse 到阿里云数据库 SelectDB 版内核 Apache Doris:有赞业务场景下性能测试与迁移验证
|
9月前
|
存储 消息中间件 弹性计算
统一观测丨借助 Prometheus 监控 ClickHouse 数据库
统一观测丨借助 Prometheus 监控 ClickHouse 数据库
统一观测丨借助 Prometheus 监控 ClickHouse 数据库
|
11月前
|
存储 Kubernetes Java
【数据库】clickhouse 集群安装准备(CentOS 版)(一)
【数据库】clickhouse 集群安装准备(CentOS 版)(一)
296 0
|
11月前
|
存储 SQL 运维
阿里云数据库ClickHouse产品和技术解读
社区ClickHouse的单机引擎性能十分惊艳,但是部署运维ClickHouse集群,以及troubleshoot都不是很好上手。本次分享阿里云数据库ClickHouse产品能力和特性,包含同步MySQL库、ODPS库、本地盘及多盘性价比实例以及自建集群上云的迁移工具。最后介绍阿里云在云原生ClickHouse的进展情况。
273 0
|
12月前
|
SQL 存储 算法
一个比ClickHouse还快的开源数据库(1)
一个比ClickHouse还快的开源数据库
164 0