• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

a weird question.....

 
Andres Gonzalez
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sort of new on this topic. I've read about the kvm, midp, cldc and some other stuff. I've even found code to access servlets using a midlet. But, is there any way that i can have a small application that queries an external database and prompts the results back? For instance, can I use a PDA to access a DB located miles away? I don't know if I'm misunderstanding everything, but I've only seen applications that run on a device using its own resources, not accessing external ones. If it is possible, what packages do I use? can you guys give me some documentation to start reading...
thanks
 
Derek Smith
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Absolutely! J2ME includes packages for handling network communications including HTTP. So, in the same way that you could build an n-tier application that accesses a DB via a browser, you can build one that uses the mobile device as the client. What's even better is that the client can be very rich since Java is a full blown language, not just scripting (as in HTML or WAP).
Check out MIDP package javax.microedition.io for usage.
 
Andres Gonzalez
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thx Derek. I wanna create a simple application like the one I described above but without using any WAP, i don't want my user to download the website to the device. I just want the user to perform some operation on the device and the update will automatically be forwarded to a database located outside, of course via wirless communication. It's like for example an SMS message, the user just types the message and clicks send, but the message service provider is in charge of all the hard work (receiving the message, redirecting it,etc..). It's something like this what i'm looking for. I've browsed to so many websites but I just can't find the information i need to start up, any suggestions?
 
Mark Herschberg
Sheriff
Posts: 6037
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer is what Derek said above. J2ME has nothing to with WAP.
J2ME supports HTTP. Other protocols may or may not be supported, depending on what the J2ME vendor provides. You simply write a client, and have it communicate whatever you need to the server using the HTTP protocol. The server then does what it needs to do, e.g. accesses a database or sends an SMS message, and may or may not need to reply to the client.
--Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic