HackerTube
HomeLongsLikedHistoryWatch laterCategoriesPlaylistsSettings

Domain Modeling Made Functional - Scott Wlaschin

NDC Conferences6 HN recommenders · recommended in 7 months, 2018-2024
YouTube
71K views · 9 years ago · talk · evergreen

Scott Wlaschin's NDC talk on using statically typed functional programming, F# in particular, to model a business domain. Types are used to represent the domain precisely and to encode business rules so that illegal states cannot be built, with the compiler acting as an instant unit test.

HN people recommend it as an eye-opening talk whose domain-modeling ideas carry over to other languages and make a strong compiler feel like a coding partner.

Functional programmingSoftware architecture & designProgramming language design#f##domain-drivendesign#typesystems#functionalprogramming#makingillegalstatesunrepresentable

9 comments from Hacker News

@agentultra2024 · in “Why Haskell?”

I adore Scott Wlaschin's work [0] -- that's where I picked up on the acronym, BLOBS! F# is super cool, I agree. [0] ▶ this video

RecommendsView on HN
@valand2022 · in “The new wave of React state management”

I haven't worked with Qt so I don't know how the API looks, But on a complex app, to see "dirty bitflags", "intermediate values", "redrew the UI in the middle of mutating document state", I feel what you feel, and I want to share what helps me and my team overcome this kind of complexity. This happened a few years ago to my team. We alleviated this with several solutions. The most effective solutions is to 1.) separate UI logic/compositive component from UI visual/appearance component, 2.) separate UI component from actors. 1.) Separating logic from visual helps developers define problems separately, especially those around the required states, step-functions, and lifecycle. We made this separation because of three things: 1.) We observed that our programmers are simply divided into these two categories, 2.) The dependencies of these two sets of components are simply different (e.g. logic --depends-on-> actors and ownership/lifetime management modules, while visuals depends on DOM, rendering, setting up callbacks), 3.) It is actually good to have a high cohesion between UI and logic modules. You may want to use the same UI for a slightly different logic, and vice versa. 2.) Separating UI component from actors helps a lot with decoupling state changes and re-rendering, and actually gives developer a chance to separate/abstract/generalize concerns when things have gotten too complex to be written in a UI component. Actors is what I call any kinds of data that can act, have thei

CitesView on HN
@carapace2021 · in “One Way to Represent Things”

Take something like the design discipline Scott Wlaschin describes in this talk "Domain Modeling Made Functional"[1]. Combine it with a catalog of standard models like David Hay's "Data Model Patterns: A Metadata Map"[2] which is like a Pattern Language for data models combined with a catalog covering most (enterprise) needs. Specify the binary formats with Erlang "bit syntax"[3]. Eh? [1] ▶ this video [2] link [3] link

CitesView on HN
@carapace2021 · in “Haskell is a Bad Programming Language (2020)”

In re: Haskell's goodness or badness, compare and contrast with, say, PHP (crap language with wild success.) Or Prolog (a stately Elven language with deep but obscure success.) Haskell is what it is. In re: types and data, FP is good for that. See e.g. "Domain Modeling Made Functional" by Scott Wlaschin ( ▶ this video ) it's about F# but the concepts apply cross-language. In re: FP PLs "done right" I submit Elm lang. I've been using Elm recently and it gets the job done. It's weird though: on the one hand, as a experienced professional it feels like a toy. The error messages feel almost insulting, like I'm being patronized. On the other hand, once I got over that (silly) reaction, they're awesome. Changing code is a breeze, because Elm leverages the crap out of the type system, and the structure of the code and runtime prevent whole vast categories of errors. Combine that with the sort of Domain-Driven development that Wlaschin is talking about and "baby, you got a stew going!"

RecommendsView on HN
@carapace2020 · in “Write code. Not too much. Mostly functions.”

I like this talk: "Domain Modeling Made Functional" by Scott Wlaschin ▶ this video He's working in F# but the concepts map. There's a fascinating book "Data Model Patterns: A Metadata Map" by David C. Hay that's pretty much a Pattern Language or catalog for data models. You can just implement the subset of Hay's patterns that make sense for your application.

RecommendsView on HN
@rashkov2020 · in “BuckleScript Is Rebranding”

Yep! This talk captures it pretty darn well: ▶ this video Besides that, the compiler becomes a partner in coding. - Refactoring things is no longer something I avoid, because the compiler will point out any unexpected places that interact with a given piece of code. - I can code for an hour without loading the app, and be reasonably certain that the code I'm writing will be more or less be correct. Overall, I feel like the compiler does the double-checking and second-guessing that I was always doing in the back of my head, which gives some peace of mind and frees me up to focus on the actual task.

RecommendsView on HN
@KurtMueller2020 · in “Math is an insurance policy”

Scott Wlaschin, author of F# for Fun and Profit, has an excellent talk on using F# (an ML language) for domain driven design and business development: ▶ this video

RecommendsView on HN
@BoiledCabbage2019 · in “Why functional programming matters (1990) [pdf]”

If anyone is looking for a really eye-opening video take a look at that this. "Domain Modeling Made Functional" It's applying Functional Programming to plain old Enterprise line of business apps in F#. The author argues why it's so much simpler, and simply walks through an example with cases. It's hard not to be persuaded. It leaves behind all of the lofty crazy maths you see in a lot of presentations of FP, and just shows how it's a simpler technique to solve real world problems. Domain Modeling Made Functional - ▶ this video (Watch on 1.25x speed) It's really impressive, and also surprising why more people promoting FP don't show it's tangible benefits and simplicity vs. the theoretical/abstract way it's usually presented. It's also a great introduction to 'Domain Driven Design' and data modeling regardless of the language you use.

Strongly recommendsView on HN
@markdoubleyou2018 · in “Try OCaml”

The "F# for fun and profit" site by Scott Wlaschin is a great jumping-off point: link I discovered it when I was reading a lot about domain driven design, and I stumbled upon a talk by the author that kind of blew my mind: "Domain Modeling Made Functional" ▶ this video

Strongly recommendsView on HN
Domain Modeling Made Functional - Scott Wlaschin - KanDDDinsky 201950:49

Domain Modeling Made Functional - Scott Wlaschin - KanDDDinsky 2019

KanDDDinsky
74K views • 6 years ago
The Functional Programmer's Toolkit - Scott Wlaschin1:05:51

The Functional Programmer's Toolkit - Scott Wlaschin

NDC Conferences
79K views • 7 years ago
Four Languages from Forty Years Ago - Scott Wlaschin1:01:45

Four Languages from Forty Years Ago - Scott Wlaschin

NDC Conferences
33K views • 8 years ago
Keynote: The Last Hope for Scala's Infinity War - John A. De Goes45:03

Keynote: The Last Hope for Scala's Infinity War - John A. De Goes

Scalapeño
36K views • 8 years ago
Functional architecture - The pits of success - Mark Seemann1:00:10

Functional architecture - The pits of success - Mark Seemann

NDC Conferences
152K views • 10 years ago
Brian Beckman: Don't fear the Monad1:07:10

Brian Beckman: Don't fear the Monad

jasonofthel33t
415K views • 13 years ago
Lecture 1B | MIT 6.001 Structure and Interpretation, 198658:22

Lecture 1B | MIT 6.001 Structure and Interpretation, 1986

MIT OpenCourseWare
116K views • 17 years ago
Why Isn't Functional Programming the Norm? – Richard Feldman46:09

Why Isn't Functional Programming the Norm? – Richard Feldman

Metosin
1.6M views • 7 years ago
Solving Problems the Clojure Way - Rafal Dittwald1:02:26

Solving Problems the Clojure Way - Rafal Dittwald

Clojure/north
87K views • 7 years ago
Stanford Seminar - Concatenative Programming: From Ivory to Metal1:04:45

Stanford Seminar - Concatenative Programming: From Ivory to Metal

Stanford Online
14K views • 8 years ago
Effective ML1:09:24

Effective ML

Jane Street
30K views • 10 years ago
Beyond functional programming: a taste of Verse. Simon Peyton Jones & Tim Sweeney | Lambda Days 20231:12:14

Beyond functional programming: a taste of Verse. Simon Peyton Jones & Tim Sweeney | Lambda Days 2023

Code Sync
30K views • 3 years ago
John Backus: Function Level Programming and the FL Language 198747:30

John Backus: Function Level Programming and the FL Language 1987

Arthur Vard
3K views • 9 years ago
Breaking Down Programming Paradigms: APL's Surprising Learning Curve // Aaron Hsu // Dyalog '1759:03

Breaking Down Programming Paradigms: APL's Surprising Learning Curve // Aaron Hsu // Dyalog '17

Dyalog User Meetings
7K views • 9 years ago
The Next Five Years of ClojureScript - David Nolen1:00:58

The Next Five Years of ClojureScript - David Nolen

Metosin
19K views • 10 years ago
Philip Wadler  - Propositions as Types (Lambda Days 2016)56:58

Philip Wadler - Propositions as Types (Lambda Days 2016)

Erlang Solutions
20K views • 10 years ago
The Algebra of Algebraic Data Types1:04:35

The Algebra of Algebraic Data Types

London Haskell
27K views • 13 years ago
Effective Programs - 10 Years of Clojure - Rich Hickey1:14:52

Effective Programs - 10 Years of Clojure - Rich Hickey

ClojureTV
176K views • 9 years ago
Expert to Expert: Rich Hickey and Brian Beckman - Inside Clojure53:56

Expert to Expert: Rich Hickey and Brian Beckman - Inside Clojure

jasonofthel33t
119K views • 13 years ago
Analyzing Programs with Z343:31

Analyzing Programs with Z3

Compose Conference
24K views • 10 years ago