Welcome!

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

Adobe AIR Development

Reply
Contributor
ChillyBin
Posts: 22
Registered: ‎01-28-2011
My Device: Not Specified

ORM database for PlayBook?

I have searched the forum and there doesn't seem to be any mention of an Object Reational Mapping type of data persistence for PlayBook development.

 

This link from adobe mentions ORB in the works and was back in Jan 2009:

http://www.adobe.com/devnet/air/flex/articles/sqlite_db_api_in_air.html


I assume it still is in the works?

 

From what I have heard about iOS's Core Data, it is faster and much better to work with than SQLLite. Anyone know if something like this is coming to AIR or PlayBook/QNX?

 

 

 

Please use plain text.
Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: ORM database for PlayBook?

hey chillybin,

 

there are other options available for the playbook (or AIR in general) besides sqlite. The quickest one i've read about is the Local Shared Object route.

 

here is a link with more details and drawback and advantages of the types of storage available on the AIR platform:

 

http://blog.crankybit.com/notes-adobe-air-local-data-storage-options/

 

also here is a link to the Shared Object class:

 

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/SharedObject.html

 

hope that helps. good luck!

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: ORM database for PlayBook?

 


ChillyBin wrote:

I have searched the forum and there doesn't seem to be any mention of an Object Reational Mapping type of data persistence for PlayBook development.


The PlayBook is not special in terms of its SQLite support... it's pure standard AIR flash.data.  That means you can just search for "ActionScript3 ORM" and such things to find what options are available, and I don't expect we'll see any PlayBook-specific support for this (nor should we need to).

 


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
noahnu
Posts: 138
Registered: ‎01-09-2011
My Device: Blackberry Tablet OS

Re: ORM database for PlayBook?

In the documentation for SharedObjects I read this:

 

"When users decrease the amount of disk space available, some local shared objects may be deleted."

 

Does this mean SharedObjects are not a reliable method of long term data storage?

From,
Noah NU
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: ORM database for PlayBook?

Although it remains to be seen what QNX will do about that, I've been proceeding on the assumption that SharedObject will be reliable as we're not running in a web browser environment on a desktop machine.

 

The SO data goes into File.applicationStorageDirectory and, unlike in a web app, an AIR app can write data there using the filesystem calls and it doesn't just get deleted at random; there's no reason for the AIR environment to wipe out SO data at random either.

 

I personally woudn't store much data in those anyway, as the implementation is "opaque" -- I don't know how it works in terms of performance and such.  I use it for app-configuration and similar small pieces of data, but generally use the filesystem for most other stuff unless it should be in a database.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
noahnu
Posts: 138
Registered: ‎01-09-2011
My Device: Blackberry Tablet OS

Re: ORM database for PlayBook?

I thought a SharedObject is more efficient than a database. Anyways is there a known size limit for SharedObjects? or even Databases in general?

From,
Noah NU
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: ORM database for PlayBook?

It's unclear whether this applies to AIR, but this page documents the default max size as 100KB.  It may not have a limit in AIR, or in PlayBook.

 

There is no size limit for a SQLite database other than available filesystem memory.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
UberschallSamsara
Posts: 1,029
Registered: ‎12-29-2010
My Device: PlayBook, Z10 LE, Dev Alpha C

Re: ORM database for PlayBook?

I recently read this tutorial on SharedObject and it goes into detail on the return status of method calls and some of the error checking you should do when you use an SO.  It also discusses what happens when you hit the 100K limit.  Be forewarned that it is quite dated (2005), so be sure to check the latest ASDocs before grabbing any of the code and just hacking away.

Please use plain text.