YoVDO

Practical Design Patterns in Swift

Offered By: LinkedIn Learning

Tags

Design Patterns Courses Swift Courses Software Architecture Courses Singleton Pattern Courses Adapter Pattern Courses Decorator Pattern Courses Facade Pattern Courses

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
1. Design Patterns: Values and Limitations
  • What’s a software design pattern?
  • Applications of design patterns
  • Limitations
  • Creational, structural, and behavioral patterns
2. The Singleton Pattern
  • Purpose, pros, and cons
  • Read-only singletons
  • Concurrency issues
  • Making the singleton thread-safe
  • Readers-writer lock
3. The Prototype Pattern
  • Purpose: Cloning
  • Copying value types
  • Pitfalls of cloning reference types
  • Cloning reference types
4. The Factory Method Pattern
  • Polymorphic instantiation
  • Implementing the Factory Method
5. The Adapter Pattern
  • Working with incompatible interfaces
  • Classical Adapter
  • Adapter using type extensions
6. The Decorator Pattern
  • Enhancing a type without modifying it
  • The object Decorator
  • Decorator via Swift extensions
7. The Facade Pattern
  • Purpose: Simplify usage
  • Consolidating complex functionality
8. The Flyweight Pattern
  • Sharing of common data
  • Spaceships
9. The Proxy Pattern
  • The surrogate
  • Delayed initialization
10. The Chain of Responsibility Pattern
  • Request propagation
  • Request processor
11. The Iterator Pattern
  • Sequential access
  • Custom queue implementation
  • Adding for-in loop support to the queue
12. The Observer Pattern
  • Broadcasting
  • Notifying observers
13. The State Pattern
  • Aim: Reduce complex conditional logic
  • Coffee machine with nested conditionals
  • Refactoring: Identifying the states
  • Refactoring: Implementing the states
Conclusion
  • Next steps

Taught by

Karoly Nyisztor

Related Courses

Structural Design Patterns in Modern C++
Packt via Coursera
C# Design Patterns: Part 1 (2016)
LinkedIn Learning
Java Design Patterns: Structural
LinkedIn Learning
Java EE: Design Patterns and Architecture
LinkedIn Learning
PHP: Design Patterns
LinkedIn Learning