Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Hands-On Design Patterns and Best Practices with Julia
Hands-On Design Patterns and Best Practices with Julia

Hands-On Design Patterns and Best Practices with Julia: Proven solutions to common problems in software design for Julia 1.x

By Tom Kwong
$15.99 per month
Book Jan 2020 532 pages 1st Edition
eBook
$29.99 $20.98
Print
$43.99
Subscription
$15.99 Monthly
eBook
$29.99 $20.98
Print
$43.99
Subscription
$15.99 Monthly

What do you get with a Packt Subscription?

Free for first 7 days. $15.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details


Publication date : Jan 17, 2020
Length 532 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781838648817
Category :
Table of content icon View table of contents Preview book icon Preview Book

Hands-On Design Patterns and Best Practices with Julia

Design Patterns and Related Principles

Nowadays, learning and applying design patterns is an important aspect of software engineering. Design patterns are like water – you can't live without them. Don't believe me? Just ask hiring managers, and you will find that many of them have design patterns in their job postings as well as related questions in job interviews. It is a common belief that design patterns are important ingredients for software development and everyone should know them.

In this chapter, we will provide some context about why design patterns are useful and how they have served us well in the past few decades. By understanding the motivation behind design patterns, we will be able to set forth a set of guiding principles for developing software. The following topics will be discussed in this chapter:

  • The history of design patterns 
  • Software...

The history of design patterns

Design patterns is not a new concept to computer programmers. Since personal computers became more affordable and popular in the 1980s, the programming profession flourished and a lot of code was written for a variety of applications.

I remember that, when I was 14 years old, learning the GOTO statement for a BASIC program was one of the coolest things. It literally allowed me to take a control flow to a different part of the code at any time. Perhaps not too surprisingly, when I learned about structured programming and the Pascal language in college, I started to realize how GOTO statements produce messy spaghetti code. Using GOTO for branching purposes is a pattern. It's just a bad one because it makes code difficult to understand, follow, and debug. In today's lingua franca, we call them anti-patterns. When it comes to...

Software design principles

While this book does not cover object-oriented programming, some object-oriented design principles are universal and could be applied to any programming language and paradigm. Here, we will take a look at some of the most well-known design principles. In particular, we will cover the following:

  • SOLID: Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion
  • DRY: Don't Repeat Yourself
  • KISS: Keep It Simple, Stupid!
  • POLA: Principle of Least Astonishment
  • YAGNI: You Aren't Gonna Need It
  • POLP: Principle of Least Privilege

Let's start with SOLID.

SOLID

The SOLID principle consists of the following:

  • S: Single Responsibility Principle
  • O: Open...

Software quality objectives

Everyone likes beautiful design. I do, too. But, the use of design patterns is not just to make something look good. Everything we do should have a purpose.

The GoF classified object-oriented design patterns as creational, structural, and behavioral. For Julia, let's take a different perspective and classify our patterns by their respective software quality objectives as follows:

  • Reusability
  • Performance
  • Maintenance
  • Safety

Let's understand each of these in the following sections.

Reusability

People often talk about top-down and bottom-up approaches when designing software.

The top-down approach starts with a large problem and breaks it down into a set of smaller problems. Then, if the...

Summary

In this chapter, we started by going back in time and reviewing the history of design patterns. We discussed why design patterns can be useful for software professionals and how we would like to organize design patterns in this book given what we have learned in the past. 

We went over several key software design principles that can be applied universally in any programming language, as it is important that we keep them in mind when developing code and applying design patterns in Julia. We covered SOLID, DRY, KISS, POLA, YAGNI, and POLP. These design principles are well known and well received by the object-oriented programming community.

Finally, we discussed some software quality objectives that we want to achieve by using design patterns. In this book, we have decided to focus on reusability, maintainability, performance, and safety objectives. We also appreciated...

Questions

Review the following questions to reinforce your understanding of the subjects in this chapter. Answers are provided at the back of the book:

  1. What are the benefits of using design patterns?
  2. Name some key design principles.
  3. What problem does the Open/Closed Principle solve?
  4. Why is interface segregation important for software reusability?
  5. What are the simplest ways to keep an application maintainable?
  6. What is a good practice for avoiding over-engineered and bloated software?
  7. How does memory usage affect system performance?
Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Explore useful design patterns along with object-oriented programming in Julia 1.0
  • Implement macros and metaprogramming techniques to make your code faster, concise, and efficient
  • Develop the skills necessary to implement design patterns for creating robust and maintainable applications

Description

Design patterns are fundamental techniques for developing reusable and maintainable code. They provide a set of proven solutions that allow developers to solve problems in software development quickly. This book will demonstrate how to leverage design patterns with real-world applications. Starting with an overview of design patterns and best practices in application design, you'll learn about some of the most fundamental Julia features such as modules, data types, functions/interfaces, and metaprogramming. You'll then get to grips with the modern Julia design patterns for building large-scale applications with a focus on performance, reusability, robustness, and maintainability. The book also covers anti-patterns and how to avoid common mistakes and pitfalls in development. You'll see how traditional object-oriented patterns can be implemented differently and more effectively in Julia. Finally, you'll explore various use cases and examples, such as how expert Julia developers use design patterns in their open source packages. By the end of this Julia programming book, you'll have learned methods to improve software design, extensibility, and reusability, and be able to use design patterns efficiently to overcome common challenges in software development.

What you will learn

Master the Julia language features that are key to developing large-scale software applications Discover design patterns to improve overall application architecture and design Develop reusable programs that are modular, extendable, performant, and easy to maintain Weigh up the pros and cons of using different design patterns for use cases Explore methods for transitioning from object-oriented programming to using equivalent or more advanced Julia techniques

What do you get with a Packt Subscription?

Free for first 7 days. $15.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details


Publication date : Jan 17, 2020
Length 532 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781838648817
Category :

Table of Contents

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

Customer reviews

Filter icon Filter
Top Reviews
Rating distribution
Empty star icon Empty star icon Empty star icon Empty star icon Empty star icon 0
(0 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 0%

Filter reviews by


No reviews found
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.