Build an ASP.NET Core Web App with F#? You must be having a Giraffe!
Slide 2
What I’ll cover
◉ What is Giraffe ◉ Where does it fit in? ◉ How does it work?
2
Slide 3
1
What is it?
3
Slide 4
4
A functional ASP.NET Core micro web framework for building rich web applications.
“
Slide 5
5
Slide 6
Idiomatic C#
Idiomatic F#
6
Slide 7
An example Giraffe app (source) 7
Slide 8
1
How does it work?
8
Slide 9
Let’s model it!
type HttpServer =
9
Slide 10
Let’s model it!
type HttpHandler =
10
Slide 11
Let’s model it!
11
Slide 12
Let’s model it!
type HttpHandler =
12
Slide 13
Let’s model it!
(compose)
13
Slide 14
Let’s model it!
14
Slide 15
Let’s model it!
type HttpHandler =
15
Slide 16
Let’s model it!
But it could be better… https://medium.com/@gerardtoconnor/carry-on-continuation -over-binding-pipelines-for-functional-web-58bd7e6ea009
16
Slide 17
Let’s model it!
type HttpFunc =
type HttpHandler =
17
Slide 18
Let’s model it!
Familiar… ASP.NET Core Middleware
18
Slide 19
Performance! 19
Slide 20
It’s a fullstack framework!
◉ View engines ○ DotLiquid ○ Razor ○ GiraffeViewEngine (HTML DSL)
◉ Much more
20