Jailbreaking WordPress with Web hooks

As is often the case, I struggle at first glance to see the full implications of a new development in technology, which is why I so often rely on others to kick me up the arse before I get it. ((I am not ashamed to admit that I’m finding that my career is increasingly influenced by following the observations of Tony Hirst. Some people are so-called ‘thought-leaders’. I am not one of them and that is fine by me. I was talking to Richard Davis about this recently and, in mutual agreement, he quoted Mario Vargas Llosa, who wrote: “There are men whose only mission is to serve as intermediaries to others; one crosses them like bridges, and one goes further.” That’ll do me.))

Where I ramble about WordPress as a learning tool for the web…

I first read about web hooks while looking at WordPress, XMPP and FriendFeed’s SUP and then again when writing about PubSubHubbub. Since then, Dave Winer’s RSSCloud has come along, too, so there’s now plenty of healthy competition in the world of real time web and WordPress is, predictably, a mainstream testing ground for all of it. Before I go on to clarify my understanding of the implications of web hooks+WordPress, I should note that my main interest here is not web hooks nor specifically the real time web, which is interesting but realistically, not something I’m going to pursue with fervour. My main interest is that WordPress is an interesting and opportunistic technology platform for users, administrators and developers, alike. Whoever you are, if you want to understand how the web works and how innovations become mainstream, WordPress provides a decent space for exercising that interest. I find it increasingly irritating to explain WordPress in terms of ‘blogging’. I’ve very little interest in WordPress as a blog. I tend to treat WordPress as I did Linux, ten years ago. Learning about GNU/Linux is a fascinating, addictive and engaging way to learn about Operating Systems and the role of server technology in the world we live in. Similarly, I have found that learning about WordPress and, perhaps more significantly, the ecosystem of plugins and themes ((Note that themes are not necessarily a superficial makeover of a WordPress site. Like plugins, they have access to a rich and extensible set of functions.)) is instructive in learning about the technologies of the web. I encourage anyone with an interest, to sign up to a cheap shared host such as Dreamhost, and use their one-click WordPress offering to set up your playground for learning about the web. The cost of a domain name and self-hosting WordPress need not exceed $9 or £7/month. ((I am thinking of taking the idea of WordPress as a window on web technology further and am tentatively planning on designing such a course with online journalism lecturer, Bernie Russell. It would be a boot camp for professional journalists wanting (needing…?) to understand the web as a public space and we would start with and keep returning to WordPress as a mainstream expression of various web technologies and standards.))

… and back to web hooks

Within about 15 minutes of Tony tweeting about HookPress, I had watched the video, installed the plugin and sent a realtime tweet using web hooks from WordPress.

https://videopress.com/v/25KHD2dF

It’s pretty easy to get to grips with and if a repository of web hook scripts develops, even the non-programmers like me could make greater use of what web hooks offer.

Web hooks are user-defined callbacks over HTTP. They’re intended to, in a sense, “jailbreak” our web applications to become more extensible, customizable, and ultimately more useful. Conceptually, web applications only have a request-based “input” mechanism: web APIs. They lack an event-based output mechanism, and this is the role of web hooks. People talk about Unix pipes for the web, but they forget: pipes are based on standard input and standard output. Feeds are not a sufficient form of output for this, which is partly why Yahoo Pipes was not the game changer some people expected. Instead, we need adoption of a simple, real-time, event-driven mechanism, and web hooks seem to be the answer. Web hooks are bringing a new level of event-based programming to the web.

I think the use of the term ‘jailbreak’ is useful in understanding what HookPress brings to the WordPress ecosystem. WordPress is an application written in PHP and if you wish to develop a plugin or theme for WordPress you are required to use the PHP programming language. No bad thing but the HookPress plugin ‘jailbreaks’ the requirement to work with WordPress in PHP by turning WordPress’ hooks (‘actions’ and ‘filters’) into web hooks.

WordPress actions and filters, are basically inbuilt features that allow developers to ‘hook’ into WordPress with their plugins and themes. Here’s the official definition:

Hooks are provided by WordPress to allow your plugin to ‘hook into’ the rest of WordPress; that is, to call functions in your plugin at specific times, and thereby set your plugin in motion. There are two kinds of hooks:

  1. Actions: Actions are the hooks that the WordPress core launches at specific points during execution, or when specific events occur. Your plugin can specify that one or more of its PHP functions are executed at these points, using the Action API.
  2. Filters: Filters are the hooks that WordPress launches to modify text of various types before adding it to the database or sending it to the browser screen. Your plugin can specify that one or more of its PHP functions is executed to modify specific types of text at these times, using the Filter API.

So, if I understand all this correctly, what HookPress does is turn WordPress hooks into web hooks which post the output of the executed actions or filters to scripts written in other languages such as Python, Perl, Ruby and Javascript (they can be written in PHP, too) hosted elsewhere on the web.   In the example given in the HookPress video, the WordPress output of the action, ‘publish_post‘, along with two variables ‘post_title’ and ‘post_url’, was posted to a script hosted on scriptlets.org,  which performs the event of sending a tweet which includes the title and URL of the WordPress post that has just been published. All this happens as fast as the component parts of the web allows, i.e. in ‘real time’.

In other words, what is happening is that WordPress is posting data to a URL, where lies a script, which takes that data and creates an event which notifies another application. Because the scripts can be hosted elsewhere, on large cloud platforms such as Google’s AppEngine, the burden of processing events can be passed off to somewhere else. I see now, why web hooks are likened to Unix pipes, in that the “output of each process feeds directly as input to the next one” and so on. In the case of HookPress, the output of the ‘publish_post’ hook feeds directly as input to the scriptlet and the output of that feeds directly as input to the Twitter API which outputs to the twitter client.

Besides creating notifications from WordPress actions, the other thing that HookPress does (still with me on this ‘learning journey’ ??? I’ve been reading, writing and revising this blog post for hours now…), is extend the functionality of WordPress through the use of WordPress filters. Remember that filters in WordPress, modify text before sending it to the database and/or displaying it on your computer screen. The example in the video, shows the web hook simply reversing the text before it is rendered on the screen. ‘This is a test’ becomes ‘tset a si sihT’.

The output of the ‘the_content‘ filter has been posted to the web hook, which has reversed the order of the blog post content and returned it back to WordPress which renders the modified blog post.

Whereas the action web hooks are about providing event-driven notifications, the filter web hooks allow developers to extend the functionality of WordPress itself in PHP and other scripting languages.  In both cases, web hooks ‘jailbreak’ WordPress by turning it into a single process in a series of piped processes where web hooks create, modify and distribute data.

Finally, I’ll leave you with this presentation, which is all about web hooks.

In the presentation, there are two quotes which I found useful. One from Wikipedia which kind of summarises what HookPress is doing to WordPress:

“In computer programming, hooking is a technique used to alter or augment the behaviour of [a programme], often without having access to its source code.”

and another from Marc Prensky, which relates back to my point about using WordPress as a way to learn about web technologies in a broader sense. WordPress+HookPress is where programming for WordPress leaves the back room:

As programming becomes more important, it will leave the back room and become a key skill and attribute of our top intellectual and social classes, just as reading and writing did in the past.

BuddyPress: A university’s social network

To cut to the chase, this post is about using WordPress MU and BuddyPress with enterprise authentication (LDAP) to create an internal/private social network while leaving the blogs, by default, public.

Since May 2008, I’ve been running WordPress MU on the Learning Lab, a Linux server I maintain at the University of Lincoln, for experimenting, trialling and evaluating software that may enhance and support research, teaching and learning. It’s a great job 😉

Of all the software we’ve looked at over the last few months, ‘WordPress Multi-User’, has clearly shown the most potential for use by staff and students at the university. It’s a mature, well maintained, very popular open source blogging platform. In fact, it’s more than that. It’s a web content management system that runs 5 million blogs on wordpress.com and 280,000 blogs on edublogs.org. While evaluating WPMU on the Learning Lab, 65 blogs were registered by 123 users. I didn’t advertise the service at all during this period, preferring to work with individuals on specific projects and get their (informal) feedback. The feedback has been positive. People initially need support but once they’re set up and running, they only tended to contact me when they wanted to push WordPress to do more for them through plugins and custom themes.

During this period, I’ve been watching and doing my best to help with the progress made on BuddyPress, a set of plugins for WordPress MU, developed by Automattic, the company behind WordPress. It’s been interesting trying to get everything to work together at times but over the last few weeks it’s all come together.

BuddyPress Profile

Automattic also develop open source forum software which integrates with Buddypress, too. Jim Groom at the University of Mary Washington pioneered the integration of all three products and I’ve had it working here at the University of Lincoln quite nicely. However, bbPress is still beta software and I’d like to be able to offer privacy options on forums, too, which is currently unsupported (there are some plugins, but they’re not mature enough for our use yet). So currently, we’re running WordPressMU, BuddyPress, an LDAP plugin for WPMU and a privacy plugin that’s commonly used on WPMU installations. It works really well.

I’ve documented some of the set up on our wiki. It’s not been difficult. For the time-being, while BuddyPress matures, I’ve chosen to stick with the default home and members themes, changing just the logo. Forums are, as mentioned above, turned off for now. I wonder if we’ll ever turn them on as the ‘Wire’ (similar to the Facebook Wall) is available and people are used to using services like Twitter and the Facebook Wall to communicate these days. We’ll see what demand there is for forums.

The final set up is really quite sweet. A member of the university goes to https://blogs.lincoln.ac.uk for the first time and logs in with their usual credentials. The first time they login, they are signed up. That’s it. No sign up page needed. It’s as if they were already a member of the social network, which, being members of the university, they are of course. From there, they see the BuddyPress home pages, can join groups, change their profiles and, when they’re ready, create or join a blog.

I’ve finally finished setting it up for general use today. The few people that know about it and have already joined, instantly see the benefits of having the social networking layer on top of the blogs. I’m excited to see how this works out over time. It’s not something we’re going to launch in a big way just yet (it’s only me supporting it at the moment), but I’m guessing that it will spread quite quickly through word-of-mouth.

The university web team are supportive and are sending staff and whole departments my way when they want a web site. The IT support team have been trained to use WordPress, should they get enquiries their way. We’ve got a few projects that have been waiting patiently for the new home of the blogs and a number of the Learning Lab blog users are migrating across already. The potential for supporting personalised and group online learning is now better than it’s ever been and the social networking element only helps bring peers together for collaboration and discussion.

Many thanks to Jim Groom and D’Arcy Norman who have been working on WordPressMU at their universities in ways which I hope we can emulate and contribute to here at the University of Lincoln.

Anytime Anywhere Computing

Together with the ITC Department, we’ve recently begun a feasibility study which looks at related areas of the university’s ITC provision. It brings together three, originally separate proposals to look at upgrading our wireless infrastructure, provide a more flexible desktop experience through virtualisation and improve our understanding of and support for Netbooks and Mobile Internet Devices. It’s good to be working so closely with our ITC Department. So often I hear people at other institutions complain about their ITC departments being ‘brick walls’ and showing no flexibility, but fortunately I can’t say that about my experience at the University of Lincoln.

The Head of ITC sent me a link to this video today. It’s a good example of why our study is both necessary and worthwhile.

[kml_flashembed movie="http://uk.youtube.com/v/uRUTtpk9EHg" width="425" height="350" wmode="transparent" /]

Related to this, Tony Hirst recently bookmarked this ITC syllabus for 13-14 year olds recently, which, together with the video, provides a clear indication of what’s happening in schools.

We’re working closely with the Student Council and Academics and intend to survey them on the issues raised by the study early in the new year.  We’ve started talking to vendors of desktop and application virtualisation ‘solutions’, too (the virtualisation of our server infrastructure is almost complete). We’re also lining up some visits to other institutions that have experience in these areas.

If you or your school, your FE or HE insititution has seriously considered or implemented desktop and/or application virtualisation, a full service wireless infrastructure (i.e. it matches the services on your wired network) and support Linux and XP-based Netbooks and other mobile devices, please do get in touch or leave a comment below.

These days are full

I am conscious that it’s been almost a month since I last wrote here but that is largely due to my work on other projects, websites and blogs.  Here’s an overview of some of the work I’m currently involved in. If you’re working on similar projects or want to discuss or collaborate on any of this, do get in touch.

The Learning Lab

I recently wrote a brief summary of the work I’ve been doing under the ‘Learning Lab’ banner, since I started my work as Technology Officer in the Centre for Educational Research and Development. WordPressMU occupied a large chunk of my summer, though I feel I have a good understanding of it now and can relax a little while supporting staff and students who wish to use it. It will soon be moving to the new, permanent home of http://blogs.lincoln.ac.uk

One of the unexpected outcomes of working on WordPressMU was the realisation that not only training but a different model of support is key to sustaining and improving the use of blogs and other Web 2.0 tools.  I’m keen to advocate and support the user-to-user support model that most open source and social web services develop rather than the traditional user-to-professional, ‘Help Desk’ model that exists for much of the software provided by the university. Models of user support are not something I’ve taken much of an interest in until recently, but the reality is that I alone am unable to support the growing adoption of WordPressMU at the university and I need to encourage staff and students to help themselves wherever possible.

Having said that, with colleagues in the Library and Research Office, I’m also planning to offer regular staff training sessions on the use of Web 2.0 tools in education and I’m visiting classes to give one hour introductions to WordPress, which is a good opportunity to work with and learn from both students and staff. In addition to this, I’m contributing towards the revision of policy documents which ensure that these new tools are used effectively and appropriately.

Lincoln Academic Commons

This is something I’m developing to promote and support the various initiatives at the university which provide Open Access to our research, teaching and learning. I started working for the university on a JISC-funded project to develop an institutional repository, having been working as an Archivist and Project Manager of a Digital Asset Management system in my previous job. Then, a few months ago, I heard about the difficulties people in the Lincoln Business School were having trying to establish a series of ‘Occasional Working Papers’ (OWPS) using existing portal software provided by the university. At the same time, I was looking at the Open Journal System for publishing Open Access journals, so I suggested that we set up the OWPS using OJS. Seeing what a great piece of software OJS is, I then suggested we use it for NEO, a planned journal of student research which we intend to launch in the Spring. Finally (and this is where it gets really interesting for me), Mike Neary, Dean of Teaching and Learning and Head of the Centre for Educational Research and Development, is advocating a more critical engagement with the debates about the marketisation of higher education through teaching practice. He’s calling this critical engagement, ‘Teaching in Public’, which encompasses the idea of an Academic Commons.

Professor Neary argues the uncertainty over the university’s mission requires the notion of ‘the public’ to be reconceptualized, so as to remake the university as an academic project that confronts the negative consequences of academic capitalism, and the commodification of everyday life. He will present Karl Marx’s concept of the ‘general intellect’ as an idea through which the university might be remade.

I contributed to a book chapter Mike has recently written which elaborates on this in more detail. You can read more about that on a previous blog post.

Access Grid

A project I’ve been leading for some months now is the installation of an Access Grid node at the university. We were fortunate in being approached by the Mental Health Research Network (MHRN) several months ago who offered to fund the installation of an AG node at the university to support their staff who work at the university and provide a facility that is otherwise missing in Lincolnshire. It’s been a really interesting and useful project for me as I learned about how the university undertakes a tendering exercise and I’ve been able to work with colleagues from across the university.  The node should be available to use sometime in January. The Access Grid project is yet another technology-based initiative at the university which further improves our research infrastructure and supports collaboration and the wider exchange of ideas among colleagues worldwide.

Anytime, Anywhere Computing

This is a new project that brings together three, originally separate proposals, that the ICT department and CERD were proposing to take forward. It covers:

  1. ubiquitous wireless networking
  2. so called ‘thin client’ technology as an alternative to desktop PCs and the management of software applications and resources
  3. access via user-owned devices, such as low-cost and increasingly popular ‘netbook’ hardware

We’re just starting to look at how we might offer the same user experience and services on our wireless network as we provide on our wired network. Currently the wireless network only offers Internet access. At the same time, we’re interested in evaluating new virtualisation technologies for the desktop. The ICT department are concluding a server consolidation project which is virtualising much of our server infrastructure. This brings many benefits and allows the ICT department to provide a more flexible service to users.  Our new study will look at whether similar virtualisation technology can bring benefits to desktop users, too. The third part of this project is based on a proposal I made a few months ago to evaluate the user experience and support issues that the new generation of ‘netbooks‘ introduces. Smaller screens, Linux operating systems, an emphasis on web-based applications and the rapid adoption of these low-cost devices often aimed at the education sector, require a better understanding of the impact of this technology and the influence it may have on driving students to use more and more web-based applications.

Are you working on similar initiatives? If so, please leave a comment and share your experiences.

ALT-C 2008

I am at the Association for Learning Technology conference (ALT-C 2008) until Thursday. It’s the main UK conference for my area of work and the first time I have attended. I went to two pre-conference sessions today, as well as the F-ALT08 evening planning and discussion.

There’s a CrowdVine site for the conference, which is working very well to connect people both before and at the conference and the F-ALT08 wiki has been useful for pulling people together. I am proud to wear the official fringe badge.

This morning, I attended the Experiencing Mobile Learning and Assessment workshop at Leeds Metropolitan University. Three people spoke, really just introducing the themes for the afternoon sessions and giving a largely predicatable overview of the issues surrounding mobile learning and assessment. The afternoon sesssions looked good, but I left to attend the OpenSim, a pre-Second Life taster workshop. This was worthwhile as I’ve not really engaged with Second Life and we were able to trial some basic features of virtual worlds by using OpenSim running on the desktop machines rather than over the net.  Using Second Life still doesn’t appeal to me personally, but I can see that it has some useful applications for role-playing different situations which are otherwise difficult to emulate in real life.  I was mostly interested in OpenSim itself as an open source response to Linden Lab’s Second Life and will install it when I get back to work for other colleagues to test a Second Life-like environment prior to jumping into Second Life itself.

After registration and checking into the accomodation, I had some food and a wander around the sponsoring organisation’s stalls in the main hall. There were a couple of useful finds, notably that Learning Objects, Inc. are extending their wiki plugin, Teams LX,  for use outside of the Blackboard VLE, basically providing a wiki-farm tool with fine access controls, including fully public. I’m currently on the look out for a wiki that’s as good as WordPressMU is for blogging. Confluence is currently my favourite, having used it extensively over the last few years. If anyone has any other suggestions, please let me know.

Finally, the F-ALT08 gathering in the student union bar was a decent way to end the day. Good to meet people, get a badge and talk loosely about the work we do. The session this evening was about Massive Open Online Courses (MOOCs), namely the Connectivism and Connective Knowledge course which started today with over 1600 registered ‘participants’.

Connectivism and Connective Knowledge is a twelve week course that will explore the concepts of connectivism and connective knowledge and explore their application as a framework for theories of teaching and learning. It will outline a connectivist understanding of educational systems of the future. This course will help participants make sense of the transformative impact of technology in teaching and learning over the last decade. The voices calling for reform do so from many perspectives, with some suggesting ‘new learners’ require different learning models, others suggesting reform is needed due to globalization and increased competition, and still others suggesting technology is the salvation for the shortfalls evident in the system today. While each of these views tell us about the need for change, they overlook the primary reasons why change is required.

Apparently only about 15 people are registered for credit.  George Siemens, one of the two facilitators of the course is attending the conference, so I expect we’ll hear more about the MOOC over the next day or so. On the whole, most F-ALT attendees were sceptical about the value and longevity of MOOCs although I think it’s an interesting idea and hope it is a success, though how that is measured, I’m not sure. On an individual level, I think that with some effort, a lot could be gained from the 12 weeks of participation and reflective assignments. From my own experience of the Linux community over the last few years, I’m convinced of the benefits that can arise from participating in large, distributed, open and focused communities. Hopefully, these characteristics can also be developed in an educational context like the MOOC.

Life on a stick

Last week, I installed the latest Fedora (Red Hat) Linux operating system on a 2GB USB stick. The installation instructions were clear and, using a fast USB stick and PC, runs very well. There’s a nice Windows application that installs Fedora with just a few clicks. I use Ubuntu Linux at home and this was a nice way to try out Fedora and also carry around an entire Operating System with my preferred applications for use whenever I have access to a computer.

I’ve also run PortableApps from a USB stick. This allows me to run applications I use at home, such as Firefox and Pidgin, which are not available on the corporate desktop. The applications run isolated on the USB stick and all settings and cached data is preserved and taken away when you unplug it. The applications run well and look and feel like an application installed on the PC. Only certain applications have been ‘ported’ to Portableapps, but there’s a good selection.

I mention these two experiences because they’re examples of how individuals can continue to personalise their learning or working environments in situations where the computing environment on offer is necessarily restricted for security or support reasons. As software is increasingly running on the web, accessible from any browser, and as we continue to use computers in all aspects of life, whether at home, on the move or at work, there’s an expectation that our personal choices of preferred web browser, preferred IM client, our bookmarks, settings, saved passwords, etc. should continue to be available to us both inside and outside of institutions. JISC’s ‘In Their Own Words‘ report confirms this and apparently some employers are also acknowledging it by allowing staff to purchase their own PC equipment. It says a lot about our relationships with computer hardware and software. Not all technology has this effect on us. I’m still happy to use the work provided fridge and toaster although if I were using them constantly throughout the day, I may begin to object…

Do you wish your personalised computing environment was available to you whenever you turned on a PC?