It is possible to think of the internet as a gigantic hard drive.
There are files to get, there are web pages to look at, there are even programs to run.
We've all downloaded a file, and we've all looked at a webpage... This is akin to running a GUI app. But what about web services?
I am pretty sure GUI apps are to Web pages as Command line programs are to Web services.
Maybe we have been treating web services wrong. Any shell hacker knows that the best place to put documentation is into a /? or --help parameter. Why haven't we done this with Web services?
What is it about web services that make us want to take everything, and stuff them into the equivalent of a help file? You remember those. They are bothersome, and only necessary for exhaustive searches about how to use something. Much better instead to just run the command line app, and read the usage.
Well guess what guys, I don't see a usage in any web service anywhere. In fact, the URL bar kinda bothers me, because it doesn't even have the basic functionality required to perform the most simple things, like piping.In short, web browsers make for crappy terminals. I can't even assemble a multi-part piece of form data without building a webpage to do it.
What I see as the future steps to get this working well:
Build a command line shell where web service calls/Javascript/web browsing/JSON extraction/etc are pretty much all first level members. Superstars. Bash for the web.
Eventually, one day, I might be able to do this:
http://api.twitter.com/1/statuses/user_timeline.json -id=lomilar -count=50 | jsongrep text | http://service.metaglance.com/api/json/getmetadatatext -key=blahblah
It will go fetch all my tweets, rip the text out of them, assemble them into a multi-part form request, ship them to the Metaglance web service with my key, and return back the metadata that I need.
Doesn't that seem better than the couple _pages_ of Javascript that it takes to do that?
--Fritz
No comments:
Post a Comment