Working With BlazeDS Beta 1
Last week we successfully ported an AIR application from amfphp to BlazeDS. The code for this application was almost completely generated by a new generator we're working on (coming soon!). With the announcement of BlazeDS, we kinda shelved our php generator and redirected our efforts in doing the same thing for BlazeDS. In the process, we put together our own version of the blazeds.war file that ships with BlazeDS beta 1, which we use as the starting point for all our BlazeDS projects. Here's a list of the changes we've made:
- Modified the context.xml found in the META-INF folder - the packaged one was producing Valve Errors
- Added the missing my-streaming-amf channel to services-config.xml, which I found in the BlazeDS samples war's config file
- Incorporated the latest Flex 3 Compiler Module files to allow server-side compilation of mxml files
- Created a very simple java class and a corresponding destination which will verify Blaze backend functionality
- Created a very simple Flex application that calls the above java class function test(string)
- Added 2 jars to WEB-INF, one is crazedTemplate.jar, which our new codegenerator (coming soon) uses, the other is sharpertools.jar, which the jar requires.
Now, with Blaze and the compiler war being separate, I've gone through the web.xml in this project and put comments to show which pieces are required by the compiler module and which pieces are required by Blaze. To get this back to being a pure Blaze non-Flex 3 Compiler Module, you'd just need to remove the appropriately marked sections from the web.xml and then remove all folders and files from WEB-INF/flex with the exception of:
- services-config.xml
- remoting-config.xml
- proxy-config.xml
- messaging-config.xml
- BlazeDS does not support the RTMP Channel typically used by LCDS for data push (RTMP typically means firewall port challenges all around anyway!)
- BlazeDS does support AMF Streaming which offers data push like RTMP, however not nearly as scalable (100's vs 10000's of concurrent users)
- BlazeDS does support proxy so you can bypass the all too familiar sandbox issues when accessing remote data where no crossdomain.xml is present
- BlazeDS does not come packaged with the Compiler Module
- BlazeDS does not have managed dataservices. This means that you don't need the fds.swc (DataService & [Managed]) in your flex projects.. you will use either Consumer, Producer or RemoteObject Classes
- BlazeDS does support AMF3, RemoteClasses & Messaging with a "lite" version of push via amf streaming
No comments:
Post a Comment