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 > PHP in Dashboard

PHP in Dashboard
Thread Tools
cherry su
Junior Member
Join Date: Mar 2007
Location: Earth
Status: Offline
Reply With Quote
Jun 14, 2007, 09:26 PM
 
Does Dashboard allow PHP in widgets? If so, then this would make the coolest widget.
MacBook Pro T2500/1.5GB/100GB/256MB  iPod 20GB B&W  Mac mini 1.25/256MB/40GB/32MB  Dell 2.66/2GB/80GB/Intel Extreme Gfx
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jun 14, 2007, 09:35 PM
 
Doubt it. PHP is a server side scripting language. I think Dashboard only supports X/HTML, Javascript, and Dashcode, but I could be mistaken...
     
hyteckit
Addicted to MacNN
Join Date: May 2001
Status: Offline
Reply With Quote
Jun 15, 2007, 12:24 AM
 
Web 2.0 - AJAX, calling PHP scripts and retrieving data.
Bush Tax Cuts == Job Killer
June 2001: 132,047,000 employed
June 2003: 129,839,000 employed
2.21 million jobs were LOST after 2 years of Bush Tax Cuts.
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jun 15, 2007, 12:41 AM
 
Originally Posted by hyteckit View Post
Web 2.0 - AJAX, calling PHP scripts and retrieving data.
But the PHP interpretation would not be happening at the Dashboard level. I guess if the question were whether Apple could scrape PHP generated HTML/Javascript off of pages, sure, this is possible.
     
Thinine
Mac Elite
Join Date: Jul 2002
Status: Offline
Reply With Quote
Jun 15, 2007, 05:23 PM
 
OS X comes with a command line PHP interpreter, so you can call out to that from a widget if you want.
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jun 15, 2007, 05:55 PM
 
Originally Posted by Thinine View Post
OS X comes with a command line PHP interpreter, so you can call out to that from a widget if you want.
True. PHP itself comes with the CLI interpreter, which OS X bundles, but such a system would probably call upon dynamic DB driven content, so the local PHP is probably not going to do much good.

Do the dashboard widgets simply scrape HTML off of a web page, or is the data simply fed to them by XML, Soap, or some other form of data exchange?

I admit, I don't know too much about how Dashboard widgets communicate with web services.
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Jun 15, 2007, 06:06 PM
 
Originally Posted by besson3c View Post
Do the dashboard widgets simply scrape HTML off of a web page, or is the data simply fed to them by XML, Soap, or some other form of data exchange?

I admit, I don't know too much about how Dashboard widgets communicate with web services.
Depends on the widget, I suppose. Widgets are basically just AJAX-powered Web pages.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jun 15, 2007, 06:15 PM
 
Originally Posted by Chuckit View Post
Depends on the widget, I suppose. Widgets are basically just AJAX-powered Web pages.
So, in most cases, they just display stuff processed and fed from web services.. I.e. there is no logic or data processing going on in most widgets, just formatting and display of data? Makes sense, although I'd imagine that widgets do support some basic processing/calculation for widgets such as the currency converter or calculator.
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Jun 15, 2007, 06:17 PM
 
Originally Posted by besson3c View Post
So, in most cases, they just display stuff processed and fed from web services.. I.e. there is no logic or data processing going on in most widgets, just formatting and display of data? Makes sense, although I'd imagine that widgets do support some basic processing/calculation for widgets such as the currency converter or calculator.
I wouldn't say that. The J part of AJAX is quite capable of logic and data processing.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Thinine
Mac Elite
Join Date: Jul 2002
Status: Offline
Reply With Quote
Jun 16, 2007, 12:01 AM
 
Widgets can be all local, all remote, or a mix of both. You can even use a full Cocoa back end as well. You can do quite a bit with them.
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jun 16, 2007, 12:14 AM
 
Originally Posted by Chuckit View Post
I wouldn't say that. The J part of AJAX is quite capable of logic and data processing.

True, especially for the examples I provided...

Why didn't Apple just make Dashcode the iPhone SDK?
     
Finrock
Forum Regular
Join Date: Nov 1999
Location: Tampa, Florida
Status: Offline
Reply With Quote
Jun 16, 2007, 06:31 PM
 
Originally Posted by besson3c View Post
Why didn't Apple just make Dashcode the iPhone SDK?
Here is one possible reason why Apple didn't let users use Daschode asn the SDK. If Apple limits "apps" to AJAX, they can limit the amount of CPU time, network and memory utilization from Safari. One application. If you were to allow widgets, similar to the ones in Tiger where you can embed command line apps, perl or shell scripts, mini-apps written in Cocoa/Objective-C, or whatever, it might be harder to keep control of these things.
Two atoms were talking one day. One atom said to the other "you know, I think I've lost some electrons." The other atom said "are you sure?" The atom said "yeah, I'm positive." www.thisoldpodcast.com
     
   
 
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
Top
Privacy Policy
All times are GMT -4. The time now is 01:36 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,