09-10-2008, 01:41 PM
Thumbs Must Hurt
Join Date: Apr 2006
Post Thanks: 0
Thanked 0 Times in 0 Posts
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.
Karl G. Kowalski
Owns a RAZR
Develops for BlackBerry
So next phone will be........an iPhone 3G!