apps

with F# web stack

Tomasz Heimowski http://theimowski.com

@theimowski

Agenda

  • F#
  • SAFE
  • Demo
  • Q&A

Slides available at

http://theimowski.com/talk-safe-stack

Disclaimer

My goal

F#

F#

  • Microsoft origin, OSS
  • General purpose
  • Functional-first
  • .NET / Mono / .NET Core / Web browser
  • https://fsharp.org/

???

Mean

https://www.troofal.com/services/mean-stack

LAMP

https://www.programmableweb.com/news/what-mean-stack-and-why-it-better-lamp/analysis/2015/12/22

LAMP

https://www.unixmen.com/how-to-install-lamp-stack-ubuntu-17-04

PHP_LOL

https://twitter.com/krisajenkins/status/903988761171820544





CATS

(Typical MS Stack)

big picture


  • Web stack
  • Combines several OSS projects
  • F# end-to-end
  • Type-SAFE
  • Cloud-ready
  • Flexible

https://safe-stack.github.io

S for Saturn

https://saturnframework.org/

  • Web server
  • ASP.NET Core, Kestrel
  • MVC pattern

A for Azure

https://azure.microsoft.com

  • Cloud provider

F for Fable

http://fable.io

  • F# to JavaScript compiler
  • Babel JS

E for Elmish

https://elmish.github.io

  • UI library
  • inspired by Elm

demo_mobile

demo_mobile

Creating SAFE project

Prerequisites:

Creating SAFE project

  • Install SAFE template: dotnet new -i SAFE.Template
  • Create project from template: dotnet new SAFE
  • Build & run: fake build --target run
  • Wait for build to finish: app opens up in browser

Architecture

Building form

Client side debugging

Talking to server side

  • Fable.Remoting
  • Server refresh (dotnet watch)
  • Triggering calls from Client side

Deploying the app

  • Bundle
  • Azure Resource Manager (ARM) Template
  • Azure App Service

Next steps

Slides: http://theimowski.com/talk-safe-stack