Reputation: 41
in any language class is common to have a notebook or something like that for writing new vocabulary, so I want to make an app for dealing with that in my japanese classes. App only has a few options: - Write a new word (Object with three string attributes, 'kanji', 'kanji reading in hiragana' and 'translation') in a list - Practice with all words of the list - Practice with all words in random order
I don't know what is the best way for make that, using internal storage? json or xml? (the list can grow a little bit...), sqlite? why?
Thanks!
Upvotes: 1
Views: 539
Reputation: 9182
So I recently released a word game app called Bingle, where I have stored about 35,000 words in the sqlite database. These words undergo a lot of changes in stats, and things like that. If you want to track statistics on your words, and your word base is fairly modest, go for SQLite.
An additional advantage is upgrading- it is really easy to manage upgrades on SQLite.
The trick here is to be smart. You'll have to do a lot of lazy loading of words, and if a user recategorizes words, you'll have to change the front end instantaneously and handle the transaction in an asynctask or something. If you wait for an update against a large database, the user will get bored. These are the little things that you'll have to take note of when dealing with large databases.
Apart from using Sqlite, another good option would be to create a server and handle all word processing in your server. Essentially your app would only be a client.
I would not go with the internal storage approach. Too inflexible in my opinion. Querying would be difficult too.
Upvotes: 2
Reputation: 93708
I'd use SQLite. A database will provide much faster search options than rolling your own, and make it much easier to add features. It will also make editing and deleting much easier- simple SQL commands rather than opening the file, reading in the entire file, changing it in memory, and writing it out again.
Upvotes: 0