It would be awesome to see a PHP extension to embed SpiderMonkey into PHP. As far as I’m aware Facebook is the only one that’s taken a step in that direction with FBJS, which uses Mozilla source code. Perhaps that could be a starting point.
For those who question security, it’s really up to the client to decide if it should parse JS, and what subset it should allow (perhaps no eval()). Having an API based on JS is really no less secure than any other language including one that’s home made. It’s advantage is that it’s used everywhere else and makes your API easier to work with.
This could be cornerstone of Web 3.0. Web 2.0 was largely about shared data and isolated small services. Web 3.0 could be about shared data and shared services.
Facebook today released the code behind their application platform. What that entails:
This release includes the API infrastructure, the FQL parser, the FBML parser, and FBJS, as well as implementations of many common methods and tags. We’ve included samples and some dummy data to help you get started fast.
Before releasing their API last year, Facebook bought Parakey, founded by Blake Ross and Joe Hewitt of Firefox fame. I don’t know if this code is actually derived from the unreleased Parakey, or even written by them. For all I know it could have been written by Facebook developers well before they were even acquired. Though if I had to place a bet, I’d guess this is code from Parakey. The code all looks pretty well scrubbed of anything that might give away Facebook secrets.
About Robert Accettura
Robert Accettura is a web developer, Mozilla contributor, open source advocate, tech enthusiast and occasional trouble maker. more »
You can follow this blog via RSS or follow me on any of the social sites below.