Introduction to .NET for new F# user?

I’m learning F# and reading various resources/books on the subject, but one thing that frustrates me is the fact that almost every resource assumes that the reader is familiar with .NET and/or C#. I’m coming from a Java/Javascript background and have never used .NET before. I’m slowly picking up pieces of how things work and I’ve managed to write a simple console application, but I feel like I’m missing some fundamental information about working with the .NET environment.

Are there any resources that approach learning F# from the perspective of someone who is new to both the F# language and the .NET environment? If not, are there some good resources which can get a person up-to-speed quickly with .NET? My current approach of learning seems very hit and miss. For me this has been one of the more frustrating aspects of learning F#. In the past, I could just learn a new language and be done, but with F# I have to learn the language and the ecosystem to really make use of it. Don’t get me wrong, I’m really loving F#, but some of the learning curve is frustrating.

Thanks!

5 Likes

It depends on your goals.

If you want to use Fable and stay in JavaScript ecosystem, them 2 F# books from https://www.syncfusion.com/ebooks would be an excellent start.

But if you want to dive deep into .NET ecosystem, then I would recommend reading

  1. Effective C# (Covers C# 6.0), (includes Content Update Program): 50 Specific Ways to Improve Your C# (3rd Edition)
  2. Effective C# (Covers C# 4.0): 50 Specific Ways to Improve Your C# (2nd Edition)

Although it looks like it is about C#, but these books explain main concepts withing very few pages.

Did you have a look at “F# for fun and profit”, available at https://fsharpforfunandprofit.com/? I found this web site very helpful for getting started with F#. Their “Getting started” is making few references to .NET.

1 Like

I can really relate to the OP. I have loved learning F# and have really enjoyed writing a console application in Visual Studio 2019 but I would like to do a very simple website:

  • User fills in a couple of textboxes on a website.
  • F# does some server-side work on the strings from the textboxes, and returns another string to display in a third textbox on the website.

I have written websites using PHP for server-side code and it was a breeze. I am very new to ASP.Net and despite spending hours looking at books and videos on ASP.Net Core, I am ashamed to admit that I still have no idea how to get a simple website like the one above up and running.

Is there a sample Visual Studio project that does something like the above that I can then try to adapt?

@PhiloHume If you want your web app to have a rich front-end experience and want to use F# across the whole stack, then have you considered the SAFE Stack? At Compositional IT, we use the SAFE Template as our starting point for web projects.

1 Like

@Prash - thanks. I did look at it and it looks great but in the end I just went for the option of creating a C# web application in Visual Studio and then bolting on my F# console application. It’s a little clumsy but at least I have now got something working.