O'Reilly logo

Functional C# by Wisnu Anggoro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required