Domain Modeling Made Functional - Scott Wlaschin

preview_player
Показать описание
Statically typed functional programming languages encourage a very different way of thinking about types. The type system is your friend, not an annoyance, and can be used in many ways that might not be familiar to OO programmers.
Types can be used to represent the domain in a fine-grained, self documenting way. And in many cases, types can even be used to encode business rules so that you literally cannot create incorrect code. You can then use the static type checking almost as an instant unit test — making sure that your code is correct at compile time.

In this talk, we'll look at some of the ways you can use types as part of a domain driven design process, with some simple real world examples in F#. No jargon, no maths, and no prior F# experience necessary.

NDC Conferences
Рекомендации по теме
Комментарии
Автор

Best argument I've seen for using a functional approach for line-of-business projects. Most developers think of FP as a specialised technique for scientific or mathematical programming. This presentation blows that out of the water.

Pity there's such a small audience for these ideas.

tullochgorum
Автор

It's always a relief to find your talks. Most speakers on these topics are PR time wasters, sent on a day trip from the office, meme slides, surface level devs, or being funny. Thank you.

GloriousAssam
Автор

another top talk from Scott. Absolute clarity. Functional demystified and concrete understandable examples. Recommend his book. I've used Java for 20 years or more and wondered why I've always had an awkward love-hate relationship with it. This is another aha moment.

opentrail
Автор

Wow. This is great stuff; I'll be watching this more than once. In fact, I just bought his book.

These days every new "innovation" that any object-oriented language rolls out is actually something functional programming has been doing for years. That's object-oriented language designers confessing to us all that functional programming really is the better way forward.

So why not stop with the OOP bandaids and just go ahead and embrace FP?

zurvey
Автор

I'm blown away with this talk. I bought the book from Scott and hope to help me think more about Domain Modeling

markovujanic
Автор

Great stuff, shows how f#’s design fits in so nicely with DDD - really useful thanks

tommedcouk
Автор

Excellent talk, especially after that previous one earlier in the day. The intimidation factor of F# has been slashed completely. Now to somehow work out how to integrate f# gradually into the c# company I work for...

hynjus
Автор

Thank you very much! How beautiful Functional Programming is! I wish I had begun my programming journey as a functional programmer rather than starting with OOP.

MaksimShamihulau
Автор

I like the more relatable names at 7:08.

heldersribeiro
Автор

This is so helpful - even though I don't use a functional programming language.

statequest
Автор

Great video :). I like to see future videos with real projects for example simple blog tutorial. How to code reuse without inheritance, how the code be open for extension. In OOP you inject interface. Here i have pattern matching but all the cases are in the function. if i add new type i should change the function itself. If i have 20 types the function becomes very large. With real project like blog things and fp patterns will be more understandable.

yavoratanasov
Автор

I wish some F# features to be added to C#. Like declaring new types out of existing types, or the let keyword to ensure immutability of sub expressions. This seems feasible...

uthoshantm
Автор

Scott - You are awesome. I am in lov with your presentation :) superb !!!

rushikeshmhatre
Автор

Loved this presentation, one question though: in the final example where ContactInfo can be one of 3 choices, does that mean any caller that wants to use ContactInfo must now be able to handle all 3 types (I'm especially curious about the "pair" type EmailAndAddr), or is there some magic in functional languages that makes this easy? I'm more used to OO so it felt like this was one of the areas where a shared interface / encapsulated behaviour sounds nice.

wasabigeek
Автор

I am unfortunately bounded to Python and C++, however I am gonna try my best matching this approach in Python and C++ and pass this message whoever I talk to that writes codes. Thank you.

haluk
Автор

I'm about halfway through the talk. Very interesting so far. I can see how this would be useful for starting a new project. But can functional DDD be of use to an existing non-functional project? Could functional DDD be used to reason about and/or validate a complex project written in C#, for example? Could I either generate a function type spec from the exist class design, or could I create functional type spec from my mental model of the system and validate it against the actual code?

MajeureX
Автор

Great talk, ive learned a lot of stuff!!!

comarnicolodi
Автор

The "Product" equivalency is sometimes made explicit for no reason e.g. Microsoft's use of the term "SKU".

centerfield
Автор

So where does the business logic live? separate powerpoint slides? can someone explain the filesystem or namespaces or something in f#

ratherbyexploring
Автор

19:31 "Glue things together like lego" 🤔

Dynitios
welcome to shbcf.ru