https://kotlinlang.org logo
#getting-started
Title
# getting-started
a

Ashish Lama

09/23/2020, 1:23 PM
I’m thinking of building an app which kinda behaves like an ebook where i have chapters as items in a navigation slider bar(and those items also consisting of sub-items as sub-chapters). These navigation items would have intents to activities/fragments(not sure which would be better to implement). The contents would have both text as well as images. What would be the approach to store those data? Should it be stored in a database and then fetched using an adapter or should i just hardcode it directly to the activities/fragments using textviews and image-views. I would also like to push new content as chapters into the app. Is it possible to do so using an API or would i need to push an update to the app every time i want to add new content.??
a

Alexander Schell

09/23/2020, 1:32 PM
Hello Ashish Generally speaking: Hardcoding content that is prone to change is nearly always a bad idea. Best regards Alex
a

Ashish Lama

09/23/2020, 1:38 PM
Thanks, the content would not be changing but new content would definitely be added. Let me know what you think of it.
For example, existing chapters in a book would not be changed but new chapters would be added.
a

Alexander Schell

09/23/2020, 1:41 PM
Oi, but that would be a change, wouldn't it? So I guess you'll need a data-structure that is changeable and persistent. I assume you would be better off using some kind of document-based nosql-database.
a

Ashish Lama

09/23/2020, 1:44 PM
Thank you for your suggestion. I’m not familiar with nosql databases though. Could you suggest me one where i can implement the concept in a simple fashion without diving too much into it?
a

Alexander Schell

09/23/2020, 1:57 PM
Ouch, now you got me... 😄 Unfortunately I've little experience with these kind of DBMS also. But OrientDB might be worth to have a look...
a

Ashish Lama

09/23/2020, 1:59 PM
😂 Sure thanks for your insight though. Really appreciate it !✌🏼
a

Alexander Schell

09/23/2020, 1:59 PM
You're welcome 🙂
v

Vampire

09/23/2020, 3:47 PM
Please don't cross post in multiple channels. That is annoying and rude. Pick one that matches your question best and post there.
a

Ashish Lama

09/23/2020, 9:58 PM
Sure will keep that in mind. Apologies if you found it annoying.
m

Matteo Mirk

09/25/2020, 9:31 AM
Will this be an Android app? If so, talking about DBs , are we referring to a local storage or a remote? If we’re talking local I think OrientDB is a little overkill here… 😂 since it’s a multi-paradigm db made for server usage. If you need a NoSql db for local storage I suggest you consider something like these: https://github.com/nitrite/nitrite-java/tree/master/potassium-nitrite https://github.com/JetBrains/xodus
a

Ashish Lama

09/26/2020, 10:37 AM
Hi Matteo, for now it would be a local database. Also, the content would be exclusive so it should be secure as well so that others dont fetch the data through queries. I’ll give this a look.
👌 1
4 Views