- This topic has 13 replies, 5 voices, and was last updated 12 years ago by confis.
-
AuthorPosts
-
ssquireMemberHow do I create and connect to a database. If I want to have my app interact with a database how do I accomplish this?
Carson89Memberyea..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!!
dabbeljuMemberHi,
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
ssquireMemberThanks 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
dabbeljuMemberHi 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.
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
ssquireMemberThanks 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?
dabbeljuMemberHi 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
ssquireMemberYes 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!
PrimeSiteUKMemberGood 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?
dabbeljuMemberHi PrimeSiteUK,
what question are you talking about?
best
dabbelju
PrimeSiteUKMember@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…
dabbeljuMemberHi,
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
PrimeSiteUKMemberHi,
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
confisMemberHi 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 -
AuthorPosts