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

Java Development

New Developer
Posts: 2
Registered: ‎08-13-2008
My Device: Not Specified
Accepted Solution

A couple of questions from a newbie

[ Edited ]

I will begin development on a small application for the BB in the next month or so.  Right now I am tasked with writing the requirements and use cases for the application.  Since I have zero mobile development experience I thought I would ask a few questions before I dive right in.  I am hoping to avoid killing the battery life with too much application activity or having an application that is really slow.


I am targetting the BB8830 for this application (internal corporate use)



     1. Is it better to store data into a flat file (xml) or database (such as Sybases SQL anywhere product) when processor, memory, and battery efficiency are considered to be the most important. 

     2. I have seen a lot of documentation on the push functionality through the BES and would like my application to link up with our corporate systems through the BES (for security reasons); can the BES during its push action download files from the phone (such as the xml or database files) and hand them off to a windows service to be processed?  Also if can do this can, upon success, it trigger an event within the third party app I am to write? (mainly to clear the data file so that it doesn't get to large)


Thanks in advance.



Message Edited by BaneNeo on 08-13-2008 04:51 PM
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: A couple of questions from a newbie

Not easy questions, and you will get different answers from different folks too!  it might be useful to know a little something about your application to make the most useful comments.


I would suggest that you review the following video, that talks about the constraints of the mobile platform.



I actually disagree with a major tenet of this presentation - "the best wireless solutions use wireless the least" - but thinking along these lines does focus the mind on such things as synchronization times, and currency of data on the device.


I suggest you review this, review your application and then come back with some more questions.


Anyway, here are some answers to your questions now:

1) How is it better to store data.  Of course I'm going to say it depends.  The BlackBerry is a Java machine, so works well with Objects and has a object storage model, so it will store objects that you create.  So if your data lends itself to be stored in this way, then you can use the native BlackBerry functionality.  You can build on top of this some sort of table storage mechanism (which is what we do).  Or you can store file like structures on the SD Card in your device, in which case you will need to serialize the data in and out to it.  With all these mechanisms you will have to develop some process to get this data and keep it up-to-date.  In my experience, all these options are very low impact on the battery and processor - can't comment on the memory because that depends on how much data you actually want to have on the device!  The most significant impact ifsthe network traffic to keep it up-to-date.


SQL Anywhere is relatively new on the scene, and I've reviewed the promotional stuff for it, but not the product.  If you search on this forum, I believe someone from Sybase has posted a link to get a developer version for free.  I've not done this yet and I've not seen any reviews and have no feeling for its impact on battery, etc.  However it sounds really useful because it handles synchronization itself.


2. You should definitely use the BES link between the device and the corporate data because anything transmitted down this link is compressed and encrypted.


Re downloading files, I've not investigated doing that with PUSH, my initial reaction is that it doesn't.  I'm not sure that isn't the wrong way round anyway, shouldn't the BlackBerry be pushing a file to the Server (BES PUSH is from Server to BB).  I don't think anyone has done it, but I see no reason why you couldn't have some sort of FTP Client on the BB pushing data to an FTP Server.


Re actions taken when the download is complete, you could trigger some Server processing with an email (in fact you could attach your file to an email), send an SMS, or do some sort of http web request.  SImilar sorts of things can be done in return to get an indication that you can delete your data.


I know this has only scratched the surface, and I'm sure other people will have different options and considerations, but I hope that this gets you moving.



New Developer
Posts: 2
Registered: ‎08-13-2008
My Device: Not Specified

Re: A couple of questions from a newbie

Thank you for the insight.  I think I was looking the BES PUSH in the wrong light.  I was looking at it from the perspective that it was considered a push since the server was initiating the contact with the phone (which it does I believe) and not realizing that it also means that the communication is one way (server to phone).



Thanks again.

BlackBerry Development Advisor
Posts: 15,882
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Feeling stupid--need help with replacement phone

Posts: 67
Registered: ‎01-13-2009
My Device: Not Specified

Re: A couple of questions from a newbie

Have you had any success with this task of downloading data to your server from the BlackBerry. I am looking at a similar task in which I am trying to send data to the BES from a java application running on the BlackBerry.

Additionally what method did you use for your "hand off" to the third party application in your second question? Is this something that BES does automatically? I have been considering a Java app or a wsdl file as the third party app itself, but have been unable to get the data to it.

Thanks, I appreciate the help