BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 09-10-2008, 07:39 AM   #1
MobileDeveloper
Thumbs Must Hurt
 
Join Date: Jun 2008
Model: 8100
PIN: N/A
Carrier: Vodafone
Posts: 134
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, 09:32 AM   #2
simon.hain
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
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, 01:24 PM   #3
holy3daps
Thumbs Must Hurt
 
Join Date: Apr 2006
Location: Boston
Model: 8900
Carrier: AT&T
Posts: 98
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, 01:31 PM   #4
MobileDeveloper
Thumbs Must Hurt
 
Join Date: Jun 2008
Model: 8100
PIN: N/A
Carrier: Vodafone
Posts: 134
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, 01:41 PM   #5
holy3daps
Thumbs Must Hurt
 
Join Date: Apr 2006
Location: Boston
Model: 8900
Carrier: AT&T
Posts: 98
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


PROFACE PFXSP5B10 Processor Module picture

PROFACE PFXSP5B10 Processor Module

$1500.00



Schneider 140CPU65150 Processor/Controller MODICON Quantum NEW picture

Schneider 140CPU65150 Processor/Controller MODICON Quantum NEW

$2899.00



AlphaSmart Neo2 Laptop Word Processor, . picture

AlphaSmart Neo2 Laptop Word Processor, .

$90.00



New Factory Sealed AB 1747-L542 SER B SLC 500 5/04 CPU Processor Unit 1747L542 picture

New Factory Sealed AB 1747-L542 SER B SLC 500 5/04 CPU Processor Unit 1747L542

$278.00



KLA-Tencor Processor PIII-850	0042621-000 picture

KLA-Tencor Processor PIII-850 0042621-000

$900.00



New Sealed AB 1747-L543 SER C SLC 500 CPU Processor Unit Module 1747L543 picture

New Sealed AB 1747-L543 SER C SLC 500 CPU Processor Unit Module 1747L543

$703.23







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