(in php/asp.net/python you should write something in backend for serve javascript responses as is it in rails with files .js.erb)
Is the cost really that high to warrant this?