Development Seed

Blog

Extendr for Flickr and Views

Showing the Views Module the World Beyond the Drupal Database

For the past week or so, I’ve been sneaking in some work on a proof-of-concept Drupal module – Extendr. The idea behind the module was to see how difficult it would be to use the Views module to query something other than a SQL database. In short it was easy…dangerously easy.

A Google Summer of Code student had begun exploring the concept of using the Views module to show results from Apache Solr and wrote a patch to Views that made this possible. What the patch does is allow developers to direct Views to use different code to build a query, so that instead of putting together SQL to query a database, like MySQL of PostgreSQL, you could query a web-service like Flickr. This is exactly what Extendr does, take a look:

This kind of integration is very basic, though immediately useful, and it is just the start. It’s easy to imagine how this sort of functionality could be use to integrate with other social web services, like Twitter or Upcoming, and perhaps with a bit more work it could be possible to write a module which adds SPARQL functionality to views. In addition to these sorts of remote integration, I imagine that allowing developers to provide Views with an alternative query type would make it possible to use Views to generate highly optimized, or specialized, queries.

I’ve made the code for the Extendr module available, but don’t expect to see it as a release on Drupal.org. It’s a proof-of-concept that relies on a patch to Views. Hopefully once that patch gets committed and the functionality makes it’s way to a stable release, this kind of functionality will make it into existing modules.

RDF + SPARQL

Awesome work, guys – as usual! Jeff, shot you an e-mail about SPARQL collaboration on this.

great work

This is so cool, as the only modules I’ve written have been:

a) query a web service b) cache it in a local table c) expose to views d) rinse and repeat

It’s a fairly redundant process and I’ve thought about potential ways that it could be abstracted (a la FeedAPI Element Mapper) but it makes my brain hurt!

Thank you for Extendr!

yeah :)

That’s brilliant! I’m really excited about the possibilities this views patch would bring us, solr, flickr, sparql, listing stuff from any web service – that’s really amazing!

Amazing

Wow.

Is it me, or have a lot of really creative AND useful modules been popping up lately? And building on top of other awesome efforts to boot.

IMO Drupal should be making more headlines =)

Fantastic work! Keep it up!

Infinite interoperability

This is a great concept, almost to the day one year after Dries posted about the future of infinite interoperability. Nice work Jeff!

Awesome.

Awesome.

Wow!

I’m still looking for my jaw, it’s on the floor, somewhere.

Great work!

cool!

i was so excited to learn about sparql at last year’s drupalcon, so it’s really cool to start to see it in action.

Well done, this has lots of

Well done, this has lots of potential.

OMG!

This is brilliant. I’m still getting to grips with Views 2 but already I’ve wanted this kind of functionality without having to use FeedAPI -> Field Element Mapper -> CCK -> Views. Being able to do live views without having to sync or create copies of external data would be amazing. Great work. This could be very big for Drupal (well me at least) – keep it up.

Whoa.

If this could be rigged up to twitter etc, yeah this is way awesome.

Perhaps interpreting xml as fields via a descriptive document?

Thank you!

I have immediate use for this.

With a little more work, I can see making a query of my net-enabled refrigerator to see if there is any beer left.

whoa

Wow – this is really flippin’ cool. I can see there being lots and lots of usefulness coming out of this…

-mike

Oh my!

I can already imagine lots of uses. So basically you could query any web app with an API? Open Social, Pipes…

Here's the patch in question

http://drupal.org/node/293841

Great work Jeff! This looks really exciting, and the ApacheSolr world is grateful to you and Thomas Seidl for your work on the Views patch.

This is beyond awesome!

This is fantastic! Nice one!!