Amazon supports Static JavaScript Apps

It doesn't happen very often when there's a true tech breakthrough, but this is one of those moments. If you care about Internet applications, pay attention to this one, it's important.

Background

If an app running in the browser, written in JavaScript, needs to talk to a web service like Twitter, Facebook, Evernote, etc -- you have to write a server app to act as a proxy, because it's not possible for the JS code to directly call the service. This makes building an app more costly because it's more complex, but even more important, it makes it necessary to scale the app. Every user costs more money, thus forcing you to either raise money from investors or sell access to the users to advertisers. This is the way the browser-based software world works today, mostly.

Expand this headline to see a crude hand-drawn illustration of how it works today.

A picture named graph.gif

Dropbox broke new ground

Then a little over a year ago, Dropbox did something amazing.

They basically sucked the functionality of the proxy server into dropbox.com, making it unnecessary to create an inbetween server. All of a sudden you don't need to write server software to build an app that connects with Dropbox. Poof! There goes the scaling problem. And also the need to raise money or sell the users to advertisers.

The scaling still has to be done, but it's done by Dropbox. They make it work not by selling users to advertisers, rather by charging people to use their service. Perfect. These economics feel just right.

And that's how we built our Fargo outliner, and that's why it performs great no matter how many people use it.

Now Amazon is doing it

But what about the other services in the picture? I've been trying to talk with whoever I can at these companies to urge them to do the same as Dropbox did. If a few of them do, I reasoned, we'd get to critical mass sooner, and then some really interesting stuff would happen. All kinds of apps would be possible. Alas, none had done it -- until yesterday, when Amazon announced their AWS SDK for JavaScript in the Browser. Theoretically, it does for their web services, what Dropbox did for theirs. The claim is that you can call directly to their servers to do the kinds of things you used to need a proxy for.

I have tested the claim, very quickly in a limited way, using a sample app they provided. I had to register as a developer on Facebook, so the user can use their login to access my software. I created a new bucket, s3.scripting.com, put my app in the bucket, added a CORS configuration, and ran it. It worked the first time. I can click a button and upload an image to my bucket, using my Facebook login, and there's no proxy server involved.

Demo

You can try it yourself. Here's the app.

I will have to delete any pictures that are uploaded there, I don't want to compete with Instagram or Flickr, but I want you all to see the idea in action. And there's the code, just do a View Source, you can take it and modify it to work with your servers. The instructions that Amazon provides are pretty easy to follow.

Where to next?

This is a great move, since the Amazon web services world is so rich, and so widely used by developers. I would love to see Evernote, WordPress and Twitter get on board with a simple interface for in-browser JavaScript apps. Then we'd be able to do some incredible stuff.

PS: Also we need a better acronym than SJSA. Ideas?


Posted: Fri, 01 Nov 2013 15:06:06 GMT