--- In flexcoders@yahoogroups.com, "saritha" <[EMAIL PROTECTED]> wrote: > > Hi, > > How to communicate between Flex and Java? >
There are two main ways and which you choose depends largely on the future needs of your clients. If you need a generic API on your server because you are going to implement a variety of clients, or you want to open up your application for other people to code against, then a web service on the Java end and HTTPService in your Flex code is definitely the way to go. However, if you are looking for speed and small packet size and squeezing the most out of your app, then you should use AMF via RPC, i.e. remote objects and BlazeDS. You'll have a tight binding between your types on both sides and the API can be very clean and tailored specifically to your needs. I find it more elegant and there's less code to maintain. I have used both but prefer the remote object approach as I think that coding for possible future scenarios tends to unnecessarily dilute my current app and I'd prefer to take the performance advantages of AMF. It's a trade-off I am happy to make and you need to make the same judgement.