Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > MySQL & Cocoa

MySQL & Cocoa
Thread Tools
Senior User
Join Date: Jan 2000
Location: Burlington, VT, USA
Status: Offline
Reply With Quote
Sep 30, 2002, 11:57 AM
 
are there any built in ways to perform SQL queries? I'm planning on writing some server software for my web site (which is mysql/php based). Any thoughts are welcome.
     
Junior Member
Join Date: May 2002
Location: Australia
Status: Offline
Reply With Quote
Sep 30, 2002, 11:58 PM
 
Cocoa Objective-c is not portable and as far as I know has not got great networking API's. It would be better to build such a thing in Java, since Java has far more advanced networking and db connect capacity via JDBC. You could build in cocoa objective-c and then the use the objective-c java bridge to call java API's from objective-c.

But if you already using PHP, just build what you need in PHP, unless you want some kind of stand alone WebServer administration application. Then Java would still be a better choice. More network centric language.

But to answer your question better we would need to know what you intend for your "server software" to perform.
     
Professional Poster
Join Date: Oct 2001
Location: London
Status: Offline
Reply With Quote
Oct 1, 2002, 07:08 AM
 
It is *possible* - SQLGrinder was written in Cocoa.

http://www.advenio.com/sqlgrinder/index.html

It has a service that will run queries - but I don't think that's really what you want.

a rather hack-y way of doing it would be to wrap a "mysql -e" command to the shell (but this would require the MySQL monitor executable on the same machine as the Cocoa app.)

There is an Obj-C class which is a wrapper for SQLLite - but that only works locally.

google turned up this:

http://www.paradigmasoft.com/news/pr_1_8_10.html

but It looks like that's local as well.

Your best bet would be to search Cocoa.mamasam.com

Sorry I can't be more help - I'm just a beginner with SQL too.
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Oct 4, 2002, 04:18 PM
 
You can use the MySQL C client API, and I think I remember reading that there was an obj-c wrapper somewhere, but I'm not sure about that.
     
Junior Member
Join Date: Jul 2002
Location: Australia
Status: Offline
Reply With Quote
Oct 4, 2002, 09:25 PM
 
I personally think the best way to interact with MySQL via cocoa (Obj-C) is SMySQL...

http://mysql-cocoa.sourceforge.net/

I absolutly love it!!
     
Senior User
Join Date: Jan 2000
Location: Burlington, VT, USA
Status: Offline
Reply With Quote
Oct 9, 2002, 12:43 PM
 
I'm writing a game that needs to interface with a database. Both are being run on the same machine. I've looked into the internet stuff, and it's not documented well, but you can do all the socket stuff using socketport and NSFileHandle.


But to answer your question better we would need to know what you intend for your "server software" to perform.
     
Junior Member
Join Date: May 2002
Location: Australia
Status: Offline
Reply With Quote
Oct 10, 2002, 01:35 AM
 
Well a game. This may be totally left field but have you thought about Flash MX, it has very good PHP database connection ability. There is even a book on PHP and Flash. Plus it will be cross platform, and you can make it as a standalone app.

Failing that yes then Cocoa with OpenGL should fix you right up. Cannot help you more then that but best of luck.
     
Senior User
Join Date: Jan 2000
Location: Burlington, VT, USA
Status: Offline
Reply With Quote
Oct 14, 2002, 12:36 PM
 
Originally posted by dogwood:
Well a game. This may be totally left field but have you thought about Flash MX, it has very good PHP database connection ability. There is even a book on PHP and Flash. Plus it will be cross platform, and you can make it as a standalone app.

Failing that yes then Cocoa with OpenGL should fix you right up. Cannot help you more then that but best of luck.
I've actually just started looking into the flash stuff... I don't know very much about it yet, but it appears as if it will do the database connection stuff just fine. Does anyone know if there is any threading support, or if client-server connections can be established?
     
   
Thread Tools
Forum Links
Forum 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
Top
Privacy Policy
All times are GMT -5. The time now is 01:52 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2