3. @kfirondev
• Treats computation as the evaluation of
mathematical functions
• Avoid changing state and mutable data
• Declarative
• Pure functions with no side effects
http://www.clker.com/
9. @kfirondev
Hexagonal Architecture with FP
gives result which is:
Deterministic Separation of concerns Fast testing lifecycle Concurrent agnostic
domain model
11. @kfirondev
People told you that ->
Abstract factory
Builder
Factory Method
Builder
Prototype
Adapter
Bridge
Composite
Decorator
Proxy
Chain of
responsibility
Command
Iterator
Mediator
Observer
Object Oriented
http://www.clker.com/
12. @kfirondev
People told you that ->
Abstract factory
Builder
Factory Method
Builder
Prototype
Adapter
Bridge
Composite
Decorator
Proxy
Chain of
responsibility
Command
Iterator
Mediator
Observer
Object Oriented
Functional
Programming
http://www.clker.com/
13. @kfirondev
People told you that ->
Abstract factory
Builder
Factory Method
Builder
Prototype
Adapter
Bridge
Composite
Decorator
Proxy
Chain of
responsibility
Command
Iterator
Mediator
Observer
Object Oriented
Functional
Programming
http://www.clker.com/
14. @kfirondev
Builder pattern builds a complex object using
simple objects and using a step by step
approach. This type of design pattern comes
under creational pattern as this pattern
provides one of the best ways to create an
object.
Builder
15. @kfirondev
Builder pattern builds a complex object using
simple objects and using a step by step
approach. This type of design pattern comes
under creational pattern as this pattern
provides one of the best ways to create an
object.
Builder
LET’S
CODE
16. @kfirondev
Behavior pattern that helps create objects
which represent various strategies and a
context object whose behavior varies as per
its strategy object. The strategy object
changes the executing algorithm of the context
object
Strategy
17. @kfirondev
LET’S
CODE
Behavior pattern that helps create objects
which represent various strategies and a
context object whose behavior varies as per
its strategy object. The strategy object
changes the executing algorithm of the context
object
Strategy
18. @kfirondev
The chain-of-responsibility pattern is a design pattern
consisting of a source of command objects and a series
of processing objects.
Each processing object contains logic that defines the
types of command objects that it can handle.
Only qualifying predicate for the request will process it,
otherwise it will pass to the next handler in chain
Chain of
Responsibility
19. @kfirondev
LET’S
CODE
The chain-of-responsibility pattern is a design pattern
consisting of a source of command objects and a series
of processing objects.
Each processing object contains logic that defines the
types of command objects that it can handle.
Only qualifying predicate for the request will process it,
otherwise it will pass to the next handler in chain
Chain of
Responsibility
20. @kfirondev
In software engineering, dependency injection is a
software design pattern that implements inversion of
control for resolving dependencies. A dependency is an
object that can be used (a service)
Dependency
Injection
21. @kfirondev
In software engineering, dependency injection is a
software design pattern that implements inversion of
control for resolving dependencies. A dependency is an
object that can be used (a service)
Dependency
Injection
Dependency Injection framework
!=
Dependency Injection
27. @kfirondev
• Went over functional programming definition
• Understood that FP as “side effect” help you go
towards hexagonal architecture
• Refactor various patterns from Java to Scala
Idioms
• Dependency injection using Scala with cake
pattern
Summary of what we did