注:本文只作本人记录,不作为技术分享。
固定链接: http://www.nethref.com/?p=281
官方网址:http://www.potomacframework.org/
下载地址:http://www.potomacframework.org/downloads/
论坛讨论:http://forum.potomacframework.org/
API文档:http://www.potomacframework.org/1.0beta/asdoc
学习文档:http://www.potomacframework.org/documentation/
potomac-framework源于目前多种技术的设计思想,类似于OSGI和Eclipse RCP技术,适合做企业级Flex模块块的开发,但目前最新版是Beta 0.8版,只建议学习研究,不做实际项目应用。
第一、Flex的potomac-framework中一个模块化的框架,参考OSGI的原理,而其构建成用户的UI界面,则是由”parts(组件)“拼装而成。这点相信有Eclipse的使用经验的朋友都明白。
第二、potomac-framework是一种通用的商用应用Flex程序框架,拥有框架的依赖注入及支持反射和可扩展机制。
第三、总体来说,potomac的设计思想是很优秀的,是值得推荐理由。但目前其拥的多种机制都还不成熟。如果企业或团体需要应用,则需要自己实现他的扩展机制。
如何搭建potomac的开发环境,在官网上已有详细的文档体现。具体页面为:http://www.potomacframework.org/documentation/getting-started/,但我还是把内容再贴出来吧。
1、做好环境搭建准备
安装Java SDK
下载 Potomac 立即下载
安装好Flash Builder4或Eclipse
安装Potomac基于Eclipse的插件,老版本Eclise放在Plugins中而新版本的放在Dropins,插件在下载好的PhotoMac包中有为”com.elementriver.potomac.sdk_1.0.0_vXXXXXX.jar“
2、然后配制PhotoMac的开发平台
在Window下的Perferences中,指定Potomac解压位置中的targetPlatform目录。
不清楚可参考:http://www.potomacframework.org/documentation/modularity/about-the-target-platform/

接下来就是创建应用了,这里我就不多说了,英语不难,大家都看的懂。把这例子跑起来后再细读官方文档和API吧。
Create a Bundle
Potomac projects are composed of bundles (i.e. Potomac modules). Bundles are hosted within Flex Library Projects.
Create a new Flex Library Project.
Once the library project is created, you need to add the Potomac Bundle Nature to it.
Right-click on the project and select the new “Add Potomac Bundle Nature”.

When that is complete, you should notice that Potomac created a new file named “bundle.xml” in the project’s root folder.
Configure the Bundle
Now you’ll need to perform some standard configuration to the bundle. Open the bundle.xml file.
In the Bundle XML Editor, add the two Potomac bundles, potomac_core and potomac_ui, to the dependencies list. Click save.

Add a Sample Component
You’ll need to add at least on UI component to see anything on screen. Here’s a simple one you can cut-n-paste in called MyComponent.mxml:
<?xml version="1.0" encoding="utf-8"?> <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300"> <mx:Metadata> [Page(id="hellopage",title="Hello World")] [Part(id="hellopart",page="hellopage", folder="default",title="Hello World")] </mx:Metadata> <mx:Label x="10" y="10" text="Hello World"/> </mx:Canvas>
讯享网

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/123570.html