Hi!
Well, like so many other answers, the answer to your question is: It Depends.
The simplest method is using basic sockets/tcp. However, this may be problematic on the server side of things, because most firewalls dislike arbitrary sockets being opened to allow incoming connections. Using HTTP and a web server/service/servlet is "better" in this sense, because HTTP traffic is fairly well understood by firewalls and corporate entities have less issue opening up an HTTP port (80) or a servlet port (usually 8080) and allowing connections through those. If you're going to secure the connection, your best bet is to use HTTPS which adds complications all on its own.
Again, it all depends on what you're trying to do. If your application is trying to retrieve cookout recipe data sitting in a file on a server from your broadband modem in your home, a socket will work perfectly well. If your application is trying to retrieve pricing and invoicing data from your corporate database to support a bid your company is in competition for acquiring, you probably want to use HTTP+SSL. Once you define your context and the security issues, then you can decide which is the best solution.
Cheers,
karl
__________________
Karl G. Kowalski
---------------
Owns a RAZR
Develops for BlackBerry
So next phone will be........an iPhone 3G!
|