apps

with F# web stack

Tomasz Heimowski @theimowski

http://theimowski.com

Agenda

  • SAFE - big picture
  • Demo
    • Overview
    • Creating SAFE apps
    • Building UI
    • Client <-> Server communication
    • Deploying
  • Q&A

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

Disclaimer

My goal

???

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

big picture


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

https://safe-stack.github.io

S for Suave

https://suave.io

  • Standalone, lightweight & composable web server
  • Alternatives:

A for Azure

https://azure.microsoft.com

  • Cloud provider from Microsoft
  • Alternatives:
    • Amazon Web Services
    • Google Cloud Platform

F for Fable

http://fable.io

E for Elmish

https://fable-elmish.github.io/elmish

  • UI library, inspired by Elm
  • Alternatives:

Demo overview

Simple voting form

Creating SAFE project

Prerequisites:

* removing this dependency is WIP

Creating SAFE project

  • Install SAFE template: dotnet new -i SAFE.Template
  • Create project from template: dotnet new SAFE
  • Build & run: build 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
  • Docker
  • Azure

Next steps

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

The video will soon be available on F# exchange website