INTEGRATING FLEX WITH JAVA USING SERVICES
203
Figure 7-2. Flex and Java integration analyzed via a 22 matrix that measures situations on server-side
refactoring complexity and payload size scales.
Take a closer look at Figures 7-1 and 7-2. The legends attempt to explain all the possible scenarios.
These diagrams should give you a high-level perspective and might prove useful to refer back to when
making initial choices.
Some of this may seem new and unfamiliar at first, but we will be getting into the nuts and bolts shortly. As
soon as we walk you through the examples, everything should appear lucid and straightforward.
Leveraging HTTP Calls and Web Services
Simple things first! Let’s start by integrating Flex and Java using simple HTTP calls and web services. One
of the well-known and often talked about benefits of open standards like HTTP and web services is
interoperability, with service consumption agnostic to implementation. In other words, you fire up a web
site using a URL the same way, irrespective of the language the web site makers use to implement it, and
you consume a web service the same way, whether it’s written using Java, .NET, or the LAMP stack.
Therefore, much of what we say in this chapter is not specific to Java; it is just as applicable to PHP,
Python, Ruby, C#/.NET, or any other technology on the server. The only requirement is that the
technology that Flex integrates with supports HTTP calls and the standard web services specifications.
You’ll notice some of this conversation bubbling up again in Chapter 10, which discusses mashups; in
Chapter 12, which covers PHP integration; and in Chapter 13, which talks about working with Web 2.0
APIs.
Get AdvancED Flex 4 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.