Hacker News new | ask | show | jobs
by pauloortins 4608 days ago
Is possible to use F# for web applications ?
1 comments

Yes, but you have to make an effort. Quick google: http://tomasp.net/blog/fsharp-mvc-web.aspx/
Since then, F# has a full LINQ-to-SQL generator (via the Type Providers mechanism), so you don't need that part of the interop.

Also, this is more of a Visual Studio/web framework issue. The VS people chose to ignore F# with their project type specifications. And the MVC people are very C# oriented, depending on C#-compiler implementation details for many of their methods.

Frameworks like WebSharper, for example, allow you to use full F# across the stack.

On the other hand, using MVC with F# controllers is very smooth, and you can use C# on the rendering engine, as there's rarely much code at all going into the actual view part.

That article is 3.5 years old -- much has changed since then.

The F# Foundation site has up-to-date information: http://fsharp.org/webstacks/

About the only thing I know of that you can't do with F# right now (in terms of web development) is write inline code in ASP.NET MVC Razor views. That's not too big a deal though, since you can still write the guts of the application (e.g., your controllers) in F#.