Google's Android App Inventor is great fun to play with and I think represents a fascinating leap forward in mobile application development. It provides a whole toolbox of ready to go functionality, but sadly missing from this toolbox are facilities to interact with web sites and services (with the exception of Twitter of course). However there is one component that provides a glimmer of hope and if you want to publish data in a way that can be used by Android App Inventor developers then you can use this component with a PHP script to easily pass data to the mobile device.
Since my last blog post on the Nokia N900 I have been experimenting more with this Linux powered device and thought it was time to go a little further to see what it could do. Just over two years ago I wrote about using the Asus EEE PC as a “server in your handbag” running Apache 2, MySQL and PHP. I could not help wondering if such a feat was possible on the N900, after all it is a Linux machine, a small computer, but running the LAMP stack on a mobile phone? Maemo, the N900's operating system is a derivative of Debian, but the packages needed have not (yet) been ported, however, there was another route: Easy Debian.
We all know that it is important to write documentation for our code. It is not the most exciting aspect of programming but sadly it is needed for those times when we have to fix or change something six months after writing it and have no recollection of how the code works or maybe of writing it at all. Fortunately there is help at hand, you can document a lot of your PHP code semi-automatically with a handy tool called PhpDocumentor. If you have programmed in Java before and used Javadoc this will be very familiar to you. It is not readily available pre-packaged through apt, but fortunately it is reasonable straightforward to install.
One of the joys of using an open source operating system like Ubuntu is that you can experiment with all sorts of ideas and not worry about constantly purchasing software or coming up against artificial limitations. By chaining some open source packages together we can do some quite interesting things, so it is fun sometimes to try a challenge. In this post I will show you how to take a text RSS feed and make it into an Internet radio broadcast that can be received on a dedicated device, so instead of being stuck in front of a screen you can catch up with your RSS feeds while sunbathing in the garden! The solution here is not intended to be production ready, and might be tough going for beginners, but the idea is it will give a basic overview which you can then go and experiment with. I'll be using Icecast2 to stream the broadcast, Ices to feed Icecast2 with files to broadcast, Espeak to generate text to speech audio files and a small custom PHP script to convert the text feed into a format suitable for ESpeak.
Back in January I wrote about a piece of software that I think has a very bright future in Boxee makes your TV social. One of the great features of Boxee is that it will take standard podcast feeds and then allow you to enjoy these podcasts through the software and potentially on your TV.
Do you like my Random Content block? I thought it would be nice to show people random selections from previous entries on my website as another way, along with the Popular Content block, to help visitors discover pages that they might be interested in. The way it was done is a little hack-ish, and it would be better to write this up as a module, but it does give an example of a custom content block using the PHP filter.
If you fancy using the Asus EEE as a development environment for you web projects then you are in luck. The little machine will quite happily run the entire LAMP stack. LAMP stands for Linux, Apache, PHP and MySQL, which are the operating system, web server, programming language and database components respectively. Being a developer isn't the only reason you might want to install this technology, it also lets you experiment with some interesting software, which I will be exploring in later blog posts.
Admittedly, I didn't actually try to put the EEE into a handbag, but a couple of people very enthusiastically mentioned that such a feat would be possible. Now of course as I'm sure you know there are few subjects more serious than servers, this is the impression I have got over the years from sysadmins suspicious of developers! So we ought to see if some serious technology works on the machine, could we really use it as a web server? Or a database server? Maybe even for Drupal?
If you are running a site that is powered by Drupal you might want to take some precautions against spam being posted to your site, particularly if you allow comments. A useful way to stop such automated submissions is to use the reCaptcha system which allows you to generate a CAPTCHA and help digitise books at the same time.