Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Source code of well designed functional web apps?

What are examples of well designed functional (as opposed to object oriented) web apps that make their source code available? I am currently studying the Hacker News source but I'd like to see some other non-trivial examples, ideally in clojure.

For MVC there are lots of Rails and PHP apps, frameworks, and tutorials to study - what is there for functional programming?

like image 320
Lorenz Avatar asked Aug 12 '09 08:08

Lorenz


1 Answers

There's:

  • Compojure (clojure)
  • PLT Scheme Webserver (PLT Scheme)
  • Erlyweb (erlang)
  • Seaside (smalltalk)

That list is enough to keep you busy giving a sample of functional languages with different characteristics:

  • Clojure: multi-paradigm?, flexible? it isn't a pure functional language and although it is preferred that you program in a functional style, it isn't strictly necessary. You can write java-style OOP through the Java interop, or you can abstract away from it using multi-methods. There's a lot of flexibility there, although it is still a little early to say whether it is just "flexible" or "multiparadigm" in the way common lisp is. Designed, in part, to be a lisp that handles concurrency easily, it actually shoots at a lot of targets, hence the flexible or multiparadigm designation.
  • Scheme: Closer to being a pure functional language than Clojure, it pushes the programmer a bit more forcefully into a functional style than does Clojure.
  • Erlang: Functional programming built for reliable concurrency. Erlyweb is built on a platform that is designed to be highly concurrent.
  • Smalltalk: Highly OO functional programming (even control structures are objects within the object system, and not syntactic constructs).

If you want to see how webapps look in a language that is functional "at all costs", then the jrockway's suggestion is the one to look at.

like image 87
Pinochle Avatar answered Oct 26 '22 01:10

Pinochle