BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 03-25-2008, 04:50 PM   #1 (permalink)
New Member
 
Join Date: Oct 2006
Model: 8700
Carrier: Voda
Posts: 10
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Distribute data with application

Please Login to Remove!

Hello,

excuse my newbie and hopefully trivial question.

What's the best way to distribute large chunks of structured textual data (think plain text CSV files, tables or xml etc.) with a BB application that 4.1 and earlier compatible? Do it in code? This would mean an app recompile with every new version of the data set - not a big issue - but isn't there some more efficient way of doing this?

Thanks,

R.
Offline  
Old 03-26-2008, 03:41 AM   #2 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

how would you read the data in? the bigger your data are the better would be a kind of compression, maybe using the zip-algorithm some company implemented a few weeks ago.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 03-26-2008, 03:59 AM   #3 (permalink)
New Member
 
Join Date: Oct 2006
Model: 8700
Carrier: Voda
Posts: 10
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Indeed, that's part of my question, compression would obviously be suitable for large sets of lexical data, but that's veering off the original question.

Is there anybody who implemented a dictionary or something similar? My app is not that different from that.
Offline  
Old 03-26-2008, 10:08 AM   #4 (permalink)
Talking BlackBerry Encyclopedia
 
richard.puckett's Avatar
 
Join Date: Oct 2007
Location: Seattle, WA
Model: 9020
PIN: N/A
Carrier: T-Mobile
Posts: 212
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is there a reason that you need to ship the data with your app? When I hear "strutured" I think XML (I'm one of those people who actually like XML). Could you not host your data on a web server somewhere and download it to your app over http? Pull it down as part of an initialization process and then periodically check for updates.
__________________
Do your homework and know how to ask a good question.
Offline  
Old 03-26-2008, 04:17 PM   #5 (permalink)
New Member
 
Join Date: Oct 2006
Model: 8700
Carrier: Voda
Posts: 10
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Just a simple text file(?)

Hello Richard,

thanks for the reply, I too like structured data (sorry to say, I'm not a massive fan of XML for its bulk and lack of readability).

I'd like to avoid live data transfers, some people still get charged per MB, and the data is sufficiently static to warrant a reinstall when they do get updated. In my opinion it also makes it easier to distribute the app (something about fewer moving parts...)

So any takers on how to bundle up data into the project? I can almost see end is nigh for MyTextAndData.java

radski
Offline  
Old 03-26-2008, 05:11 PM   #6 (permalink)
Talking BlackBerry Encyclopedia
 
richard.puckett's Avatar
 
Join Date: Oct 2007
Location: Seattle, WA
Model: 9020
PIN: N/A
Carrier: T-Mobile
Posts: 212
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm certainly a fan of having fewer moving parts as long as that really does keep the app simpler (and what with all the issues related to BlackBerry networking that might just be the case here).

So if you want to distribute data with the app you could put your data files into a resources folder (for convenience) and include those files on your rapc command line. Then, in code, use Class.getResourceAsStream(String) to get an InputStream. This is how I handle shipping configuration information in my apps.
__________________
Do your homework and know how to ask a good question.
Offline  
Old 04-09-2008, 07:31 AM   #7 (permalink)
Knows Where the Search Button Is
 
Join Date: Feb 2008
Model: none
Carrier: sprint
Posts: 24
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Wirelessly posted

Quote:
Originally Posted by richard.puckett
I'm certainly a fan of having fewer moving parts as long as that really does keep the app simpler (and what with all the issues related to BlackBerry networking that might just be the case here).

So if you want to distribute data with the app you could put your data files into a resources folder (for convenience) and include those files on your rapc command line. Then, in code, use Class.getResourceAsStream(String) to get an InputStream. This is how I handle shipping configuration information in my apps.
I would do as Richard advises, but I would compile it separately as a library, thus having 2 cod files. Then when you have to update, you only update the library, thus avoiding a complete reinstall with a possible reset.
Lionscribe
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.