Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mms

macrumors 6502a
Original poster
Oct 8, 2003
784
0
CA
My understanding is that Dashboard is sort of like a mini-webpage incorporated into Exposé, and is written using HTML, CSS, and can use Javscript. However, will it also be able to use PHP/MySQL? Any major differences between developing a Dashboard widget and a regular website?
 
I'm aware of both of those websites, thank you. What I was asking was something I could not find a clear answer to, even after a quick search at ADC, which is -- can Dashboard widgets run local PHP and MySQL? I'm quite aware of WHAT Dashboard is, just wanting information on what I can expect as an amateur programmer.
 
mms said:
I'm aware of both of those websites, thank you. What I was asking was something I could not find a clear answer to, even after a quick search at ADC, which is -- can Dashboard widgets run local PHP and MySQL? I'm quite aware of WHAT Dashboard is, just wanting information on what I can expect as an amateur programmer.

I don't have a 100% answer for you, I've never used 10.4 or dashboard, however... HTML, CSS, and JavaScript are all client side 'tools'. That is the 'code' is sent to the web browsing client, and that program/computer 'executes' or interprets it. PHP and SQL are both server side tools, meaning that the hosting server performs some computation or action and sends the results to the client. You probably knew this, but I wanted to be sure.

My guess is that by 'default' the Dashboard will not support PHP or SQL, but that you could very easily do so by running a webserver process in the background, and host a php script and an SQL database there. Point the widget to get it's HTML/CSS data from your localhost webserver, and make those HTML/CSS pages the result of the PHP script you have hosted there.

Hope that helps,
Rob
 
Like the guy above me I am going to say the same. Unfortunately I am highly doubting the possibility of using PHP code inside a widget. If you need a database then you'll be using Obj-C and Cocoa to make what i'll call an "extension" of a widget or whatever it is they're calling these things. You'll write the basic stuff using HTML/CSS/Javascript, then you can load these "modules" of Obj-C code, once using the Obj-C stuff you then have acceess to SQLite (which is new for Tiger and built into Cocoa)... otherwise I'm thinking you're stuck using HTML/CSS/Javascript, maybe they'll add php functionality later on in 10.5 or something. I wouldn't count on it, for an example, go play with Konfabulator for a bit, it's essentially the same thing within a bit of reason...
 
Results?

Hi.
I know this was posted awhile ago, but I'm wondering if you've gotten anywhere using php/mysql in a Widget? I'm about to embark on the task myself and would love to save some heart ache.
 
mobiuschic42 said:
Hi.
I know this was posted awhile ago, but I'm wondering if you've gotten anywhere using php/mysql in a Widget? I'm about to embark on the task myself and would love to save some heart ache.

negative, not possible with the current implementation of dashboard. it's html, css, and javascript with cocoa if you want some stuff hidden from view
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.