Discussion in 'macOS' started by mms, Jan 3, 2005.

  1. mms macrumors 6502a

    Oct 8, 2003
    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?
  2. bubbamac macrumors 6502

    Dec 24, 2003
  3. mms thread starter macrumors 6502a

    Oct 8, 2003
    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.
  4. mrgreen4242 macrumors 601


    Feb 10, 2004
    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,
  5. Logik macrumors 6502a

    Apr 24, 2004
    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...
  6. mobiuschic42 macrumors newbie

    Jul 14, 2005
    Boston, MA

    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.
  7. DXoverDY macrumors 6502a

    Apr 19, 2005
    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

Share This Page