Is there some literature on this type of programming?

前端 未结 8 722
[愿得一人]
[愿得一人] 2021-02-01 05:56

In college I took on a class on modern physics, in which we learned about special relativity. I was completely blown away by how different frames of reference could actually ob

8条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-01 06:45

    In the Java world, we have nice containers, containing stateless session beans, which can be used precisely for separating behaviour from data, as formalised by the DCI Architecture. This is sometimes called service oriented programming.

    OOP constrains designers by requiring behaviour to be placed in classes where the data lives, in order to increase coherence, rather than letting the designer put related data together, and related behaviour together, but not necessarily then also pushing the behaviour into those data classes.

    In a good design, we sometimes have behaviour in classes, and sometimes we have behaviour in higher order classes.

提交回复
热议问题