Architecting better web-apps

I came across this excellent talk: . Ironically, the best way to write web-apps is to not write web-apps. I mean, we should just write applications. Without assuming anything about the web, http etc. Http is a just a delivery mechanism, a detail. The app should work as a library or a gem. Apparently, the app needn't even be closely integrated with the datastore. This is the part that Raghu and I are debating. Should a web-app assume a datastore? Should it implement the datastore?