Libraries and pseudo code for the physical dashboard / status

OK, so yesterday I bought a 46-inch screen for the office, and with the inevitable risk of being accused of creating a “complicated deferral scheme for the World Cup,” I would better show my colleagues what this means;)

Looking at my simple sketch, and in these excellent projects from which I was inspired, I would like to get some information about the following:

  • Pseudo-code for the skeleton:. Some methods should be called every 24 hours (“Today is the date in the header”), others at 60 second intervals (“Twitter results”), what would be a good approach using JavaScript (jQuery) and PHP?

    EDIT: Alsciende: I can agree that # 1 and # 8 are too vague. So I delete # 8 and try to clarify # 1: with the "Pseudo-code for the skeleton" I basically mean, can this be done completely using JavaScript timers and how would you set up different timers?

  • Library for Google Analytics:. Which libraries support the Google Analytics API and can create neat charts. Preferred HTML5 based on JavaScript, for example Protovis .

  • Twitter library : Which libraries would you recommend for getting twitter search results and the latest profile tweets.

  • Libraries for typography / CSS / HTML 5: Attempting to learn some HTML5, etc. in this process, consult with any other typography / css libraries that may make a difference.

  • Scraper / analysis? I will give you a concrete example: try using today's menu from this restaurant website , what would you do? (this is in Swedish - but you understand - sorry;))

  • Real-Time Statistics I use the WordPress WassUp plugin to track real-time visitors on our website. Other registration software (AWStats, etc.) is probably also installed on the web server. Any ideas on how to extract information from them and be present in real time on the control panel?

  • Choosing a browser? Which browser and OS would you choose? Stable, fullscreen, HTML5.

alt text http://www.freeimagehosting.net/uploads/cb7af2ef28.png

+7
javascript jquery html5 php dashboard
source share
2 answers

I built a panel similar to what you are talking about for our office. I spent about a day working on it, the possibilities are really (pretty much) endless. Basically, all the computing materials that I process through PHP and do interval AJAX calls the appropriate PHP script, which returns JSON data for presentation.

# 2: For charts, I use / recommend the fleet ( http://code.google.com/p/flot/ ). The documentation is actually not that big, but as soon as you figure out how things work, it's a great library and it generates graphics using the HTML5 Canvas tag.

I have not integrated external libraries into Google Analytics before, but I assume that you can extract data from analytics and format it for the fleet to build the corresponding graphs. It may be difficult, but I am more familiar with the fleet than most other graphic libraries (and it does not suck, like many others), so for me it would be the easiest way to do this.

# 3: For twitter, it's pretty easy to pull data from your search API using JSON-P. Basically, what this does is dynamically add the <script> to your DOM, the GET parameters, which Twitter interprets, and then calls the predefined javascript method (which you pass through the URI) with the hash code processed by json.

# 5: Scrambling and parsing individual sites will be a painstaking process. Each site will have its own “template” (or non-template) for publishing its daily menu or specials. I would build a “menu” script that knew how to call several functions, and write a function / class to clean each restaurant site that you are interested in when displaying the menu in PHP (or in any other language, comfortably). It can respond with json, which (imo) is the easiest way to manipulate / process data in Javascript.

# 6: Real-time statistics are almost the same as # 5. I would build a couple of classes that knew how to extract statistics from any data sources that interest me and present the data in json for javascript via ajax call.

# 1: Writing javascript code to load timer data is very simple, look at the setInterval , clearInterval , setTimeout and clearTimeout methods. All of them accept the name of the function (or closure) and the wait time before calling this function (in ms). You can easily call the main timer function every 60 seconds, which will basically be the "scheduler" or "cron" function, which will simply look for the material that was supposed to be launched "right now" and perform these functions from the scheduler.

Hope this gives you some ideas on where to go and how to get there.

+3
source share

For Rails Rails, we developed Boarrd , which is exactly what you would like to develop!

We were also impressed with Panic :)

On the page of our RailsRumble team you will find detailed information about the tools used. I know this is not in PHP, but maybe you will try our tool and decide for a better development environment;)

+1
source share

All Articles