Notes on Aaron Swartz’s A Programmable Web

Shu

Building Programmable Web Sites by Aaron Swartz, 2009

#Thoughts

  1. 如果你热爱某东西,你应当希望它变得更好——不是对于自己更有用,而是让人人都能从中受益;
  2. 关于 isolated clients:应当批评 WeChat/Facebook 的一些做法;
  3. 展望:最近看了 WebRTC 的 draft,非常期待……可能会变成 Aaron 期待的未来应用雏形。但 Instant Article/微信小程序 又使 Web 的未来更不确定了;
  4. 你们是天才;
  5. “Sure, it sounds a little bit crazy. But it paid off the last time they made that gamble: we ended up with a little thing called the World Wide Web. Let's see if they can do it again.”

#Notes

About API

APIs only let you look at the data in a particular way, typically the way that the hosting site looks at it

About API, II (Q: differences between data, protocol, API?)

pass the noun to the verb: /share?v=1234 pass the verb to the noun: /v/1234?m=share

Then he describes the interesting hybrid that the Web adopted, which he terms "Representational State Transfer" or REST.

About Standard and “design”

And instead of spending time building things, they've convinced people interested in these ideas that the first thing we need to do is write standards. (To engineers, this is absurd from the start -- standards are things you write after you've got something working, not before!)

Fortunately for us, the Web was designed with this future in mind. The protocols that underpin it are not designed simply to provide pages for human consumption, but also to easily accommodate the menagerie of spiders, bots, and scripts that explore its fertile soil. ...for applications.

Then we'll look into what it means for your application to be not just another tool for people and software to use, but part of the ecology -- a section of the programmable web. This means exposing your data to be queried and copied and integrated, even without explicit permission, into the larger software ecosystem, while protecting users' freedom.

The more likely option is, of course, to break away from the Web altogether, and force people to download special software to use your application. ... If that's a choice you want to make, you probably shouldn't be reading this book.

This is one of the secrets of success on the Web: the more you send people away, the more they come back

About URL, URI

Moreover, URLs do not just exist as isolated entities

URLs shouldn't change (and if they do change, the old ones should redirect to the new ones) so they should only contain information about the page that never changes. This leads to some obvious requirements.

First, URLs shouldn't include technical details of the software you used to build your website, since that could change at any moment

About TBL

And even then, they're far more limited than the wide-reaching interactivity that Berners-Lee imagined.

Instead, they used the clone created by a team at the University of Illinois Urbana-Champaign (UIUC), which never supported editing because programmer Marc Andreesen was too dumb to figure out how to do page editing with inline pictures, something Tim Berners-Lee's version had no problem with.