facebook

Creating & connecting to databases

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #327520 Reply

    ssquire
    Member

    How do I create and connect to a database. If I want to have my app interact with a database how do I accomplish this?

    #327522 Reply

    Carson89
    Member

    yea..good question indeed!!

    I am looking ways to connect my app to MySQL oso..

    Octavio, please help us out of here by providing simple tutorial.

    Appreciate it!!

    #327531 Reply

    dabbelju
    Member

    Hi,

    I did do something similar, so I hope it’s ok if I try to answer that one.
    As far as I know there is no way to connect directly from Javascript to a MySQL DB. What I did do:

    I did write an php page, which is doing the db stuff for me. The return of this page is in my case XML which I do request from my app in Javascript via XMLHTTPRequest (Ajax).

    JQuery documentation and examples can be found at http://jquery.com/.

    The get request is described at http://api.jquery.com/jQuery.get/.

    I hope it helps.

    best regards
    Christian

    #327539 Reply

    ssquire
    Member

    Thanks Christian!

    Can you answer one other question? How does MobiOne connect/interact with databases local to the phone using sqlite. Do you have any examples for that?

    SSq

    #327541 Reply

    dabbelju
    Member

    Hi ssquire,

    here in the forum is a very good example how to deal with the local db.

    http://www.genuitec.com/support-genuitec/viewtopic.php?f=8&t=1037&hilit=local+storage+local+db

    I have also found a very good documentation on how to use the JavaScript Database at Apple.

    http://developer.apple.com/library/safari/#documentation/iPhone/Conceptual/SafariJSDatabaseGuide/UsingtheJavascriptDatabase/UsingtheJavascriptDatabase.html

    I do not have my code with me, cause I am at work. I will try to remember to post it later on.

    What I have learned is that you basically do not need to test if a DB is exeisting or not. If you create a DB and it is already there, it will connect to it.

    Same with tables. If you use “CREATE TABLE IF NOT EXISTS” statement, it will create the table if not already there. If the table is there, it will keep it.

    best
    Christian

    #327549 Reply

    ssquire
    Member

    Thanks a bunch Christian. The product’s got my head spinning with ideas since the first app I created only took 2 days (and I never used Javascript before). Anyway, some other ideas that I have require database connectivity so I’m trying to evaluate what all types of solutions exist in that realm. Currently, it seems that other vendors use phone backends to leverage database connectivity with products such as Parse.com or Stackmob.com. Just out of curiosity – what is your opinion with using those methods?

    #327579 Reply

    dabbelju
    Member

    Hi ssquire,

    to be honest, I do not know them. But since I found MobiOne I did not see any reason to search something else because I think that MobiOne provides everything Ineed.

    – A great Studio to develop APPs. Meanwhile accross multiple plattforms.
    – Even more important: A perfect support team. The guys (especially wayne and octavio) help us out wherever they can.
    – A great and working community which help each other where they can and share ideas and code.
    – An ongoing development of MobiOne which will provide more and more features.

    BTW: Did the information I did provide help you with your ideas?

    best
    Christian

    #327601 Reply

    ssquire
    Member

    Yes your information definitely helped. And I agree with you concerning the product support aspect of MobiOne. I’ve done other web development using Genuitec’s MyEclipse Spring and their support simply cannot be beat!

    #328062 Reply

    PrimeSiteUK
    Member

    Good question, been asking this for ages and still no obvious suggestion?

    Being a fundemental aspect to app develpment, you would think that this info would be more apparent?

    #328123 Reply

    dabbelju
    Member

    Hi PrimeSiteUK,

    what question are you talking about?

    best
    dabbelju

    #328132 Reply

    PrimeSiteUK
    Member

    @dabbelju wrote:

    Hi PrimeSiteUK,

    what question are you talking about?

    How do I create and connect to an external server MySQL database? I’ making a dating app like POF so I need to poplulate it with member info data

    It woul be great if I could get a demo file that I could work on…

    #328324 Reply

    dabbelju
    Member

    Hi,

    there are Allready links in this Tonic which Point to examples how to do so. But in your Case I would think about Building a webservice on Server side and let the App Communication with it in Order to Exchange data.

    Best
    Dabbelju

    #328325 Reply

    PrimeSiteUK
    Member

    Hi,

    Thanks for that; but i think thats what I was referring too 😉

    But how do I ling to a server side DB?

    @dabbelju wrote:

    Hi,

    there are Allready links in this Tonic which Point to examples how to do so. But in your Case I would think about Building a webservice on Server side and let the App Communication with it in Order to Exchange data.

    Best
    Dabbelju

    #332802 Reply

    confis
    Member

    Hi Christian,

    Can I use your service for develop Mobione native App for me ?

    Please advice

    Regards,
    Yaniv
    mailto:[email protected]

    @dabbelju wrote:

    Hi,

    I did do something similar, so I hope it’s ok if I try to answer that one.
    As far as I know there is no way to connect directly from Javascript to a MySQL DB. What I did do:

    I did write an php page, which is doing the db stuff for me. The return of this page is in my case XML which I do request from my app in Javascript via XMLHTTPRequest (Ajax).

    JQuery documentation and examples can be found at http://jquery.com/.

    The get request is described at http://api.jquery.com/jQuery.get/.

    I hope it helps.

    best regards
    Christian

Viewing 14 posts - 1 through 14 (of 14 total)
Reply To: Creating & connecting to databases

You must be logged in to post in the forum log in