In a nutshell, I'm told that one of the great things about Rails is that you don't have to do all this middleware work to access the database. It gens up objects and they Just Work (tm).
Other people talk about how great middleware is: Create your Service Oriented Architecture as though the database doesn't even exist, and interact with it that way. Do all the ugly database stuff for the back-end of that.
Is the upshot of this that you should write middleware with Rails?