# Domain Modelling in a practical project

**URL:** <https://forums.fsharp.org/t/domain-modelling-in-a-practical-project/915>\
**Category:** General\
**Created:** [July 19, 2019, 7:33am UTC](https://forums.fsharp.org/t/domain-modelling-in-a-practical-project/915 "2019-07-19T07:33:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AcciaioDigitale](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/acciaiodigitale/32/693_2.png) [@AcciaioDigitale](https://forums.fsharp.org/u/AcciaioDigitale)\
**Post date:** [July 19, 2019, 7:33am UTC](https://forums.fsharp.org/t/domain-modelling-in-a-practical-project/915/1 "2019-07-19T07:33:20Z")

</div>

Hi pals!

I’m pretty new to F# and Functional Programming, at least from a production perspective.

I’m studying Domain Modeling Made Functional by Scott Wlaschin.  
Since I have to put in production a REST API and a Webapp and I want to do it in F# following those principles, which do you think can be the simplest framework for implementing it from a practical perspective?

I thinked of SAFE Stack (actually my first choice), Suave, Websharper or Simple [ASP.NET](http://ASP.NET) Core…but I have no suffice experience to choice the best solution

Any advice?

---

<div class="post-metadata">

**Author:** ![cartoro](https://avatars.discourse-cdn.com/v4/letter/c/ea5d25/32.png) [@cartoro](https://forums.fsharp.org/u/cartoro)\
**Post date:** [July 25, 2019, 11:21am UTC](https://forums.fsharp.org/t/domain-modelling-in-a-practical-project/915/2 "2019-07-25T11:21:21Z")

</div>

Hi,

I’d suggest WebSharper. I’ve been working with it for over 3 years in a fairly large code base now, and it is really good.

See: [https://forums.websharper.com/blog/77707](https://forums.websharper.com/blog/77707)

WebSharper is now at version 4.0

---

<div class="post-metadata">

**Author:** ![dlidstrom](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/dlidstrom/32/421_2.png) [@dlidstrom](https://forums.fsharp.org/u/dlidstrom)\
**Post date:** [July 26, 2019, 8:56am UTC](https://forums.fsharp.org/t/domain-modelling-in-a-practical-project/915/3 "2019-07-26T08:56:32Z")

</div>

You can start with [ASP.NET](http://ASP.NET) Core and then depending on your level of F# expertise with F# you can either use classes as usual to get a feel for F# or if you are already at that level you can go straight to Giraffe for the functional approach you want to take.

I think this is superiour to Suave, for example, as you can use a lot more community knowledge and official [ASP.NET](http://ASP.NET) Core documentation is superb.

Note that even if you use classes in F# you can still benefit from domain modelling as in the book with F# type system. I.e. not everything needs to be functional as with Giraffe/Suave. You’ll still be able to enjoy a lot of the benefits of F#.

---

<div class="post-metadata">

**Author:** ![drk-mtr](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/drk-mtr/32/624_2.png) [@drk-mtr](https://forums.fsharp.org/u/drk-mtr)\
**Post date:** [August 2, 2019, 6:08pm UTC](https://forums.fsharp.org/t/domain-modelling-in-a-practical-project/915/4 "2019-08-02T18:08:01Z")

</div>

I would have a play with Giraffe and Saturn and decide what you like.

Giraffe stays close to the [ASP.NET](http://ASP.NET) APIs whereas Saturn introduces some nice computation expressions over the top of it.

Personally as a beginner I struggled to know how to override Saturn when I needed to, and it’s at version 0.9. Despite it aiming at simplicity (and it’s heading in the right direction here), I feel I’d need to be a bit more advanced before I can get on with it. In my view Giraffe is definitely production ready though, and I’d have no problem basing a projection on this as the foundation - documentation is decent.

You’ve already found the SAFE stack. If I was doing a personal project I’d start there. For a team project I’d start with a raw Giraffe template - there’s a command line switch to create the template without a UI. I felt the latter approach gave me the best understanding of what was going on under the hood.

Disclaimer: I’ve never put an app into production.

---

<div class="post-metadata">

**Author:** ![dlidstrom](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/dlidstrom/32/421_2.png) [@dlidstrom](https://forums.fsharp.org/u/dlidstrom)\
**Post date:** [August 14, 2019, 8:06am UTC](https://forums.fsharp.org/t/domain-modelling-in-a-practical-project/915/5 "2019-08-14T08:06:20Z")

</div>

Here’s a twitter thread discussing this topic:

> <https://twitter.com/akhansari/status/1160859288866316288>
