As Phil Karlton said, “there are only two hard things in Computer Science: cache invalidation and naming things.” Despite enormous advances in the field of web development over the last five years, it remains difficult to use caching to allow sites to scale for expanding user bases. Fortunately, the last few years have also seen the rise of JavaScript libraries that take a lot of the pain out of client-side programming. In this talk, we’ll explore techniques for making your sites feel faster, without resorting to complicated caching schemes, while maintaining strict separation of content, style, and behavior.
Associated code is available at http://github.com/dce/dbdb
17. class DbsController < ApplicationController
def show
@db = Db.find(params[:id])
respond_to do |format|
format.html
format.js do
render :partial => quot;profilequot;, :locals => { :db => @db }
end
end
end
end
Monday, March 23, 2009
29. class DbsController < ApplicationController
def show
@db = Db.find(params[:id])
respond_to do |format|
format.html
format.js { ... }
format.json do
render :json => { :bagfactor => @db.bagfactor }
end
end
end
end
Monday, March 23, 2009