FrOSCon wird 10 – Die Familie kommt zusammen

Am vergangenen Wochenende war es wieder so weit. Die FrOSCon stand an. Auch wenn diese Konferenz immer etwas ganz besonderes ist, war es in diesem Jahr ein noch größeres Highlight im Konferenz-Kalender. Denn die FrOSCon wurde 10. Anlässlich des Jubiläums fanden sich recht namenhafte Größen der Web-Entwicklung ein. Der Hauptanziehungspunkt war für mich auch in diesem Jahr wieder der PHP-Raum. Sebastian Schaum und Kore Nordmann haben ausgezeichnete Arbeit geleistet und einen Schedule zusammen gestellt, der es einem schwer gemacht hat den Raum überhaupt zu verlassen.

Weiterlesen

Import and export data using PHPExcel

There’s a newer version of this article topic available (2014). Please read on at Performant handling of Excel files in PHP.
A few weeks ago I had to read and write Excel files of the format BIFF8 (Excel 97), because the customer did not accept the workaround of exporting data to CSV. PEAR’s Spreadsheet_Excel_Writer combined with the project Spreadsheet_Excel_Reader on SourceForge was a good helper in the past – but only for BIFF5. BIFF8 support in spreadsheet excel writer has been a problem for a long time, and according to the authors, is still somewhat kludgy in the current version. So I needed an alternative.After a short research I stumbled upon PHPExcel which supports reading and writing of many formats in one API. It is released under the GNU Lesser General Public License which gives you the freedom to use it in commercial applications.
Output and input formats are not limited to Excel files. This article gives you a short overview about what you can do with it and demonstrates the basic usage. Weiterlesen

Accessing Nike+ data with PHP

Nike+ is a feature for the iPod nano which allows to measure time, distance and speed of runnings with a small sensor in running shoes that sends data to a transmitter on the iPod. Those data are sent to a users Nike+ account by iTunes whenever the iPod is synchronized. On the Nike+ website there is a report of runnings, the average speed, total kilometers run etc. The users can also compete with each other in virtual competitions and define goals to run more often, faster or a longer distance. The Nike+ website displays the data graphically with Adobe Flash.

There is no official API that allows you to use the raw data. Nevertheless the data are sent to the Flash via XML so there is a chance to use them. For PHP Rasmus Lerdorf himself has implemented a class to access these data. The class allows to authenticate a user and fetch the running data of a user in a XML-Format. This class can be found under Nike+ PHP API. To use that class you just have to create an object and pass the user credentials and optional caching parameters:

After the instantiation the object contains a SimpleXML object with all running information of that user that can be processed by any PHP application. The variables $data, $run, $challenges and $goals hold the information of the user account, runnings, ongoing challenges with other users and the personal goals of a user.
A partial output of the $data variable is shown below and contains among other things the total statistics of a user and the last recent run. The other data are represented in a similar way.

The Nike+ data can be used to display them on a website or to use them for mash up applications. For example there is already a word press plugin to display the data on a Blog System. Also there is another community called Runner+ which displays the data in a way similar to the Nike website.

Marc Andreessen analyzes the Facebook platform

Dear API developers and API providers,

I just came accross Marc Andreessen’s blog posting where he analyzes the Facebook platform and gives his opinion on several aspects. One thing was very remarkable about the way Facebook boosts the usage of the 3rd party applications that have been registered on the platform:

And then, on top of that, Facebook is providing a highly viral distribution engine for applications that plug into its platform. As a user, you get notified when your friends start using an application; you can then start using that same application with one click. At which point, all of your friends become aware that you have started using that application, and the cycle continues. The result is that a successful application on Facebook can grow to a million users or more within a couple of weeks of creation.

This is a really cool viral distribution model for applications based on an API of a „Web2.0 social foobar application“. It presumes that 3rd party applications have to register on the platform (which is usually a good idea for social network platforms as there are of course data privacy concerns of the platform’s users) and that users have to select which applications they want to use. This selection will be displayed to your friends/contacts and so enables them to see which 3rd party applications of the platform you are using. The consequence is that they might of course be interested to use this application, too, which is the viral boost for the 3rd party application.

That explains why 3rd party applications like iLike grew like hell from under 40,000 facebook users to now more than 3 million facebook users.

 

Marc’s analysis is definitively worth a read.

Playing with the Xing API

Xing is Europe’s leading Business Network with more than 2 million members. Recently, Xing announced that they would come up with an API later this year to get access to the network. As far as I know, Xing was developed by ePublica using Perl and MySQL.

 

Having an API is essential in these mashup days. I was invited to the private alpha test and implemented a reference implementation of an API client via PHP5 which behaves like SOAPClient (but uses ReST as the transport mechanism) and overloads the methods that are available.

 

Here’s an example of how to call it currently (API is subject to change as it is in an alpha state):

Currently, for security and data privacy reasons (I have to say that Xing has always been an example of how to protect their user’s data/privacy), the API lets me only access my direct business contacts and furthermore scrambles the personal data of the contacts.

 

In the last few days I had a bit time during a cold and wrote my own mashup – marking my Xing contacts on a Google Map. Click on continue to see some screenshots and a bit of explanation …

Weiterlesen