Full stack web development in F#
by Zaid Ajaj
Zaid Ajaj
Originally from Iraq
Living in the Netherlands
Lead Developer at eSightMonitoring
Working with C#, Javascript, F# and SQL
Active OSS contibutor to everything F#-related
Author of The Elmish Book
Follow me on Twitter & Github for F# news and latest developments
✔️ What is F#?
✔️ Why learn and use F#?
✔️ Getting started
✔️ Functional thinking
✔️ Unit testing
☐ Data access
☐ Beginning SAFE-Stack
Beginning SAFE-Stack
Understanding The Template
Working with the backend
Working with the frontend
Data Access
Revisiting Unit Testing
Server (backend)
Client (frontend)
Test projects
Build project
The workflow
Full Stack F# web development
Compiling to Javascript using Fable
Modern intergration with the JS ecosystem
Fable already has a large set of bindings
Using SAFE.Simplified template
Abstracting HTTP/JSON away with Fable.Remoting
Alternative to the official SAFE-Template
Relies heavily on AspNet Core
AspNet Core -> Giraffe -> Saturn
Logging
Configuration
Dependency Injection
Fable.Remoting (RPC)
Mix and match with REST endpoints
F# to JS via Fable
Relies heavily on React
React -> Feliz
State management by Elmish (optional)
Integrated with the JS ecosystem
Bindings for existing libraries (like Feliz)
Very simple when using Npgsql.FSharp
Built ontop of Ngpsql
Static SQL analysis in VS using Npgsql.FSharp.Analyzer
Schema management with migrations out of scope, recommended to use DbUp
Similar API for different providers
DustyTables for MS-SQL
Fumble for SQLite
No static analysis :(
Using Expecto
Building test utilities with functions
See you next time.
Questions?