Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is this possible?

 
Ransika deSilva
Ranch Hand
Posts: 524
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
The company which I am working maintains a database to keep the details about the employees. It is having an Intranet also. There is an application where any employee can browse the details about another employee by name, experties, location of work, and projectwise etc.
What I want to ask from you all is, whether is it possible to have a similar kind of a mobile application developed by using J2ME. I am sure this is possible, but just want to know what are the things which I have to consider.
Thank you in advance.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it is very possible. All you need is a Servlet that will return the value, usually just a string, of the search/request, then display that on the Mobile Device. A simple criteria Form is all you need to allow them to enter the data to search on.

Mark
 
Ransika deSilva
Ranch Hand
Posts: 524
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark & All,
Well tell you the truth I am very clueless about J2ME, so I have to ask this question. In your reply you have mentioned about using a servlet to perform my task, what I want to know is, does J2ME laso have servlets too? I would be really greatfull, if you can give me the basic steps that I have to follow to accomplish this.
Thank you very much in advance....
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, no Servlets don't run on Mobile devices.

basically you have a J2ME application that is two forms. one that allows the user to enter the search criteria, and one to display the results.

In the entry form, the user enters their criteria, selects the "submit buttim" this will use an HttpConnection to call to a Servlet that you have running on a public webserver. It is also posibble to do Socket connections or secure socket connections for your task too that can connect to a network, but the simplest and fastest route is through a web server.

If you want to learn about J2ME, I highly recommend Apress's J2ME book by Jonathan Knudsen. Within 2 days I was able to write my first J2ME application from what I learned in that book.

Mark
 
Ransika deSilva
Ranch Hand
Posts: 524
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thank you for the answer. Now most of the things are clear. Yes I will certainly buy come books on J2ME. But the problem is in my country it is a little bit hard to find them, any way I have ordered them so I might get them very soon. By the way is there an electroni copy of the book which you have mentioned. I found out only 1 chapter(chapter 5).
Thank you once again.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nah, unfortunately I doubt that there is an electronic copy.

Good Luck, I think you will find it fun to develop your application.

Mark
 
Ransika deSilva
Ranch Hand
Posts: 524
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Sorry for bringing this thread back. As you know I tried to figure out web services and unfortunately I don't have much time to do so. So I was thinking of achieving what I want through the use of Servlets. This is the picture I am having in my mind about doing what I want through Servlets.
1) I have to create a servlet which takes 2 parameters and it should be hosted on a website with a specific URL. The 2 parameters are the search criteria and the other one is the search word(ex:name)
2) When the user keys some word, select the criteria and press search, the phone should connect to the servlet and pass the parameters.
3) The servlet should take the 2 parameters and connect to the database and query with the given 2 parameters.
4) Then it should return the values back to the phone.
I just want to know whether what I have in my mind is correct or not. If it is incorrect I would be really grateful if you correct me. Thank you very much for all the support given so far and anticipating further assitance from you.
Thank you in advance....
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That sounds perfect to me.

In essence it really is already a "web service", you just don't have to worry about creating WSDL docs etc...

Don't be surprised to find out the simplest solution is also er always the best solution.

Mark
[ August 25, 2004: Message edited by: Mark Spritzler ]
 
Ransika deSilva
Ranch Hand
Posts: 524
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark,
Thanks a lot for the answer. Even I thought that this is some what perfect. But just wanted to get an expertice comment on this cause this is my first major project on J2ME. Thank you once again.
 
James Reilly
wrangler
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BTW, there's an introductory example of a MIDlet accessing remote databases using an intermediate servlet proxy here: http://www.forum.nokia.com/files/nds_disclaimer/1,6673,4347,00.html

Cheers,
jim
 
Ransika deSilva
Ranch Hand
Posts: 524
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,
Thanks a lot for the help you have offered to me. These things are really helping me. Day by day I am able to achieve my targets becuase of you guys.Thanks once again.
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi James,

I was looking at the link you provided and the sort of API they have. I understand that we can't pass ResultSet from J2SE to J2ME app but can't we define custom objects to do it? Why we have to really have JDBC Similar API for J2ME? I guess we can restricts data types etc by that API but is that all we want to achieve?

I guess what I am asking is-- please provide your views of how the Nokia API really is useful if anyways servlet can query databases? How about just creating custom resultset object and passing it to J2ME app from Servlet?

Thanks
Maulin
 
James Reilly
wrangler
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Yes a servlet can easily return a custom result set to a
remote app like a MIDlet. Ideally, I think one first designs the message sequence chart and request/response protocol between the MIDlet application and servlet, based on the problem to be solved. One probably also designs the screen map of MIDle UI screens and set of screen transitions at the same time.

There are many cases where a MIDlet may only have a relatively small set of request/response pairs, and a fixed set of well-defined data in those that the MIDlet needs to handle.

br,
james
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic