Summary

In this chapter, we have gone over the traditional object-oriented design patterns extensively. We started with the humble belief that the same patterns in object-oriented programming often need to be applied in Julia programming.

We started reviewing creational design patterns, which include the factory method, abstract factory, singleton, builder, and prototype patterns. These patterns involve various techniques for creating objects. When it comes to Julia, we can mostly solve these problems using abstract types, interfaces, and multiple dispatch.

We also spent a considerable amount of effort looking at behavioral design patterns. These patterns are made to handle collaboration and communication between components in an application. We looked at 11 patterns: chain of responsibility, mediator, memento, observer, state, strategy, template method, command, interpreter, iterator, and visitor. These patterns can be implemented in Julia using traits, interfaces, multiple dispatch, and first-class functions.

Finally, we reviewed several structural design patterns. These patterns are used to construct bigger components by reusing existing ones. This includes the adapter, composite, flyweight, bridge, decorator, and facade patterns. In Julia, they can be handled with abstract types, interfaces, and the delegation design pattern.

I hope you are convinced that building software does not need to be difficult. Just because OOP made us believe that we need all of this complexity to design software, it does not mean that we have to do the same in Julia. The solutions to the problems that are presented in this chapter mostly require the basic software design skills and patterns that you found in this book.

In the next chapter, we will get into a more advanced topic regarding data types and dispatch. Get ready to rock!

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

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