Chapter 11. Coding Best Practice and Testing the Functional Code
We developed a functional application in the previous chapter. To create better code in the functional approach, we have to follow the best practice rules and implement them in our code. In this chapter, we are going to discuss the concept of the functional approach, which is a pure function and makes our function similar to a mathematical function. The topics that will be covered in this chapter are as follows:
- Preventing dishonest signatures
- Creating immutable classes
- Avoiding
Temporal Coupling
- Dealing with the side-effects
- Separating the code into a
Domain Logic
and theMutable Shell
- Testing the functional code