News for hackers. Stuff that matters.
Re:A Web Developer Goes Native (with Android) by briancooley on Monday September 13, 2010 @12:28PM (#1687076)
I know that it's the go-to solution for small, simple storage, but why on earth do mobile platforms have schema-driven data stores by default?

There are a few other easy ways to store data[1] on Android. For example, you could use SharedPreferences for lightweight data. You could write anything that implements the Serializable interface to a file on internal or external storage. I don't know much about Redis, but if all you want to do is persist a key-value store, create a HashMap in your app and write to and read from disk.

You can do something similar with an NSDictionary or NSArray in iOS. [2]

[1] http://developer.android.com/guide/topics/data/data-storage.... [2] http://developer.apple.com/library/mac/#documentation/Cocoa/... (see initWithContentsOfFile: and writeToFile:atomically:)

Re:A Web Developer Goes Native (with Android) by mbleigh on Monday September 13, 2010 @01:47PM (#1687450)
I am aware of SharedPreferences, and serialization is certainly an option, but ultimately these don't solve the main problem I've experienced. Serialization requires a lot of manual work and it may not scale particularly well for middle-weight and up. I just think that the kinds of data stored in mobile applications lend themselves more to some of the various NoSQL patterns than something like SQLite.
Re:A Web Developer Goes Native (with Android) by asher on Tuesday September 14, 2010 @12:55AM (#1689524)
Can't you treat SQLite as a key-value store? Create a table with two columns: key and value. Blobs can be pretty big.

Seems to me that a relational DB can easily impersonate a hash, but not vice versa.