Hello everyone,
I am a Flex+AIR newbie and just wonder if it's possible to
develop a layered FLEX/AIR application where only the presentation
layer is built in Flex and the business logic / DB access layer is
Java. But not in a web or J2EE context with a remote server.
The scenario I have in mind is the following:
1. A Flex application is deployed on the user's local machine
via AIR.
2. The user starts the application. So far so good.
-----------------------------------------------
3. On startup the application performs a method call on a
Java class located on the user's local machine's class path.
4. The method call triggers a multithreaded Java engine to
get started.
5. The Flex app "talks" to the Java engine and vice versa.
Several questions arise here:
a: How can a Flex app "speak" to Java classes? Is it possible
at all?
b: I heard of a "RemoteObject" tag. Is this the way to go?
c: Can a Flex app start a process on the local machine (e.g.
a JVM)?
d: Is it possible to deploy the Java JAR file "piggy-back"
with the Flex/AIR app?
Or e: Maybe I am on a totally wrong track. Can anybody
suggest a better solution?
It should be possible since Bruce Eckel of Adobe writes:
"However, a Flex UI is not limited to communicating with a server.
It can also communicate with a local application. Thus, you can
create an application in any language you prefer, even a dynamic
language like Python or Ruby, and use Flex to build a beautiful
UI." (
http://www.adobe.com/devnet/flex/articles/hybridizing_java_08.html)
Thanks in advance!
Best Regards,
Phil