Libraries And Pseudocode For Physical Dashboard/status Board
Solution 1:
I've built a dashboard similar to what you're talking about for our office. I spent about a day working on it, the possibilities are really (pretty much) endless. Basically, all the computational stuff I handle via PHP and do interval AJAX calls to the appropriate PHP script, which returns JSON data to present.
#2: For graphs, I use/recommend flot (http://code.google.com/p/flot/). The documentation isn't really that great, but once you figure out how things generally work - it's a great library, and it generates graphs using HTML5 Canvas tag.
I've not integrated external libraries with Google Analytics before, but I assume you could pull data from analytics and format it for flot to build appropriate graphs for. This might be the hard-way around, but I'm more familiar with flot than most other graphing libraries (and it doesn't suck, as much as a lot of others do) so for me, this would be the easiest way to get it done.
#3:
For twitter, it's pretty easy to pull data from their search API using JSON-P. Basically what this does, is dynamically adds a <script>
tag to your DOM, which GET parameters that twitter interprets, then calls a predefined javascript method (which you pass via the URI) with a json-encoded hash of the results.
#5: Scraping and parsing individual sites is going to be a painstaking process. Every site is going to have it's own "pattern" (or non-pattern) for publishing their daily menu or specials. I'd build a "menu" script which knew how to call a few functions, and write a function / class for scraping each restaurant's site which you're interested in showing the menu for in PHP (or whatever other language you're comfortable with). It can reply with json, which is (imo) the easiest way to manipulate/process data in Javascript.
#6: Real time stats are pretty much the same as #5. I'd build a couple classes that knew how to fetch the statistics from whatever data sources I was interested in pulling from, and present the data in json to javascript, via an ajax call.
#1: Writing javascript code to load data on a timer is really simple, look into the setInterval
, clearInterval
, setTimeout
, and clearTimeout
methods. They all take a function name (or closure) and a timeout to wait before calling that function (in ms). You could easily call a master timer function every 60 seconds which would basically be a "scheduler" or a "cron" style function, which would just look for the stuff that needed to run "right now" and execute those functions from the scheduler.
Hopefully this gives you some ideas on where to go, and how to go about getting there.
Solution 2:
For the Rails Rumble we developed Boarrd that is exactly what you would like to develop!
We were impressed by Panic too :)
In our team page on RailsRumble you'll find details about the tools used. I know that is not in PHP but maybe you'll try our tool and decide for better development environment ;)
Post a Comment for "Libraries And Pseudocode For Physical Dashboard/status Board"