02-15-2011 02:01 AM
Hi I'm Indra a beginner developer of BlackBerry WebWorks Application
Here is the scenario...
I want to building a Blackberry WebWorks (widget) that is used as a portal to a remote website. Most of the pages are remote. Last time I chat with Adam Stanley (astanley) in BlackBerry Devcon Asia is about if I want to build an application in webworks so that my application can retrieve data from web server included with database like mysql. He told me to build an application with JSON and just using PHP in my server. Well right now I'm so desperate on how an BlackBerry application can connect to a web server (my private server not from RIM)?
If I'm not bothering you guys,, please give me the link to resolve my problem. And/or please give me a sample code for the client side and server side on how to communicate each other using JSON? I've search for it and google still give the java sample application not webworks application. Thank you for your time and I'm sorry if my english is look terrible.
Please mail or reply for this message if you can resolve my problem. Thank You.
02-15-2011 09:25 AM
I'm not sure I understand what specifically you are trying to accomplish.
Do you want to build a WebWorks application to simply open and view your remote web page running on your web server? And this remote website is built using PHP?
Just trying to clarify
02-15-2011 11:55 AM
Well what i'm going into is that I want the WebWorks App on the phone itself can parse the data from my server. My server is built with Apache using PHP and MySQL. In my application it should be the data from MySQL come out and I can display it on the WebWorks App in my schema. Mr. Adam Stanley told me that I must using JSON to bring the data to my application. But the problem is how can WebWorks Application get the data from my server. From the theory it must be easy,, but in the code itself, HOW ? What API and how can I use it? Need the sample code....
02-15-2011 12:07 PM
Getting the data back to your application is accomplished via using AJAX and XMLHttpRequest. I have a post about how I tackled this process in .NET. It won't map one-to-one but the same concepts can be applied to PHP.
02-15-2011 01:08 PM
Well,, I must thank you for your help and atention..
But honestly I can't understand what your .NET page trying to do... It because my lack experiences of other languanges. I really don't know how to bring the data using JSON to my App with PHP syntax.
02-15-2011 02:16 PM
This article would be a good start:
02-15-2011 02:28 PM
Yeahh,, I think so...
Maybe it a good start.
Well,, It is almost dawn right now in my local time.
Maybe tomorrow if it working I will give the solution to my problem so other people like me can fix their problem. I wish it could happen that way..
By the way thank you for your help. Other persons from RIM that I know doesn't give me any helps because they are very busy or on vacation.
02-15-2011 06:04 PM
Hey indrakusumax, You're question is too vague, I think you need to get onto google and read up on the following:
JSON in PHP
Ultimately you have alot of reading ahead of you plenty of trial and error and perhaps some hair pulling out moments, once you've got a hang of things you should come back here with some specific questions you will find more help then.
02-21-2011 08:50 AM
I was busy yesterday and I can't post any messages because of that...
well.. I was tried to build application using XML (not JSON) and it's work.
Later on, I will try to parse the JSON format so my problem will solved soon.
If I successed, I will bring the simple source code for you all...