Practical Design Patterns in Swift
Offered By: LinkedIn Learning
Course Description
Overview
Build more functional, robust, and future-proof code using software design patterns. Learn how to implement the most popular "Gang of Four" design patterns with Swift.
Syllabus
Introduction
- Explore the benefits of design patterns
- What you should know
- What’s a software design pattern?
- Applications of design patterns
- Limitations
- Creational, structural, and behavioral patterns
- Purpose, pros, and cons
- Read-only singletons
- Concurrency issues
- Making the singleton thread-safe
- Readers-writer lock
- Purpose: Cloning
- Copying value types
- Pitfalls of cloning reference types
- Cloning reference types
- Polymorphic instantiation
- Implementing the Factory Method
- Working with incompatible interfaces
- Classical Adapter
- Adapter using type extensions
- Enhancing a type without modifying it
- The object Decorator
- Decorator via Swift extensions
- Purpose: Simplify usage
- Consolidating complex functionality
- Sharing of common data
- Spaceships
- The surrogate
- Delayed initialization
- Request propagation
- Request processor
- Sequential access
- Custom queue implementation
- Adding for-in loop support to the queue
- Broadcasting
- Notifying observers
- Aim: Reduce complex conditional logic
- Coffee machine with nested conditionals
- Refactoring: Identifying the states
- Refactoring: Implementing the states
- Next steps
Taught by
Karoly Nyisztor
Related Courses
C++ Design Patterns: CreationalLinkedIn Learning C# Design Patterns: Part 1 (2016)
LinkedIn Learning Design Patterns: Creational
LinkedIn Learning Java Design Patterns: Creational
LinkedIn Learning Java EE: Design Patterns and Architecture
LinkedIn Learning