Design-Patterns-In-Swift is a repository that translates classic software engineering design patterns (from sources like the Gang of Four) into Swift code examples, so you can see how those patterns look in a modern, strongly typed, object-/protocol-oriented language. It covers creational, structural, and behavioral patterns: singletons, factories, decorators, observers, strategy, command, mediator, and more. For each pattern, you’ll typically see one or more Swift implementations, commentary on where it makes sense in a Swift architecture, and caveats about when you might prefer pure protocol composition or using functional patterns instead. The examples aim to be readable and idiomatic—not overly abstract or contrived—so developers can adopt or adapt them directly.

Features

  • Collection of many design patterns implemented: e.g. Creational, Behavioral, Structural families (e.g. Strategy, Observer, Adapter, Singleton, etc.)
  • Provided in playground/-friendly format so users can interactively read and run examples in Xcode playgrounds
  • Chinese (中文) translated versions of playground/examples/files are included
  • Scripts to generate playgrounds from source and translations (for both English and Chinese)
  • Well-documented: README with table of contents of patterns, explanations of pattern intent, usage, etc.
  • Licensed under GPL-3.0, which means open source but with copyleft requirements (if modifications are shared etc.)

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

GNU General Public License version 3.0 (GPLv3)

Follow Design Patterns in Swift

Design Patterns in Swift Web Site

Other Useful Business Software
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Design Patterns in Swift!

Additional Project Details

Operating Systems

Apple iPhone, Mac

Programming Language

Swift

Related Categories

Swift Libraries

Registered

2025-09-22