This chapter will tie together even more of what we’ve seen so far, bringing both the functional paradigm and core abstractions, such as Task-based asynchronous programming and Options to enable web programming that naturally fits with F#.
This section briefly summarizes HTTP and explains why (although this may surprise you) FP is a natural fit for web programming. One of the fundamental underpinnings of the web today was the invention of the Hypertext Transfer Protocol (HTTP), which provided a standard messaging format for web traffic. These days we see many frameworks use OOP patterns as a way of modelling web applications such as Controllers. In such frameworks, you often create classes that have methods decorated in some way such that web requests are correctly routed to a method; you’ll often have to inherit from “base classes” which give extra functionality. All of this is especially unfortunate because it’s just hiding what HTTP really is (figure 13.1).