Search code examples
javaapache-flexspringremotingblazeds

Pros and cons of using BlazeDS or web services as the remoting and messaging technology between Flex view layer and Spring business layer?


In my company, we are going to use Flex3 for the presentation layer of a new financial web application and Spring for the business layer but a debate is still going on regarding the best messaging/remoting technology. Can you share your own experiences in terms of pros and cons of using one or the other technology?


Solution

  • In my experience, use BlazeDS unless you need to use web services which a variety of technologies can access.

    BlazeDS

    Pros: Less server intensive, less client parsing time, smaller data package (it's binary), meaning it's overall a faster call. Can do publish/subscribe as well as method invocation.

    Cons: Not compatible with non-Flex front ends (although it's open source, so in theory, it could be.)

    Webservices

    Pros: Well established, pretty much cross platform. Easy to read and translate issues.

    Cons: Much more verbose. If you use the internal translation of XML to AS Objects, the client has to do some intensive parsing. If you use the objects as XML, encapsulation will be weakened (objects outside of the call would have to know detailed information about the XML object, meaning refactoring can be problematic.)

    For a good comparison on actual databases with actual numbers, see James Ward's Census application.