Building Modular, Scalable Web Apps? Of CORS!

Last weekend I had the opportunity to speak at RubyConf 2012 about a topic that is very exciting to me: Cross-Origin Resource Sharing (CORS). CORS allows for true cross-domain AJAX in the browser which, while simple in concept, is powerful in potential. The fine people at Confreaks recorded the session and you can watch it here:

There are two extremely interesting new things you can do with CORS (and probably many more yet to be discovered):

  1. SOA in the Browser. With CORS you can implement lightweight HTTP services that are called and coordinated through the browser instead of on the server. This gives you the modularity to scale pieces independently without the complexity of weaving together a server-side service fabric.
  2. Serverless Mashups. When more APIs implement CORS (like GitHub and Amazon S3 currently do) it will be possible to construct mashups with zero server-side code that can be hosted statically and distributed via CDN.

To find out more about how to implement CORS in your Ruby web apps and my thoughts about where this all is going, check out the video.