Can Flex be used for a desktop application whose business logic is written using Java? Everything I've read about flex uses a remoting or http protocol to communicate with the backend via开发者_StackOverflow a J2EE server, so I'm not sure how that would work for a desktop app (unless an embedded j2ee server was running in the app).
Thanks, Jeff
It isn't unusual for a j2ee server to be running in the background even if no internet connectivity is ever required.
That being said, Adobe AIR has full access to executing remote programs. This would allow an Adobe AIR application to call a Java application outside of any server instance.
I think the easiest approach would still be to embed some kind of application server.
I worked on a project which use a Flash client with a Java server in 2003. Later I worked with a Flash client with a Java server in 2006. Both applications worked nicely, though I didn't code any flash/flex. On both occasions we streamed XML between the client and the server with the option to use HTTP pooling.
You can do this with Flex and Adobe AIR through the Merapi Project.
You can also consider that Flex runs the same both in AIR and in the browser, that said if you've a Blaze DS on the Java end of things - or granite ds for that matter - it's pretty straight forward. You can also consider that air has access to sqllite.
精彩评论