Friday, December 14, 2007

BlazeDS: More Free Flex to Java EE Integration Options

Up until now, I have primarily used Flex's HTTPService and WebService to communicate between my Flex clients and the Java EE server-side business logic. With Adobe's recent announcement of the new free (as in "free beer") BlazeDS, there are more and highly productive techniques available at no charge for communicating between a Flex client and the Java EE server. Adobe has also announced plans to move portions of BlazeDS to open source (as in "free speech"). In other words, some highly useful Java EE to Flex communication mechanisms that used to have a license cost and were not open source (Flex Data Services or Adobe LiveCycle Data Services ES) will now be, at least in part, both freely available and open source.

The Adobe announcement and BlazeDS web page, along with seemingly countless blogs, talk about the basics of BlazeDS. Therefore, instead of rehashing the features of BlazeDS in detail, I'll focus in this blog entry on listing some useful resources for additional information on BlazeDS.

As part of this announcement, Adobe also announced release of the Action Message Format (AMF) specification. Besides greater development ease, other advantages of the new approaches available to developers for Java EE-to-Flex communication include potentially significantly greater performance with binary formats compared to the text/XML approaches used inherently with HTTPService and WebService. That being said, there are advantages to the HTTPService and WebService such as extremely loose coupling and high degree of standards orientation.

Adobe is releasing BlazeDS under the LPGL (version 3). There is a beta version available now and the open source version is anticipated to be available in early 2008. I was curious about Adobe's reasoning for employing the GNU Lesser General Public License (LGPL) for BlazeDS when they have already announced Flex's open source release under the Mozilla Public License (MPL), but the BlazeDS FAQ addresses this question and states that BlazeDS may be used outside of Flex and thus had different open source licensing needs than those of Flex. I find this only slightly concerning because the FAQ recommends (more than once) that lawyers (or "legal experts") be consulted if distributing BlazeDS. However, the benefits of using open source BlazeDS may be worth it to some organizations to justify the legal review and advice. Besides, it is probably best to conduct such reviews anyway with all licenses. That being said, I have really come to appreciate licenses like the Apache Foundation's Apache License Version 2 software license. They just seem easier to understand and adhere to.

Speaking of the LGPL, there are some interesting sites with more information on this. The Free Software Foundation provides an overview of licenses and, related to the GNU project, includes an article Why You Shouldn't Use the Lesser GPL for Your Next Library. Note that this last article is oriented to software library developers rather than software library users. My understanding is that the LGPL has significantly weaker copyleft protections than the ordinary GPL and that organizations are typically allowed to include LGPL-licensed libraries in proprietary products. However, I'm not an attorney and all these licenses muddy the situation and make things confusing. Popular libraries using the LGPL license include JFreeChart, JBoss Application Server (and most of its related projects), and Hibernate. This doesn't seem like too bad of company for BlazeDS. JBoss's justification for LGPL is interesting reading as well.

The BlazeDS FAQ addresses what constitutes remoting and web messaging. Remoting allows Flex developers to treat server-side Java objects as if they were local to Flex objects. Because it uses the binary AMF format, it will often be significantly faster than using text/XML. As the Web in Web Messaging implies, this form of communication occurs over HTTP. The thing that appeals most to me about Web Remoting is that Java Message Service (JMS) can be used as part of this.

It is important to note that BlazeDS does not have all the features of the LifeCycle product.

Here are some useful resources for additional details on BlazeDS:

No comments: