开发者

Getting started with ASP.NET using F#?

Hai guys,

  • Where should i start before using F#?

  • What are the Learning curves in F#?

  • 开发者_运维技巧What should developers moving from C# watch out for when they move to F#?


Tomas Petricek's "F# web tool kit" is an interesting example of using F# for asp.net development.


In addition to what was already mentioned, I wrote a brief article which explains how to use F# in standard ASP.NET applications. Unfortunatelly, the sample application is no longer available as part of the F# distribution :-(. You can also try using F# with the ASP.NET MVC framework (which is somewhat simpler than standard ASP.NET web forms, but is less component-oriented). I don't have any definite link, but googling for "F# asp.net mvc" should do the trick.


You might want to take a look at IntelliFactory's WebSharper project at IntelliFactory.com.

It's main purpose is to grant the programmer with the ability to use only one language (F#) to develop a website and also to grant built-in tools for making the webprogrammers' life simpler (e.g. formlets and flowlets).

As for learning F# I'd recommend you the book Expert F#.

Moving from C# to F# can be difficult not only because of the syntactic differences, but because of moving from imperative programming to functional programming. If you want to follow functional programming in F#, you should get used to immutability, pure functions, workflows (monads in Haskell) and similar concepts. Expert F# for example can show and teach you examples, but I'm quite sure Google can also help.


I like what Robert Harvey proposed and what Tomas added. I am new to F# too and I would like to comment on the three bullets, which refer prior to ASP.NET + F# by simply asking for a 101 in F#.

You will definitely need some theoretical foundation before diving into F#. Erik's 13-episode Lecture, in Channel 9, is the best place to start

C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals

F# isn't the quick and dirty way, nor the quick and reusable way we learned via oop design patterns. I think that you should take some time to embrace some of the basics. Afterwards, a good book like Tomas's (still waiting the hard copy here in Greece... grrrr :P) and writing alongside, some little code to get used with e.g., currying and other aspects, is what you need. My estimation of the learning curve depends in your mathematical background. Even if you haven't got any clue about functional programming, if for example you come from a Computer Science uni you will struggle your way through wisdom pretty soon ;););)

And then you will enjoy the F# in Business Line Applications and improve your C# code too!!!!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜