Similarities between web programming and functional programming

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. Any pointer to article/literature will be helpful. Thanks Nilanjan

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

Unless you are using a framework like Twisted, where all potentially blocking operations are handled by passing in a function to be called when the operation is complete, so that the stack trace is non-existent. This way you get both the joy of working with a language where simple mistakes won't be caught automatically until they cause a failure at runtime *and* the joy of not having traces that tell you exactly what led up to an error. Fun times. Not that I'm bitter... :-) Cheers, Greg On Jun 12, 2010, at 2:50 PM, Marc Weber wrote:
Ruby, Java, PHP, Python.. may win here because you have stack traces. However I bet errors are much more likely to happen
participants (3)
-
Gregory Crosswhite
-
Marc Weber
-
Nilanjan Raychaudhuri