Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need suggestion for mobile app architecture

 
lavnish lalchandani
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have never written a mobile app , planning to write one now. Need advice on architecture of same.

Let me first brief on the functionality :

  • Its a kind of "General Knowledge Ques & Ans" application.
  • There will be different categories & in each category there will be different questions.
  • User can scroll through all questions in a category (using Next or Back button) ,
  • For each question there is a "show answer" button , after user has thought of answer can check the same using the button.


  • something like https://play.google.com/store/apps/details?id=com.programmerworld.HRInterviewQuestionsLite&feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5wcm9ncmFtbWVyd29ybGQuSFJJbnRlcnZpZXdRdWVzdGlvbnNMaXRlIl0.

    Other features
  • should work on all platforms (androids , ios , windows mobile , etc ) hence planning to use phonegap
  • The list of Q&A should be up-datable , like i can give updates having totally new Q&A , or better ans to old questions , or new categories etc
  • The Q&A should be non copyable , like if someone installs the app on his mobile , he should not be able to copy the Q&A list
  • The Q&A list should be stored securely on the mobile
  • allow users to bookmark some ques and later go through only the bookmarked lists
  • should allow users to browse through Q&A in offline mode


  • Planning to use PhoneGap for it. What i am not sure is how to "best" store the Q&A Data securely and efficiently so that my app is not very heavy also ???

    I am aware of two options

    1) Android SQLLite .. if i use this i am sure its secure , and easily updatable BUT i am not sure what to do for iOS and other operating system ? is there a cross platform SQL engine ? wont this be heavy ? i mean every user who wants to use my app would need to install this as well

    2) cant i store the Q&A as encrypted xml files ?? this way it should be easily updatable and what algo should i use for encryption ? will it be safe enough ?? any cross platform library implementing encryption algorithm ?

    3) any other suggestions by experts out there ??
     
    Ulf Dittmer
    Rancher
    Posts: 42968
    73
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    #1) SQLLite is build into Android, so the user does not have to install anything, and it also won't add to the app size. Other mobile OSes likely have similar functionality, but you'd need to check the PhoneGap/Cordova docs to see how well those are supported in a cross-platform manner.

    #2) Sure it's possible. AES is a standard encryption algorithm, but I'd expect this to be an area not well abstracted away by PhoneGap. Personally, I think it'd be rather more work to implement than a DB -based approach, though, especially for updating.

    So my advice would be: start by checking out what PhoneGap supports on all the platforms you care about, and then weigh the advantages and drawbacks of the approaches that are possible through it.
     
    chetan dhumane
    Ranch Hand
    Posts: 641
    Android Eclipse IDE Java
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Refer this page : http://stackoverflow.com/questions/6523670/looking-for-cross-platform-mobile-database-options
     
    lavnish lalchandani
    Ranch Hand
    Posts: 79
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thanks for the reply chetan & Ulf
    @ Ulf
    so what you are saying if i buy a new Android / iOS phone then it has SQLLite installed on it be default ? to extend this further if i want to use DB for this task then its just a matter of making a new Schema in existing DB server on the mobile ??

    can you point me to more docs , i want to check on different devices ( even ones less memory like 2GB) do they have SQL lite or not
     
    Steve Luke
    Bartender
    Posts: 4181
    22
    IntelliJ IDE Java Python
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    lavnish lalchandani wrote:Thanks for the reply chetan & Ulf
    @ Ulf
    so what you are saying if i buy a new Android / iOS phone then it has SQLLite installed on it be default ? to extend this further if i want to use DB for this task then its just a matter of making a new Schema in existing DB server on the mobile ??

    can you point me to more docs , i want to check on different devices ( even ones less memory like 2GB) do they have SQL lite or not

    For Android: yes, SQLLite comes with the OS. See This part of the Reference docs and this part of the API.

    You will have to check PhoneGap docs to see if they support it though.
     
    Ulf Dittmer
    Rancher
    Posts: 42968
    73
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    All Android versions have SQLLite built in: http://developer.android.com/guide/topics/data/data-storage.html#db. And if I search for "database in ios", the first result I get is https://developer.apple.com/technologies/ios/data-management.html. So it would seem that iOS is covered as well. I'll leave it to you to do similar searches for other mobile platforms.
     
    lavnish lalchandani
    Ranch Hand
    Posts: 79
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    thanks for the help guys
    found these links
  • http://en.wikipedia.org/wiki/SQLite#Operating_systems
  • http://en.wikipedia.org/wiki/Mobile_database ( clearly says Many applications require the ability to download information from an information repository and operate on this information even when out of range or disconnected. )
  • https://gist.github.com/edwardtoday/2204864
  • https://github.com/davibe/Phonegap-SQLitePlugin


  • I guess this is the better approach will try some POC
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic