Domain Modeling Made Functional

123 views
Skip to first unread message

Matthew Browne

unread,
Feb 3, 2018, 8:55:19 PM2/3/18
to object-co...@googlegroups.com
A very thought-provoking and articulate presentation on domain modeling
using functional programming:
https://www.youtube.com/watch?v=Up7LcbGZFuo

The author also has a book on the same topic (haven't read the book yet):
https://pragprog.com/book/swdddf/domain-modeling-made-functional

It could be interesting to explore how DCI could fit in with this kind
of functional type system.

Oleh Novosad

unread,
Mar 7, 2018, 3:25:41 PM3/7/18
to object-composition
I don't like two things about this:

1. A large number of types. I imagine average Ruby On Rails application implemented this way would have many hundreds of types in F#. I think it is much easier to operate with less number of types.
2. I am not sure validation should be what defines a type. Should it be a type or just validation method? Personally, I think it should be validation method. Because beside data validation step I don't really need to have a separate type for integer value.

James O Coplien

unread,
Mar 7, 2018, 4:14:36 PM3/7/18
to object-co...@googlegroups.com


Den 7. mar. 2018 kl. 21.25 skrev Oleh Novosad <oleh.n...@gmail.com>:

I think it is much easier to operate with less number of types.

There is a good Ph.D thesis. As for now it stands as a totally unjustified statement. Why is multiplicity in types more evil than multiplicity in states or procedures?

This is a totally arbitrary claim.

While learning, try to avoid “I think.” If you are convinced that your convictions are right and that DCI is wrong, then we would appreciate your help — but please substantiate your claims with data.

If you cannot or will not help us fix it, then it seems stupid to continue to pursue learning something you find distasteful, and maybe you should pursue some other line of learning.

Oleh Novosad

unread,
Mar 7, 2018, 5:46:37 PM3/7/18
to object-composition

I like DCI. I was talking about "Domain Modeling Made Functional - Scott Wlaschin" video. But I understand, I will try to avoid saying "I think" without reference to Ph.D thesis.


Matthew Browne

unread,
Mar 8, 2018, 7:50:37 AM3/8/18
to object-co...@googlegroups.com
The point is that opinions should be backed up by objective evidence and
reasoning. It doesn't have to be a PhD thesis; I don't think that's what
Cope was saying (rather that your assertion could be a topic for a PhD
thesis to study further). It's more about objective vs. subjective.

James O Coplien

unread,
Mar 8, 2018, 10:30:43 AM3/8/18
to object-co...@googlegroups.com
I also misunderstood the context. Apologies all around.
> --
> You received this message because you are subscribed to the Google Groups "object-composition" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to object-composit...@googlegroups.com.
> To post to this group, send email to object-co...@googlegroups.com.
> Visit this group at https://groups.google.com/group/object-composition.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages