Fluorine<wbr>FX开源库</wbr><wbr></wbr><wbr></wbr> <wbr><wbr><a href="http://s3.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a5778fe54f1ceb98ca6c2f526c1061404e710b673b13d111e0ba26bd13d7e6dc3356f6e1c4df52c9b4a641c866cf80c0a1c260cbe02c6089e5fb4f09fe290b9359bb63b50e1" target="_blank"><img height="137" src="http://s3.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a5778fe54f1ceb98ca6c2f526c1061404e710b673b13d111e0ba26bd13d7e6dc3356f6e1c4df52c9b4a641c866cf80c0a1c260cbe02c6089e5fb4f09fe290b9359bb63b50e1" width="265"></a><wbr><wbr><a href="http://www.fluorinefx.com/download/fluorinefx/1.0.0.15/setup.exe" target="_blank"><font style="LINE-HEIGHT: 1.5em" face="" size="5"><u>下载</u></font><wbr></wbr></a><wbr><br><b><wbr><font style="LINE-HEIGHT: 1.5em" face="" size="4">关于FluorineFX</font><wbr></wbr></wbr></b><wbr><br>FluorineFX是一个开源库,提供了一种在.NET framework下对Flex/Flash的远程过程调用,Flex数据服务和实时数据的使用技术。 <br><br>能被.NET frameworks支持的FluorineFx有: <br><br><ul style="LIST-STYLE-TYPE: disc"> <li style="MARGIN: 25px">Microsoft .NET Framework 1.1 (1.1.4322) </li> <li style="MARGIN: 25px">Microsoft .NET Framework 2.0 (2.0.50727) </li> <li style="MARGIN: 25px">Microsoft .NET Framework 3.5 (3.5.21022.8) </li> <li style="MARGIN: 25px">Mono 1.2.4 </li> <li style="MARGIN: 25px">.NET frameworks 支持向下兼容,所以新版本的框架将运行的二进制集会被定位到先前版本的框架 <wbr></wbr> </li> </ul> <wbr> <b><wbr>特性</wbr></b><wbr><br><ul style="LIST-STYLE-TYPE: disc"> <li style="MARGIN: 25px">Flex, <a title="Flash" href="http:///" target="_blank"></a><a title="Flash" href="http://" target="_blank">Flash</a> Remoting (RPC) </li> <li style="MARGIN: 25px">Flex Messaging (partial) </li> <li style="MARGIN: 25px">Flex Data Services (partial) </li> <li style="MARGIN: 25px">Supports AMF0, AMF3 and RTMP protocols </li> <li style="MARGIN: 25px">Service Browser </li> <li style="MARGIN: 25px">Template based code generator (ASP.NET like syntax) </li> <li style="MARGIN: 25px">Easily integrate rich Internet applications with .NET backend </li> <li style="MARGIN: 25px">Easily integrate with Adobe Integrated Runtime (Adobe AIR?) <wbr></wbr> </li> </ul> <wbr><br><b><wbr>FluorineFx的配置</wbr></b><wbr><br><br>使用“FluorineFx <a title="ASP" href="http:///" target="_blank"></a><a title="ASP" href="http://" target="_blank">ASP</a>.net <a title="Web" href="http:///" target="_blank"></a><a title="Web" href="http://" target="_blank">Web</a> site”向导生成的项目结构如下: <br><br><wbr><a href="http://s13.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a57f874ffb8d552c0c76e761533ff7e23d7bc7463eac8d4a1940b83c9550dccbb22a40ddfc6a944a8e09d4aadcafd5e7d4b1f80e6015c385bc480d58f93c91febc77fa5513f" target="_blank"><img height="370" src="http://s13.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a57f874ffb8d552c0c76e761533ff7e23d7bc7463eac8d4a1940b83c9550dccbb22a40ddfc6a944a8e09d4aadcafd5e7d4b1f80e6015c385bc480d58f93c91febc77fa5513f" width="255"></a><wbr><br>除了根目录下的web.config文件(asp.net网站的标准配置文件外),WEB-INF/flex目录下还有四个配置文件(.xml)。 <br>由于FluorineFx是Flex Data Service的.net替代品(如果你用Java写服务器端程序,则可以直接用Flex Data Service),FluorineFx提供了和Flex Data Service相同的功能—即在services-config.xml配置文件的<services>部分配置Remoting Service, Message Service ,Data Management Service。 <br>此外,除了把所有配置都放在services-config.xml一个文件中,还可以把Service配置信息分散到多个配置文件里,然后包含进来以达到简化的效果。如下: <br><wbr><a href="http://s5.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a577b78fa6a2d1f60c77d2b1f9b0a274de8390944ddf67ac00502edebef0ae8d430e2207588544f4676c128a05c1ca6c76966f355523d3e2fe04c98a98ef7261e9d4c953173" target="_blank"><img height="313" src="http://s5.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a577b78fa6a2d1f60c77d2b1f9b0a274de8390944ddf67ac00502edebef0ae8d430e2207588544f4676c128a05c1ca6c76966f355523d3e2fe04c98a98ef7261e9d4c953173" width="424"></a><wbr><br><br><br>下表是这四个配置文件的作用: <br><wbr><a href="http://s13.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a57ca259bdcf0e26e51f28fdeda0d879d203f220f4e1be312b2665beb407b16aa9d7a95a2797df00e205de4e17275553614a9657c2e9e4277299b0a884003b06ccbc3f7b428" target="_blank"><img height="164" src="http://s13.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a57ca259bdcf0e26e51f28fdeda0d879d203f220f4e1be312b2665beb407b16aa9d7a95a2797df00e205de4e17275553614a9657c2e9e4277299b0a884003b06ccbc3f7b428" width="602"></a><wbr><br><br>看上去这些配置文件和Flex Data Service保持一致。没错,FluorineFx 配置文件与Flex/Flash保持了统一。 <br>在这些配置部分,有些针对于所有的全部的Service(在services-config.xml设置),有些则专用于特定的Service(在remoting-config.xml/ messaging-config.xml/ data-management-config.xml中设置)。 <br>先看看services-config.xml中的全局设置部分: <br>1.配置message channelFluorineFx 使用Flex messaging system 中的message channel传输消息。一个channel可以让多个Service通信。FluorineFx目前不支持AMF polling channels 。在services-config.xml配置文件中可以设置AMF Channel 或者RTMP Channel。如下: <br><wbr><a href="http://s13.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a57304830003ab505ea2dc374b58c55c278655ba6ca208a1b6d7dbf41407ae9c6752000efd41c16c55a5ce18a8451909bc454301535391ad5aa212f7ce9ee4f06e74cefb29e" target="_blank"><img height="356" src="http://s13.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a57304830003ab505ea2dc374b58c55c278655ba6ca208a1b6d7dbf41407ae9c6752000efd41c16c55a5ce18a8451909bc454301535391ad5aa212f7ce9ee4f06e74cefb29e" width="587"></a><wbr><br>这里用<channel-definition>定义的channel,每个都有唯一的id。<endpoint>的uri设置的是一个接受用户请求的网关(Gateway.aspx)程序。打开这个网关程序,你可以发现程序中没有任何代码。 <br>Flex调用远程对象的流程大概如下: <br><!--[if !supportLists]-->l <!--[endif]-->Flex发出调用远程对象的请求,这个请求会被Flash Player编码成AMF; <br><!--[if !supportLists]-->l <!--[endif]-->Flex代码中定义了 Service组件,通过该组件的id,找到对应配置文件中定义的destination。 <br><!--[if !supportLists]-->l <!--[endif]-->destination通过它的channel 的 id找到对应的channel定义。 <br><!--[if !supportLists]-->l <!--[endif]-->根据channel的定义,将请求发送给指定的gateway; <br><!--[if !supportLists]-->l <!--[endif]-->gateway将请求发送给gateway的后台类,将消息转换成.net格式,调用服务器上正确的类; <br>接下来,针对Remoting Service, Message Service ,Data Management Service的配置分别进行详细说明。 <br><b><wbr>一、配置</wbr></b><wbr><b><wbr>RPC(remoting-config.xml)</wbr></b><wbr><br>定义Remoting Service destination就是定义需要访问的remote object。Remoting service destination就是一个对象,Flex使用<mx:RemoteObject>或 ActionScript代码连接这个远程对象。 <br>例如: <br><wbr><a href="http://s13.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a57bb598a5e588ead2b91c18d960cd410f7237639a570a3229d1e30ce8aae20b27d7fbdf881f6935d854ca7157f6bfa696afbac26c932514390060baef5a91dcdc43338d34f" target="_blank"><img height="216" src="http://s13.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a57bb598a5e588ead2b91c18d960cd410f7237639a570a3229d1e30ce8aae20b27d7fbdf881f6935d854ca7157f6bfa696afbac26c932514390060baef5a91dcdc43338d34f" width="670"></a><wbr><br><wbr><a href="http://s13.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a57b4c6732daf192416746bcfccc8b2ba08c491800858f6d60ba65a87d32f4fc432f6e6333edefd33efae72ee46bd27f2f595052ca5b204aead4babae02245757852ef60cbb" target="_blank"><img height="592" src="http://s13.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a57b4c6732daf192416746bcfccc8b2ba08c491800858f6d60ba65a87d32f4fc432f6e6333edefd33efae72ee46bd27f2f595052ca5b204aead4babae02245757852ef60cbb" width="410"></a><wbr><br><br><wbr><a href="http://s1.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a574ecaaf7fba7673172a42370e19d697a0a407f27c519a62af58240d1157988fe934f84c69e82e2bee8baf9308246635d8b3ef2848e55b4c92cba0d312405b1f1a960484c3" target="_blank"><img height="424" src="http://s1.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a574ecaaf7fba7673172a42370e19d697a0a407f27c519a62af58240d1157988fe934f84c69e82e2bee8baf9308246635d8b3ef2848e55b4c92cba0d312405b1f1a960484c3" width="342"></a><wbr><br><br>对上面配置的说明:1.<security>的安全设置 定义了远程对象,可以使用security constraint来限制用户访问访问这个destination (只支持custom authentication)。 <br>Security constraints 可以在destination中定义,也可以在destination外面 定义,然后在destination中通过Security constraints的 id引用。 <br>2.Destination adapterAdapters是服务器上的一个组件,利用Adapter,客户端才能访问远程服务器上的 service object。 Adapter 定义不是必需的, gateway 将自动配置它。默认的Remoting Adapter是flex.messaging.services.RemotingService。 <br>3.Remote object 的<properties> <br><wbr><a href="http://s13.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a57f33ca14a53ff856a73a59a9f376e829cd80292cc07e8fd4a81bf23ed3fedc14a653cde57435e32cd2c884ea79245151f0bb7fc792f472b2813558288308bde8f0bb4bdfc" target="_blank"><img height="245" src="http://s13.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a57f33ca14a53ff856a73a59a9f376e829cd80292cc07e8fd4a81bf23ed3fedc14a653cde57435e32cd2c884ea79245151f0bb7fc792f472b2813558288308bde8f0bb4bdfc" width="527"></a><wbr><br><br>4.Web service properties(还不支持)5.默认设置 <br><font style="LINE-HEIGHT: 1.5em" face="" color="#0033ff" size="1">如果没有service配置文件,则gateway会使用下面的默认配置:</font><wbr><br><br><wbr><a href="http://s13.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a57b5c00fe4d5430bb0f48b0daa60b9c9895794d8313198dc541d60af0f460a22df222619d71858bd0661e1f3ed94d35722f17c62e5f244682f82316162b923e1764fe54379" target="_blank"><img height="435" src="http://s13.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a57b5c00fe4d5430bb0f48b0daa60b9c9895794d8313198dc541d60af0f460a22df222619d71858bd0661e1f3ed94d35722f17c62e5f244682f82316162b923e1764fe54379" width="670"></a><wbr><br><br><wbr><a href="http://s13.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a574e43e1535b62a06c4a37dd2099517a305fc8059437c07dc6385891e62938b4d099ce3526f72b0869f910c32cf2c049dc59f4555c38bf23dd14ee90826f4c949986e2420c" target="_blank"><img height="550" src="http://s13.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a574e43e1535b62a06c4a37dd2099517a305fc8059437c07dc6385891e62938b4d099ce3526f72b0869f910c32cf2c049dc59f4555c38bf23dd14ee90826f4c949986e2420c" width="670"></a><wbr><br><br><br>二、配置 Message ServiceMessage Service destination 是就是消息传输的终端(endpoint)。在这台终端机上封装有服务器端代码,处理传输过来的消息 。使用 Producer 和Consumer 组件或ActionScript API可以连接到message service destination。 <br>例如: <br><wbr><a href="http://s1.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a57dad59d9ec32e22c8f79b97d3a245390e26abf0d06bf944557d454f6d50a216b1feb9f877f08410f70334bffefaf9aae8380ec474b8c9ee4a1960fb2f08a69d66f09ffea4" target="_blank"><img height="148" src="http://s1.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a57dad59d9ec32e22c8f79b97d3a245390e26abf0d06bf944557d454f6d50a216b1feb9f877f08410f70334bffefaf9aae8380ec474b8c9ee4a1960fb2f08a69d66f09ffea4" width="670"></a><wbr><br><wbr><a href="http://s3.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a57eccc6001f393bb57f81483e907d07f6340368ef3c68f76a9c1804ec2f3f7a16973c1ea2b6a30c53702dffb4d7048d097257761ef727b0433113a141480d2917a4300b2ec" target="_blank"><img height="677" src="http://s3.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a57eccc6001f393bb57f81483e907d07f6340368ef3c68f76a9c1804ec2f3f7a16973c1ea2b6a30c53702dffb4d7048d097257761ef727b0433113a141480d2917a4300b2ec" width="467"></a><wbr><br><wbr><a href="http://s1.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a575c6a08143c1742f25fa2c2ee39d6ddc3d1736357e208d8f215c263401f80b14226205890f9242a2853ae6d33712fa665f64e26ef0b3c3eac5c8913abb006ce5089d0f43c" target="_blank"><img height="573" src="http://s1.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a575c6a08143c1742f25fa2c2ee39d6ddc3d1736357e208d8f215c263401f80b14226205890f9242a2853ae6d33712fa665f64e26ef0b3c3eac5c8913abb006ce5089d0f43c" width="670"></a><wbr><br>对上面配置的说明:1.Message channels当前版本的FluorineFx 只支持通过Realtime Message Protocol (RTMP) channel传输消息。 <br>2.Message Service adapter在FluorineFx中,默认的 Message Service adapter就是<i><wbr>FluorineFx.Messaging.Services.Messaging.MessagingAdapter</wbr></i><wbr> 类。所以配置文件如下设置: <br><wbr><a href="http://s13.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a57936aa5a6167a840f33e2acf90ac1165966be9404cd2ef9b0faa49e1ce38dac4134e5dc8720b5b9980133153e85de9f3210b51b3374528f226468a60bf98f47984c521189" target="_blank"><img height="21" src="http://s13.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a57936aa5a6167a840f33e2acf90ac1165966be9404cd2ef9b0faa49e1ce38dac4134e5dc8720b5b9980133153e85de9f3210b51b3374528f226468a60bf98f47984c521189" width="670"></a><wbr><br><br>如果编写MessagingAdapter类的子类,你就可以自己定义Adapter 。 <br>3.Network properties<wbr><a href="http://s13.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a57c8f42fbe8a9be0987ad688c9709ae323e6b2681f5474672dfeeab3f019046a5d14e9015cac2c735bd7afcf0dd3b5a5f43cd6747925dca9291476bf29e7c8d53d0fa1103a" target="_blank"><img height="92" src="http://s13.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a57c8f42fbe8a9be0987ad688c9709ae323e6b2681f5474672dfeeab3f019046a5d14e9015cac2c735bd7afcf0dd3b5a5f43cd6747925dca9291476bf29e7c8d53d0fa1103a" width="566"></a><wbr><br><br><b><wbr>4.Server properties</wbr></b><wbr><br><wbr><a href="http://s3.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a570e35f068585bde35558c6a5ed29fa433eef61df515015d8f528cf69e1583f82fb59638c7af8fb0e93bf7d59402c75c43bb210106f0381651405c03c01879ff48d43b6bea" target="_blank"><img height="92" src="http://s3.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a570e35f068585bde35558c6a5ed29fa433eef61df515015d8f528cf69e1583f82fb59638c7af8fb0e93bf7d59402c75c43bb210106f0381651405c03c01879ff48d43b6bea" width="424"></a><wbr><br><br>三、配置 Data Management ServiceData Management Service destination 是一个终端。这个终端可以接收数据,或者发送数据到客户机。它提供了将数据分布到多个Data Management Service destination和 在这些destination之间进行同步(synchronization)的能力。 在Flex中使用DataService 组件或ActionScript API可以连接到Data Management Service destination。 <br>例子: <br><wbr><a href="http://s5.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a57194f177192f299d8307d53f5dcd15b36f9b6598618788c8d9311b3fe5c13871cd69d66c8c4a5a83a335ddb1e3703966f9ecc9917b8e650d2d1a193478211f79c12949b0c" target="_blank"><img height="215" src="http://s5.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a57194f177192f299d8307d53f5dcd15b36f9b6598618788c8d9311b3fe5c13871cd69d66c8c4a5a83a335ddb1e3703966f9ecc9917b8e650d2d1a193478211f79c12949b0c" width="670"></a><wbr><br><wbr><a href="http://s13.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a5747a55ead060cd70dea2820164e110197806de666f6befcdcbd8b2f36324534997c26867b53d7641a42ea66275b4fba8c275a60bd246e1023bc3b5d6eeedb8da8cce0cb81" target="_blank"><img height="707" src="http://s13.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a5747a55ead060cd70dea2820164e110197806de666f6befcdcbd8b2f36324534997c26867b53d7641a42ea66275b4fba8c275a60bd246e1023bc3b5d6eeedb8da8cce0cb81" width="670"></a><wbr><br><br>对上面配置的说明:1.Message channel的选择:当前的FluorineFx 只支持使用Realtime Message Protocol (RTMP) channel 传输Data Management Services。 <br>2.Data adapter的设置:FluorineFx中的 Data adapter是由 <i><wbr>FluorineFx.DotNetAdapter</wbr></i><wbr> 类实现的: <br><wbr><a href="http://s13.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a57d113166e7a80b77f00b452800fe496f590dee980771a8f92c2c94acad7c167bb8dd1e8d4a42d530895454965293046f56a1fdb2f1bed44c86de25294ad406519aea74706" target="_blank"><img height="483" src="http://s13.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a57d113166e7a80b77f00b452800fe496f590dee980771a8f92c2c94acad7c167bb8dd1e8d4a42d530895454965293046f56a1fdb2f1bed44c86de25294ad406519aea74706" width="606"></a><wbr><br><br><wbr><a href="http://s1.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a5767f37b422e7801a408fbef38ab2364e59820c56c099f2f2925d9c7150c13c8bd24612214ec1b52ed5f424cc6ebda1f92ccb5bae66d6acf4a6f880978cae94c6c50ac0223" target="_blank"><img height="280" src="http://s1.photo.store.qq.com/http_imgload.cgi?/rurl4_b=df883ffcef85a62127662da6453b0a5767f37b422e7801a408fbef38ab2364e59820c56c099f2f2925d9c7150c13c8bd24612214ec1b52ed5f424cc6ebda1f92ccb5bae66d6acf4a6f880978cae94c6c50ac0223" width="544"></a><wbr><br></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
|