[Haskell-cafe] Similarities between web programming and
functional programming
Marc Weber
marco-oweber at gmx.de
Sat Jun 12 17:50:53 EDT 2010
Excerpts from Nilanjan Raychaudhuri's message of Sat Jun 12 22:09:33 +0200 2010:
> Hi all,
>
> As a newbie into functional programming and especially Haskell I am curious
> to know how functional programming style fits into building web
> applications? And how it
> compares to building web apps in Ruby or Java.
You may want to pay attention to
- RAM usage (How many applications can you deploy on a single server)
- time required to prototype an idea
- how likely is it to get errors?
Ruby, PHP, Python are more likely because they are not statically
typed as Haskell.
- If there is an error / Exception how easy it is to track it down?
Ruby, Java, PHP, Python.. may win here because you have stack traces.
However I bet errors are much more likely to happen
- features:
- eg run your own server to keep state. (PHP can't do this unless you
use a database. Putting chat messages into a database can be done
but adds latency.)
- eg shared transactional memory is a great feature. However you have
to code much logic yourself which RDBMS do automatically if you add
some keys and constraints.
I'd add both Scala and HaXe to your list of interesting languages (I
don't have to add Haskell here)
Scala has many nice features of both: Haskell, Ruby and Java.
HaXe is unique because it can target many backends. It translates to JS,
Flash, PHP, neko, C++, ..
About Haskell there are different papers. One is about the web framework
WASH, another is about HSP, ..
Use the search of haskell.org and search hackage.
The haskell wiki is a great resource. Don't miss it.
haskell.org will tell you about the Haskell mailinglist which is
dedicated to web development only.
Comparing different languages (and frameworks) is no easy task. So good
luck. Two years ago I left a company (well I only was there for about 2
month) because developing web apps in Java seemed to be cumbersome to
me. However things may have changed. Today you can also translate Java
to JS etc depending on the framework.
If you give more details about what you're up to you may get more
relevant replies.
Marc Weber
More information about the Haskell-Cafe
mailing list