专栏首页施炯的IoT开发专栏Application Architecture Guide 2.0 - CH 19 - Mobile Applications(5)

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

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


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文件。


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



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.





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


Pattern Map

Table 2 Pattern Map


表2 模式图






•活动对象 •通信器 •实体翻译 •可靠的会话


•活动记录 •数据传送对象 •域模型 •执行脚本




•应用控制器 •模型浏览控制器 •模型浏览呈现者 •分页

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.
















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 Mobile的Windows Mobile设备上运行。在这两种不同的场合使用相通的代码时,要考虑移动设备上的多种屏幕大小和资源限制。考虑为Windows Mobile进行代码优化。

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



0 条评论
登录 后参与评论


  • SQL中GROUP BY用法示例

    GROUP BY我们可以先从字面上来理解,GROUP表示分组,BY后面写字段名,就表示根据哪个字段进行分组,如果有用Excel比较多的话,GROUP BY比较类...

  • 考研英语-1-导学


  • 理工男图解零维到十维空间,烧脑已过度,受不了啦!


  • 中国互联网协会发布:《2018中国互联网发展报告》


  • 不只是软件,在线也可以免费下载百度文库了。


  • 【倒计时7天】2018教育部-腾讯公司产学合作协同育人项目申请即将截止!

  • 【系统设置】CentOS 修改机器名

  • ISUX Xcube智能一键生成H5

  • 复杂业务下向Mysql导入30万条数据代码优化的踩坑记录


  • 知识体系解决迷茫的你

    最近在星球里群里都有小伙伴说道自己对未来的路比较迷茫,一旦闲下来就不知道自己改干啥,今天我这篇文章就是让你觉得一天给你 25 个小时你都不够用,觉得睡觉都是浪费...