BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 09-10-2008, 08:39 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Jun 2008
Model: 8100
PIN: N/A
Carrier: Vodafone
Posts: 134
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default How To Interact with a web App or Server

Please Login to Remove!

Hi

I need to create an application that will connect to a server and access the stored data

Can any one please say how I should create such an application including accessing the server etc ?
Offline  
Old 09-10-2008, 10:32 AM   #2 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

use a webservice or another client/server architecture. the easiest solution depends on your used server framework
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 09-10-2008, 02:24 PM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: Apr 2006
Location: Boston
Model: 8900
Carrier: AT&T
Posts: 98
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you're looking for an answer to "how do I make a network connection in BlackBerry Java?" there are a number of resources available online. I can recommend reviewing the RIM BlackBerry Application Development PDF files, for BlackBerry-specific information. I also recommend Bruce Eckel's book, Thinking In Java, for generic Java-specific network connection information. Basically, it comes down to what kind of connection do you want to make? Are you trying to connect to a web-based server/service? Or will a standard socket/tcp connection work? All are possible, and you need to refine what it is you're trying to do, which is what simon.hain suggests: "the easiest solution depends on your used server framework."

Cheers,

karl
__________________
Karl G. Kowalski
---------------
Owns a RAZR
Develops for BlackBerry
So next phone will be........an iPhone 3G!
Offline  
Old 09-10-2008, 02:31 PM   #4 (permalink)
Thumbs Must Hurt
 
Join Date: Jun 2008
Model: 8100
PIN: N/A
Carrier: Vodafone
Posts: 134
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi

Can you please say which would be the most common and speedy method?

That would be enough for my current project
Offline  
Old 09-10-2008, 02:41 PM   #5 (permalink)
Thumbs Must Hurt
 
Join Date: Apr 2006
Location: Boston
Model: 8900
Carrier: AT&T
Posts: 98
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

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!
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.