Home

Feeds

RSS

Nov 12 Announcing FlexServerLib, The BlazeDS Extension Project

A while back, at 360|Flex San Jose, I gave a presentation titled "Implementing BlazeDS". I've been interested in BlazeDS a lot since Adobe announced it way back in early 2008. Being open-source, BlazeDS is open to extension and customization. Until now, only dpHibernate has really taken advantage of what can be done when you extend BlazeDS. At 360|Flex, Mike Nimer and I got to talking about how we could integrate some of the things we really like from ColdFusion into BlazeDS / Flex. We considered creating a Flex server that hooked into Mule, the OS ESB, but ultimately decided that Adobe's established presence in the server-side space with BlazeDS / LCDS was enough to guide us in a direction for extending the server-side capabilities of Flex. So Mike and I decided, after a bit of discussion, to create FlexServerLib.

So, what is FlexServerLib? FlexServerLib is an open-source project that aims to extend BlazeDS with custom message adapters, endpoints, and services. We will provide, in addition to each piece of server-side functionality, a corresponding SWC to implement the service on the Flex client.

We chose the name FlexServerLib because we really wanted the same mindset to FlexServerLib as there is to FlexLib. FlexLib is the goto point for AS3/MXML components and is strongly community driven. We want the same thing, the same community atmosphere for FlexServerLib. And, if you're wondering, we ran the name by Doug to get his blessing before settling on it.

Through the course of discussion at 360|Flex, we came across another collaborator: Chris Scott. Chris is really strong in the Flex to Java and Flex to ColdFusion department, plus he's released his own Flex framework: Swiz. Let's just say he knows his stuff. We are leaning on him to integrate the Spring Framework into our adapters to make them simple to use. Spring abstracts out a bunch of configuration headaches when dealing with these enterprise services, so it only makes sense to include it in our adapters. Chris is working on the Spring implementation for our first adapters, the JMSAdapter (Spring configurable), and the MailAdapter. Going forward, a lot of the work Chris is doing will set the groundwork for our pattern of how our adapters work. We're very lucky to have him on board with this project.

This announcement however, is not all fluff and no stuff. We already have something ready to give to the community. The first piece we wanted to deliver was a messaging interface for sending mail; i.e. We wanted to create the BlazeDS/Flex equivalent of CFMAIL. Well, we have a custom messaging adapter (MailAdapter) and the corresponding SWC that will let you send email from your Flex application without any additional server-side code. Now, sending a mail message from Flex is as easy as MessageSender.sendMail(messgae:MailMessage). This is only the tip of the mail iceberg, however. The plan is to evolve this custom adapter into a complete POP3/IMAP interface for Flex. The first piece though is just getting mail to send, and we have that today. We will also be breaking out a RPC component to do the sending of mail only.

So, where are we going with this? We have a few things on our radar to implement, but no real timetable to do it as we all have day jobs which require attention. First up is RTMP. We are planning on implementing RTMP (engineered from Red5's example) into the BlazeDS MessageBroker servlet (or maybe we can get Adobe to just do this and save us the pain). Like I said earlier, we also plan on fleshing out the MailAdapter to support full blown IMAP and POP3 messaging. Another big announcement is that, as a part of creating FlexServerLib, Mike is planning on rolling dpHibernate into FlexServerLib. So, right away, we'll have dpHibernate, a JMSAdapter, and a MailAdapter available as part of FlexServerLib.

I really think that BlazeDS is somewhat overlooked when it comes to building Flex applications. We are aiming to bring more functionality, relevant functionality (think porting cool ColdFusion functionality to BlazeDS), to BlazeDS and enabling powerful applications for Flex developers, while reducing the amount of server-side development. All that has to be done, server-side, for most components of FlexServerLib is to configure the adapter's settings in messaging-config.xml or remoting-config.xml, and include the relevant jars in your BlazeDS deployment. It's as easy as that.

We've already started to recruit contributors as well. Our first two contributors, outside of the core project leadership are Brian O'Connor and Ivan Latysh. Brian is another member of the Universal Mind team and brings a great deal of experience with LCDS and BlazeDS to the table. Ivan has actually contributed to BlazeDS (an EJB adapter), but that contribution has been put off a version by Adobe. I saw this as an opportunity and asked Ivan if he'd like to add his contribution to FlexServerLib. He gladly accepted our request and will be adding it to the repository soon.

What would any open-source project be without sponsorship? Well, we have two firms sponsoring the project. They are, in no particular order, Digital Primates and Universal Mind. These two firms are the only ones that are going to be able to provide you with any project-approved professional services you would need in regards to support and advanced development around FlexServerLib. We also have a third sponsor: JetBrains, the makers of IntelliJ IDEA, the absolute BEST Java (and now Flex) IDE around. JetBrains has kindly donated IntelliJ licenses to the contributors of FlexServerLib. All the more reason for you to become a contributor, a free IntelliJ license to use on your FlexServerLib work.

This project is being hosted at Google Code, and the SVN repository is already open and ready for you to take up. Feel free to drop any of emails or questions in the comments and we'll try to answer as best we can. Contributions, questions, and the like are all welcome. Feel free to sign up for one of the mailing lists, download the code, give us feedback on what we hope will be a great community resource.

Posted by: Andrew Powell

Categories: Java , ColdFusion , Flex , General , JMS , Spring , Universal Mind , Hibernate , Air , WebNext 9 comments

Nov 11 You Don't Mess With The SpatialKey


DSC00185
Originally uploaded by tom_link

Recently, the SpatialKey team had a chance to get together at a client site. We took some time for some team bonding while we were there. What better way to bond than over automatic weapons? We got a chance to visit a firing range and squeeze off some rounds on a M4 and Glock 22. It was good times to be had by all.

Posted by: Andrew Powell

Categories: Java , ColdFusion , Flex , SpatialKey 0 comments

Oct 23 My 360|Flex Session Is Online

Thanks to Ted for getting these posted up.  I had almost forgotten about these:

Posted by: Andrew Powell

Categories: LiveCycle ES , Java , Flex , Conferences , BlazeDS , Spring , Adobe , Universal Mind , Hibernate , MOM , WebNext , Speaking 0 comments

Oct 22 Speaking At FlexCamp Boston

I just got word yesterday that I will be speaking at Flex Camp Boston on December 12th.  Brian Rinaldi does a great job putting this show on and deserves all the credit for the success it has become.  The agenda looks like it's going to be yet another good show.  A lot of quality speakers from Adobe and various other consulting firms, as well as Brightcove.  Come for the day, it's the best deal on a Flex show you can get.  

I will speaking on, and demonstrating, the Merapi framework.  I promise, I'll bring all my nifty samples like GPS, RFID, and maybe something new....

 

Posted by: Andrew Powell

Categories: Merapi , Java , FlexCamp , Flex , Conferences , BlazeDS , Spring , Adobe , Universal Mind , MOM , WebNext , Speaking 0 comments

Oct 14 Remoting From Java To ColdFusion By Example

This week, I've gotten the chance to work on a pretty slick proof-of-concept for a client. It's always cool to have a little bit of R&D time to play with some ideas. One of the requirements was that we send data as compactly as possible in order to minimize the bandwidth used from client to server over a low-bandwidth connection. Well, if we're trying to be efficient, the most efficient protocol I know is AMF. A few months ago (July 2008), Adobe announced the Java AMF Client as a part of BlazeDS. What this nifty client does is allow you to make AMF remoting calls from Java to any AMF endpoint including, but not limited to: BlazeDS, LCDS, and ColdFusion. Since we were working with a Java client talking to ColdFusion, this seemed, to me, to be the best and most efficient solution for moving data over low-bandwidth connections. Tom Jordahl has blogged about this a little bit, but has not, as yet, posted a complete sample for talking to ColdFusion over AMF from Java. Here is such an implementation for your digestion:

package com.universalmind.util;
   import flex.messaging.io.amf.client.AMFConnection;
   import flex.messaging.io.amf.client.exceptions.ClientStatusException;
   import flex.messaging.io.amf.client.exceptions.ServerStatusException;
   import flex.messaging.messages.RemotingMessage;
   /**
    * @author Andrew Powell
    */
   public class ColdFusionAMFSender {
    /**
    *
    * @param args the arguments, in order required, to pass into the CFC method
    * @return the value returned from the CFC
    * @throws ClientStatusException
    * @throws ServerStatusException
    */
    public Object sendAMFMessage(Object[] args) throws ClientStatusException, ServerStatusException {
    // Create the AMF connection.
    AMFConnection amfConnection = new AMFConnection();
    // Connect to the remote url.
    String url = "http://{yourservername}:{yourport}/{yourcontextroot}/flex2gateway";
    try
    {
    amfConnection.connect(url);
    }
    catch (ClientStatusException cse)
    {
    System.out.println(cse);
    return null;
    }
    String sourceName = "full.path.to.your.CFC";
    RemotingMessage message = new RemotingMessage();
    message.setMessageId(flex.messaging.util.UUIDUtils.createUUID());
    message.setOperation("remoteMethodName");
    message.setBody(args);
    message.setSource(sourceName);
    message.setDestination("ColdFusion");
    return amfConnection.call(null, message);
    }

   }

Posted by: Andrew Powell

Categories: Java , ColdFusion , BlazeDS , Adobe , Universal Mind , MOM 2 comments