Summary

In this chapter, we have learned about the various patterns and techniques for building robust software. While Julia is a great language for quick prototypes and research projects, it has all the features to build robust, mission-critical systems.

We began our journey with the idea of encapsulating data with accessor functions, which allow us to design a formal API that we can support. We also discussed a naming convention that discourages people from accessing the internal state of the object.

We looked at Julia's property interface, which allows us to implement new meanings whenever the field access dot notation is used. By extending the getproperty and setproperty! functions, we are able to control both read and write access to the fields of an object.

We also learned how to hide specific variables or functions defined in a module. This strategy can be utilized whenever we want to have tighter control of the visibility of variables and functions of a module.

Finally, we wanted to take exception handling seriously! We know robust software needs to be able to handle all kinds of exceptions. We dived deep into the try-catch process and learned how to determine the stack trace properly. We have proved that performance can be negatively impacted by the use of a try-catch block, so we need to be diligent about where to apply exception handling logic. We also learned how to use the standard retry function as a recovery strategy.

In the next chapter, we will go over a few more miscellaneous patterns commonly used in the Julia programs.

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

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