AFCS开发者指南3-消息传递和权限
AFCS开发者指南3-消息传递和权限
尽管可以只使用AFCS提供的高级组件来开发实时协作的应用程序,但是可能你想建立你自已的协作组件。例如,你可能建立如下的应用程序:
- 一个调查容器
- 一个共享图片图库
- 同步的视频播放
- 共享,交互地图
在建立这些组件之前,最好是先熟悉平台的底层API和明白AFCS是怎么处理消息和权限的。
AFCS开发者指南3-消息传递和权限
尽管可以只使用AFCS提供的高级组件来开发实时协作的应用程序,但是可能你想建立你自已的协作组件。例如,你可能建立如下的应用程序:
在建立这些组件之前,最好是先熟悉平台的底层API和明白AFCS是怎么处理消息和权限的。
用过PureMVC框架的开发者一定在开发过程中遇到一些尴尬,在使用该框架过程中多少有些不够方便,即使很小的功能也要编写许多模版代码来实现,没有更加简洁途径来达到目的。如果你有这些抱怨的话,就该关注Fabrication这个框架了, Fabrication是一个加速开发基于PureMVC框架的Flex/Flash应用的工具,它为PureMVC编程语法添加了许多有用的特色,fabrication的建立主要是为了支持多模块应用而且只使用多核版PureMVC来扩展实现。
Fabrication使用PureMVC的Pipes Utility来沟通模块之间的通讯,但是pipes之间的内部逻辑被改造而抽象成一种更加直观的Router方式。Fabrication中的一些重要特色列举如下:
编者点评:可以说,fabrication大大简化了PureMVC框架使用的过程,而且更加直观和易于理解,但是这不意味着你可以轻易的使用PureMVC,如果想使用这个框架的话还需要对PureMVC的内在机制做详细了解,在此之上,在基于Fabrication做开发将如鱼得水。
来至:http://www.riameeting.com/node/276
双击xxxx.air文件后AIR程序会安装,但是实际上是怎么回事呢,是与命令行执行
“Adobe AIR Application Installer.exe” absolutePathToYourAIRApp/xxxx.air
是相同的效果。 “Adobe AIR Application Installer.exe”为什么要用双引号括起来呢,是因为Windows command propmt里打命令名中有空格,所以必须要用双引号括起来。
这个命令还有另外两个参数 silent 和 uninstall:
-silent 用法
“Adobe AIR Application Installer.exe” -silent -logToStdout -eulaAccepted -location “C:\Program Files\xxxxxxx” xxxxxxxx.air
silent参数就是静默安装了,就是说不弹出安装对话框,悄悄地一步就安装完了。
logToStdout参数实际使用不需要,是把安装过程中的信息打到标准输出终端上,就是命令行上。
eulaAccepted参数中EULA是End User Licese Agreement,就是同意用户协议了,我绝对是同意的,可是没加这个参数也没见什么动静
location参数及后面指定的路径当然是安装路径了
xxxxxxxx.air当然是你的AIR程序安装文件了
-uninstall 用法 “Adobe AIR Application Installer.exe” -uninstall appInstaller.air xxxxx
uninstall后应该有两个参数,第一个可能是air安装文件,第二个不知道写什么。参数少会报not enough arguments,这样写确实会执行uninstall,因为报错说”uninstall时发生错误”
虽然我不知道uninstall参数的用法,但是想到另一种卸载方法。
如果你安装了一个air程序,必定会在windows控制面板的添加和删除程序里有这个程序,你点击删除会卸载,那么点击删除后发生了什么事呢,我搜索注册表发现了它调用的命令。
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\YourAIRAppName
找到UninstallString项,其中的值就是删除命令:
MsiExec.exe /X{E824A28B-342F-B1C0-D90D-7EB4C668C083}
E824A28B-342F-B1C0-D90D-7EB4C668C083当然就是你程序的ID了。
MsiExec.exe是windows installer。
好了,现在安装和卸载都搞定了,哈哈哈。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
说说AIR Runtime,在安装完AIR运行时环境后,在注册表HKEY_CLASSES_ROOT中搜索air,可以看到键值,分别是:
Content Type: application/vnd.adobe.air-application-installer-package+zip(在服务器端向客户端提供在线无缝安装时需要在web server里注册的mime content type就是这个了)
HKEY_CLASSES_ROOT\.air\OpenWithProgids AIR.InstallerPackage
搜索AIR.InstallerPackage可以找到一些键值,包括AIR Runtime路径的信息等。
在资源管理器中点击工具–文件夹选项–文件类型,在已注册的文件类型中找到.air扩展名,可以看到打开方式是Adobe AIR Application Installer,与注册表中的信息相符。
由注册表的信息可以找到AIR Runtime安装在C:\Program Files\Common Files\Adobe AIR,其中可以找到用来安装.air程序的C:\Program Files\Common Files\Adobe AIR\Versions\1.0\Adobe AIR Application Installer.exe。
from:http://www.51ajax.net/?p=123
| 术语 | 描述 |
| room | A room is a virtual location on the Acrobat.com service to which clients can connect. The room is represented in your applications and to others as an URL. Someone (or some client) in a room can send and receive messages (data) to anyone else in the room. Think of rooms as meeting places at some URL. Applications require a room to enable people to meet and exchange information. You can create rooms programmatically, via the Room Console, or via the Developer Portal. |
| session | A session is a clients connection to a room. It exists as long as the connection exists. A session exists on a client. |
| template | A template is a saved room configuration which includes collectionNodes, nodes, configurations, items, and room settings. Rooms can be saved in a template library so that you can create new rooms with pre defined elements. You can create templates via the Room Console or via the RoomTemplater API. |
| collection node | 做为node层级中的最高级别,collection nodes主要目的是做为一个房间的消息。通常,model类实例化为sharedModel,pod,sharedManager(例如,一个chat pod或者UserManager)和管理它们自已。唯一的collection nodes在房间的根中展示它们。 |
| nod | Collection nodes被细分为一个或者多个nodes.Node发布message items,可能储存在服务器上,默认,一个node映射一组API在它的collection node模型中与相同的许可和储存室。它们支持node配置-用来描述与消息许可和储存策略的设置,又设置个别node的用户角色。 |
| provisioning | 建立一个新的房间和布置房间所需的组件和设置 |
| templating | Saving a room’s components, settings, and details as a template on the service. The template can be used to create new rooms automatically. |
| room settings | Every room has basic settings for bandwidth, auto-promoting users to publishers and so on. |
from:http://www.brighthub.com/hubfolio/matthew-casperson/blog/archive/2009/07/11/away3d-tutorial.aspx
I have written a new tutorial series over The Tech Labs that shows you how to create a 3D Flash game using the Away3D engine.

