Chapter 11. F# in the enterprise

 

Chris Ballard

Let’s be blunt: adoption of F# in the enterprise has two significant problems as things currently stand. First, existing enterprise developers typically don’t know much about functional development; second, there aren’t many people on the job market with demonstrable skills in functional development. Few companies can afford to send their entire development staff off to an intensive course in F# and functional programming, or to introduce this training as a general overhead for new joiners.

Organizations need to be smart and ensure that the way they develop code matches the experience levels of their development staff. Because F# is a CLR-based language, fully integrated into Visual Studio, it’s easy to design software that uses F# for the “sweet spots” and C# for the rest (or even Visual Basic, if that floats your boat). Don’t forget, also, that more and more functional concepts are being absorbed into the C# language, so the skills gap between imperative and functional development is definitely becoming narrower, at least in the .NET world.

In this chapter, I’ll show you how F# can be used as one part of an overall enterprise project. Depending on the experience of the team, F# could play either a small or a large role. You’ll use a sample project to explore building a small to medium-sized application using a mix of C# and F# (but I’m biased, so in this case it will be mostly F#!).

Sample project

We’ll start with some data

Creating the basic service implementation

Creating a client wrapper for the service

Giving your application a user interface

Summary

About the author