What Is That Dang Thing?
In this talk, we'll cover grafting Silex on to an existing Drupal 7 site so it can provide a RESTful API to the Drupal data.
Specifically, for a crazy edge case of using a virtual world's in-game scripting language you've never heard of (LSL) to query a Drupal 7 site.
The github repo is here: https://github.com/paul-m/druplex
I needed to do it, and you might need to as well.
Services module does a lot of good things, but its RESTful API is frustratingly specific to its implementation, and it's very brittle for some uses.
Also we'll see how easy everything is in Silex as compared to writing a Services extension.
Silex is a minimalistic web framework built using Symfony components. Silex makes it (relatively) easy to design and implement a RESTful API.
Why Should I Attend?
Join in the fun as we disable Services and get our hands dirty in the code that shims between Silex and Drupal's APIs.
Behold as justifications are made for reasonably marginal security decisions.
Enjoin the conversation about how best to write tests for this thing.
Also: It's hooked up to a computer game, OK?
Things You Should Be Familiar With
Hopefully I'll be clear and easy to understand, but I'll be moving through the subject quickly. Best to have some of this under your belt:
- Understanding what you're seeing when someone's typing at the bash prompt.
- Some basic REST background: http://en.wikipedia.org/wiki/Representational_state_transfer
- Some basic knowledge of Drupal 7 internals and APIs.
Things you'll learn:
- What is Silex?
- How can I override Drupal 7's front controller?
- How flexible is Drupal 7's API?
Food for thought you might leave with:
- Is this a better way than D8 Migrate?
- Why have we not done this sooner?