- This topic has 13 replies, 5 voices, and was last updated 12 years, 7 months 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?
June 24, 2012 at 10:48 pm #327522
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!!
June 25, 2012 at 2:52 am #327531
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
ChristianJune 25, 2012 at 7:20 am #327539
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
June 25, 2012 at 8:11 am #327541
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
ChristianJune 25, 2012 at 11:48 am #327549
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?
June 26, 2012 at 1:55 am #327579
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
ChristianJune 26, 2012 at 1:04 pm #327601
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!
July 10, 2012 at 2:15 pm #328062
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?
July 12, 2012 at 2:26 am #328123
dabbeljuMemberHi PrimeSiteUK,
what question are you talking about?
best
dabbeljuJuly 12, 2012 at 10:09 am #328132
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…
July 18, 2012 at 4:46 pm #328324
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
DabbeljuJuly 18, 2012 at 5:19 pm #328325
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
DabbeljuNovember 28, 2012 at 7:47 am #332802
confisMemberHi Christian,
Can I use your service for develop Mobione native App for me ?
Please advice
Regards,
Yaniv
mailto:confis@gmail.com@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