독도 광고 모금 캠페인

'BlazeDS'에 해당되는 글 4건

  1. 2009.02.18 BlazeDS Data Push Sample Site by 이현호
  2. 2009.02.18 BlazeDS, Polling , Streaming .... by 이현호
  3. 2008.07.15 [펌] Flex Cookbook : Creating BlazeDS channels at runtime by 이현호
  4. 2008.05.29 [펌] Flex, Spring and BlazeDS: the full stack! by 이현호

StreamingAMF를 이용하여 Data Push 하는 예제입니다.

--> 여기 <-- 를 클릭하세요.
Posted by 이현호
,

BlazeDS에서는 RMTP프로토콜이 지원이 안됩니다.

대신 Polling과 Pushing 을 위해서 PollingAMF 와 StreamingAMF가 존재 합니다.

이에 대한 차이점에 대한 글 포스트입니다.

자세한건 -> 여기 <- 를 클릭하면됩니다.
Posted by 이현호
,
출처 : adobe devnet

Creating BlazeDS channels at runtime

by SujitG on July 10, 2008 Avg Rating 5.0 (1)   |   Log in to rate post.

Tagged with dynamic channels , flex and blazeds , Flex and other technologies , runtime channels

Problem Summary

Usually we create channels in services-config.xml and give URL to channel end points in the same file. In services-config.xml {server.name} and {server.port} tokens are evaluated at runtime, but the {context.root} is not evaluated at runtime. If we have to change the URL along with the web application context root, then we have to re-compile Flex application.

Solution Summary

Solution is simple you will have to create channels on runtime. This is very straight forward and easy. You need not even add your services-config.xml to the compiler arguments.

Explanation

Usually we create channels in services-config.xml and give URL to channel end points in the same file. {server.name} and {server.port} tokens are evaluated at runtime, that is these tokens are replaced based on the URL you are using to access the application. But the {context.root} is not evaluated at runtime. If we have to change the URL along with the web application context root, then we have to re-compile Flex application. It will be great if you can change the end point URL at one location and the Flex application will start using that URL without a need for recompiling the application.

I created a very simple sample application which will access a XML file and then create the channels based on the settings in the configuration file.

XML configurations file with channel details

I created a XML file which has details of the channels which my application has to create. If you see the snippet extracted from the XML file it has definition for AMF channel. In the definition the id is the ID of the channel configured in the services-config.xml file on the server and the endpoint node has the URL to the end point.

Download XML from this URL: ChannelsConfiguration.xml
 
<ChannelsConfig>
<channels>
<channel id=”my-amf”>
<type>amf</type>
<endpoint>http://localhost:9191/lcdssamples/messagebroker/amf</endpoint>
</channel>
</channels>
</ChannelsConfig>
 
Creating Flex application
 
Download MXML file from this URL: DynamicChannels.mxml

Now that I have a XML file with details of the channel my application will be using. I loaded this file when my application starts and create required channels so that my application can communicate with the server for using Remoting/Messaging/Proxy/Data management services provided by LCDS/BlazeDS.

Once the application is created function named loadConfiguration() is invoked which will make a HTTP Service request to get the XML file. Check out the function, it is pretty straightforward HTTP Service call.

When the XML is retrieved I parse the XML file and create channels in the parseConfigurationFile() function. Below are few statements extracted from the parseConfigurationFile() function which are worth explaining

First I create a new channel.
 
_amfChannel = new AMFChannel(channel.@id, channel.endpoint);
 
Next add this channel to the ChannelSet.
 
amfChannelSet = new ChannelSet();
amfChannelSet.addChannel(_amfChannel);
 
That’s it we have created the channel sets which we will be using in the RemoteObject call later. I created more channels

Now that I have the channel sets I need to instruct my RemoteObject to use this channel sets when it is trying to communicate with the server. This is how you do it.

<mx:RemoteObject id=”rmObj” destination=”MySessionHandler”
channelSet=”{amfChannelSet}”
result=”resultHandler(event)”
fault=”faultHandler(event)”
showBusyCursor=”true”/>
 
That is all you need to do. You can invoke operations on RemoteObject as usual. This applies to RemoteObject/Consumer/Producer/DataService
Posted by 이현호
,
이것도 이미 DZone을 통해서 퍼온겁니다.

BlazeDS를 통한  Spring 프레임 워크를 적용하는 것에 대한 글입니다.

제가 설명에는 쥐약이라서 설명해줄 만한거 없을까.. 하고 찾아봤습니다. ^^;;

--> Flex, Spring and BlazeDS: the full stack! (Part 1) <--
--> Flex, Spring and BlazeDS: the full stack! (Part 2) <--
--> Flex, Spring and BlazeDS: the full stack! (Part 3) <--
--> Flex, Spring and BlazeDS: the full stack! (Part 4) <--
--> Flex, Spring and BlazeDS: the full stack! (Epilogue) <--

노파심에서 말씀드리지만... 프레임워크를 통한 표준화,자동화를 좋아하는
저로써도 무조건 사용은 자제 해달라는 것입니다.

아무리 스프링 프레임워크가 좋다 하더라도 적용가능한 상황과 아닌 상황이
발생할수 밖에 없고 더더군다나 위의 예제에는 하이버네이트라든가 Maven,JBoss
등의 다른 프레임워크가 같이 사용되고 있어서 더욱 그렇습니다.

그래도 편리한(?) 개발과 갑으로부터 유지보수에 대한 쪼임없이 프로젝트를 잘해서
빠져나가기 위해서는 프레임워크를 사용하는 것도 방법이 되니 도움이 되시기
바랍니다.
Posted by 이현호
,