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 the Mutable Shell
  • Testing the functional code

Coding best practices in functional C#

The functional approach has the concept ...

Get Functional C# now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.