Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-03-2011, 08:56 AM   #1 (permalink)
Registered Member
 
Join Date: Feb 2011
Posts: 4
joelschmid91 is on a distinguished road
Default Database Connection over Internet

Hello everyone!
I want to make an application which shows current news and events. Is it possible to connect with a MySQL Database from the Internet and show the contents in an UITableView? I just found Core Data with SQLite but nowhere how to Connect with an Database from the Internet.
What do I have to search for or do you have some links for me how to start?
Thanks in advance for your help!
joelschmid91 is offline   Reply With Quote
Old 02-03-2011, 08:59 AM   #2 (permalink)
Registered Member
 
Join Date: Oct 2009
Location: Amsterdam, The Netherlands
Posts: 782
TUX2K is on a distinguished road
Default

You should not connect directly to database over internet.
Create feeds for the data you want, then let your iOS application pull that data.
If you want your app to work offline as wel, you really should do that, cache the data.
__________________
If my answer helped you, you might want to help me.
Make a donation via PayPal.
TUX2K is offline   Reply With Quote
Old 02-03-2011, 01:31 PM   #3 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 53
baltar is on a distinguished road
Default

Quote:
Originally Posted by joelschmid91 View Post
Hello everyone!
I want to make an application which shows current news and events. Is it possible to connect with a MySQL Database from the Internet and show the contents in an UITableView? I just found Core Data with SQLite but nowhere how to Connect with an Database from the Internet.
What do I have to search for or do you have some links for me how to start?
Thanks in advance for your help!
Yes with set of XML parser and a working web service you can easily achieve this.

Here's how you can do this

1. Get an XML or JSON service from the popular websites. You can get plenty of XML or JSOn services from programmable web

ProgrammableWeb - Mashups, APIs, and the Web as Platform

Than you just have to parse the feed, For XMl I use libxml and for JSON I prefer TouchJSON. There are many other alternatives also.

Once you have set the parser. You can just parse the feed and store the values in NSMutableArray or NSArray.

After that you can just use them in application.

The parsing operation will depend upon what exactly you want. Do you want your feed to get updated frequently and stuff.


2. In case you are storing the data on a web server of your own control. Like I said in the previous post. First set up web services that will generate XM: or JSON from the database and will give it as a reply to the request you just made after that you can parse it.


Sorry for grammar and punctuation, I'm in a little hurry
baltar is offline   Reply With Quote
Old 02-04-2011, 02:04 AM   #4 (permalink)
Registered Member
 
Join Date: Feb 2011
Posts: 4
joelschmid91 is on a distinguished road
Default

Thanks a lot for your help!
joelschmid91 is offline   Reply With Quote
Reply

Bookmarks

Tags
core data, database, internet

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 371
14 members and 357 guests
7twenty7, blasterbr, Clouds, dre, EvilElf, jeroenkeij, jimmyon122, Mah6447, Morrisone, n00b, pungs, Sami Gh, stanny, toon4413
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,667
Threads: 94,121
Posts: 402,900
Top Poster: BrianSlick (7,990)
Welcome to our newest member, host number one
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:47 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0