Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Take a look at ring for clojure, which is a web server interface very similar to ruby rack.

Because it passes every request as a map you can hook functions (middleware) in between that change the behaviour of the request handling, for example they could add a field for passed params or fields for user authentication.

This is possible because maps are easily extendable and functions down the line don't need to know about additional keys. You can't do that with OO properly.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: