Miscellaneous Patterns

This chapter will cover a few miscellaneous design patterns that are quite useful in building larger applications. These patterns provide additional tools that we can leverage apart of the major patterns that we have seen so far from previous chapters. In a nutshell, we will explore three patterns, as follows:

  • The singleton type dispatch pattern
  • The stubbing/mocking pattern
  • The functional pipes pattern

The singleton type dispatch pattern leverages Julia's multiple dispatch feature, which allows you to add new functionalities without having to modify existing code. 

The stubbing/mocking pattern can be utilized to test software components in isolation. It's also possible to test external dependencies without actually using them. It makes automated testing a lot easier.

The functional pipes pattern makes use of the pipe operator to represent a linear flow of execution. It is a way of programming that is adopted in many data processing pipelines. Some people find this concept of linear execution more intuitive. We will explore some examples about they may well with this pattern.

Let's get started!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset