Hacker News new | ask | show | jobs
by MichaelGG 5738 days ago
Most of the time, we use F# on the backend, using C# as little as possible. For web apps, that usually means the ASPX files themselves. For the MVC controllers, writing them in F# seems to work great.

The largest contention point arises when we pass F#-ish types to the ASPX page for rendering. It works, it's just that the C# required at that point can be sort of ugly.

Also, don't forget WebSharper, which provides a way to write all your client-side code (JavaScript) in F#. It handles all sorts of things, including async RPC calls. http://www.intellifactory.com/products/wsp/Home.aspx

1 comments

The Intellifactory guys really know their F#. But this seems too much like WebForms and MSAjax for my tastes. After a while autogenerated javascript and HTML becomes very problematic, to say the least. If I want javascript, I'll just write it myself.

Now what I'd really like to see is an F# stand alone webserver - that would operate outside of ASP.NET/IIS. I envision a functional Request/Response pipeline, where you can augment the pipeline using function compositoin. Perhaps this could even handled by a computation expression or workflow. ( For those unfamiliar with F#, this is one of the killer features. See how simple it is to handle Async or parallel processing in F#).

Chris Smith has an interesting example of a Session State workflow in his F# book - I would like to see someone attempt that with a full fledged server.