From Object-Oriented To Functional-Domain Modeling (Mario Fusco)
The main consequence of the introduction of lambda expressions in Java 8 is the possibility of conveniently mixing the object-oriented and the functional paradigms. It's still uncommon to see functions used together with data in the business domain model. For example, it's usual to pass a list of data to a function that processes them, but there are cases when you may want to create a list of functions and pass a single data through all of them. Immutable objects leads to an inherently thread-safe domain model. Functions often compose better than objects. Side-effect-free code allows better reusability. In this session, we're: -- Not going to compare object-oriented and functional programming -- Are going to show how the two styles can be combined to take advantage of the good parts of each -- Going to look at practical examples to distill the essence of functional programming