My 20 tips recipe for #fsharp web dev for fairly complex app, @fsharponline
1- Go MultiPage, Micro-frontends: A good book is here
manning.com/books/micro-fr…
2-Use HTMX with giraffe but not Giraffe.HTMX, nor any engine just plain string interpolation with
Highlight templates in F#
3- For htmx use my fork as it supports shadow dom with more proper form validation, just grab the js file
github.com/OnurGumus/htmx…
Use with alpine not hyperscript as alpinejs supports shadow dom
4- For shadow dom support you need to call process elements and alpine's initTree
5- Use Fable.Lit along with Vite for dynamic parts of app. Just bring your tag from serverside via htmx and Lit will render it. Bam!

6- Use Monolithic Elmish but also use Elmish store to break monolithsm where desired.
7- Separate state section (init and update) functions and render (view) into separate projects, so you can test your init update from a .net test project.

8- Use alt.cover for test coverage with CRAP score

9-For Fable.Lit use both shadowed and not shadowed elements
10- For backend, consider using CQRS via actors. For database if not required, choose SQLite with SQLProvider

11- Use DevContainers as on MacOS http2 is not supported but only on linux. Required for proper web benchmarking.
12- Consider using BDD via TickSpec
github.com/fsprojects/Tic…
13- For automation tests, consider using Playwright or Puppeteer.

14- Use Paket and Fake

15- WebSharper, Bolero and Fun.Blazor is equally good if you like more opinionated UI

16- Use Fable.Remoting for calls and Fable.Elmish.Bridge for web socketing
17- Remember you can embed React inside Fable.Lit (both in Feliz or TypeScript from)

18- In serverside use UseSPA extension from Microsoft.AspNetCore.SpaServices.Extensions package

19- Use Type safety with Fable.Aether optics library
github.com/et1975/fable-a…
20- Feel free to ping me for any questions about. I will gladly help.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Onur Gümüş

Onur Gümüş Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(