Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Design Patterns and Best Practices with Julia

You're reading from   Hands-On Design Patterns and Best Practices with Julia Proven solutions to common problems in software design for Julia 1.x

Arrow left icon
Product type Paperback
Published in Jan 2020
Publisher Packt
ISBN-13 9781838648817
Length 532 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Tom Kwong Tom Kwong
Author Profile Icon Tom Kwong
Tom Kwong
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Section 1: Getting Started with Design Patterns
2. Design Patterns and Related Principles FREE CHAPTER 3. Section 2: Julia Fundamentals
4. Modules, Packages, and Data Type Concepts 5. Designing Functions and Interfaces 6. Macros and Metaprogramming Techniques 7. Section 3: Implementing Design Patterns
8. Reusability Patterns 9. Performance Patterns 10. Maintainability Patterns 11. Robustness Patterns 12. Miscellaneous Patterns 13. Anti-Patterns 14. Traditional Object-Oriented Patterns 15. Section 4: Advanced Topics
16. Inheritance and Variance 17. Assessments 18. Other Books You May Enjoy

What this book covers

Chapter 1, Design Patterns and Related Principles, introduces the history of design patterns and how they are useful for developing applications. It covers several industry-standard software design principles that are applicable across any programming language and paradigm.

Chapter 2, Modules, Packages, and Data Type Concepts, discusses how larger programs can be organized and how dependencies can be managed. Then, it explains how to develop new data types and express their relationship in a custom type hierarchy.

Chapter 3, Designing Functions and Interfaces, explains how functions are defined and how multiple dispatch come into play. It also discusses parametric method and interfaces, for which different functions can work with each other properly based on a pre-determined contract.

Chapter 4, Macros and Metaprogramming Techniques, introduces macro programming facility and how it can be used to transform source code into a different form. It describes several techniques for developing and debugging macros more effectively.

Chapter 5, Reusability Patterns, covers design patterns that relate to code reuse. This includes the Delegation pattern for reusing code via composition, the Holy Traits pattern for a more formal interface contract, and the Parametric Type pattern for creating new types from a parameterized data structure.

Chapter 6, Performance Patterns, covers design patterns that relate to improving system performance. This includes the Global Constant pattern for better type stability, the Memoization pattern for caching prior computation results, the Struct of Arrays pattern for rearranging data for a more optimal layout, the Shared Array pattern for optimizing memory usage with parallel computing, and the Barrier Function pattern for improving performance via function specialization.

Chapter 7, Maintainability Patterns, covers design patterns about code maintainability. This includes the Sub Module pattern for better organization of larger code bases, the Keyword Definition pattern for creating data types that can be constructed more easily, the Code Generation pattern for defining many similar functions with less code, and the Domain-Specific Language pattern for creating a new syntax for a specific domain.

Chapter 8, Robustness Patterns, covers design patterns that help you write safer code. This include the Accessor pattern for providing standard access to fields, the Property pattern for controlling access to fields, the Let-Block pattern for limiting the variable scope, and the Exception Handling pattern for handling errors.

Chapter 9, Miscellaneous Patterns, covers several design patterns that do not fit into the preceding categories. It includes the Singleton Type pattern for use with dynamic dispatch, the Mocking pattern for building isolated tests, and the Functional Pipe pattern for building linear data processing pipelines.

Chapter 10, Anti-Patterns, covers patterns that should be avoided. The main anti-pattern is Piracy, which involves defining or extending functions for data types that you do not own. Then, it covers the Narrow Arguments and Non-Concrete Type Fields patterns, which hinder system performance.

Chapter 11, Traditional Object-Oriented Patterns, covers the traditional object-oriented patterns described in the Design Patterns book by Gang-of-Four. It discusses how those patterns can be simplified or implemented differently in Julia.

Chapter 12, Inheritance and Variance, discusses how Julia supports inheritance and why it is designed as such since its approach is quite different from mainstream object-oriented programming languages. Then, it covers the topic of type variance, an important concept in terms of subtyping relationships between data types used by multiple dispatch.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image