Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

Posts: 29
Registered: ‎08-19-2009
My Device: Not Specified

Local files vs. remote files?

Good Day All,


I'm building my webapp using JqueryMobile and some other plugins. I initially began developing using the .php extension and then when it came time to load onto the playbook simulator, it gave me a blank screen. I then changed the file extension to .html and it seemed to work fine.


In my app, I use a lot of php to pull information from a database (i.e. dynamic dropdown menus and the like) When I change the extension to .html, the php doesn't work anymore Smiley Sad


What is the benefit of having the source files loaded on the playbook, versus having the config file fetch the same index file from my website? The app uses databases for pretty much everything, user account, programs, etc.


My thought is to have my app just reference the external file and that would allow me to jump around the php problem i'm having.


Any thoughts? My deadline is soon!




Posts: 34
Registered: ‎07-14-2011
My Device: BlackBerry Curve 9300
My Carrier: Orange

Re: Local files vs. remote files?



You can write a web service in PHP that returns the items of your dropdownmenu in a JSON/XML format. The second step would be create a Javascript function that pulls these items and add them to your dropdownmenu. This approach also make you code cleaner because the separation of the server side code and the client code is clearer. 


The benefit of get the resources of your application (html, images, css, javascript) directly from the device is that they load faster and also you may want to give the user some Offline Features. I think that one of the purposes of create a web application with webworks is to take advantage of the Offline Capabilities of the platform.


For example, once the items of your dropdownmenu are fetched via ajax, you can save them in a database on the playbook and if the playbook looses his internet connection, the user can continue using the application.


I hope this could help you!

Posts: 382
Registered: ‎05-19-2008
My Device: BlackBerry Torch
My Carrier: AT&T

Re: Local files vs. remote files?

Isn't PHP a server side scripting environment? You can't reference PHP files locally on the Playbook because there is no PHP engine running to process those files. Unless i'm missing something here, I think you are headed down a dead-end road. If you want to have client side processing (ie code running without hitting some server), you pretty much have to use javascript.

Check out my book on BlackBerry Development for Java.
And my other really really old book
My Apps: FlashKids