All Projects → RefactoringGuru → design-patterns-swift

RefactoringGuru / design-patterns-swift

Licence: other
Design Pattern Examples in Swift

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to design-patterns-swift

design-system
British Columbia Government Design System for Digital Services
Stars: ✭ 33 (-65.26%)
Mutual labels:  design-patterns
Design-Patterns-in-Swift
This is a repository for our article about design patterns in the Swift programming language https://rubygarage.org/blog/swift-design-patterns
Stars: ✭ 53 (-44.21%)
Mutual labels:  design-patterns
python-ood
💠 Essential object oriented design (python, pytest, travisCI)
Stars: ✭ 38 (-60%)
Mutual labels:  design-patterns
design patterns
PHP设计模式
Stars: ✭ 17 (-82.11%)
Mutual labels:  design-patterns
ruby-patterns
NOTE: NO LONGER MAINTAINED
Stars: ✭ 33 (-65.26%)
Mutual labels:  design-patterns
about-Vue
📔 Vue 源码的探讨和学习
Stars: ✭ 56 (-41.05%)
Mutual labels:  design-patterns
design-patterns-explained
Explanation for most of the well-known design patterns with examples and figures.
Stars: ✭ 18 (-81.05%)
Mutual labels:  design-patterns
LearningPoint
A repository for learning different technologies, frameworks, features......
Stars: ✭ 66 (-30.53%)
Mutual labels:  design-patterns
Entitas-Redux
An entity-component framework for Unity with code generation and visual debugging
Stars: ✭ 84 (-11.58%)
Mutual labels:  design-patterns
concurrent-resource
A header-only C++ library that allows easily creating thread-safe, concurrency friendly resources.
Stars: ✭ 17 (-82.11%)
Mutual labels:  design-patterns
Front-End-Design-Patterns
Design Patterns
Stars: ✭ 25 (-73.68%)
Mutual labels:  design-patterns
estore
Electronic Store Application - A web based application developed using PHP and Driven by MySQL Database
Stars: ✭ 48 (-49.47%)
Mutual labels:  design-patterns
dotnet-design-patterns-samples
The samples of .NET design patterns
Stars: ✭ 25 (-73.68%)
Mutual labels:  design-patterns
design-pattern-examples-in-crystal
UML model and code examples of design patterns for Crystal. The model is created with Astah.
Stars: ✭ 51 (-46.32%)
Mutual labels:  design-patterns
ui-ux
The learning guide contains the Basics, Intermediate and Advance resources for User Interface and User Experience Design
Stars: ✭ 187 (+96.84%)
Mutual labels:  design-patterns
design-patterns-php
All Design Patterns Samples in PHP
Stars: ✭ 43 (-54.74%)
Mutual labels:  design-patterns
puremvc-swift-multicore-framework
PureMVC MultiCore Framework for Swift
Stars: ✭ 17 (-82.11%)
Mutual labels:  design-patterns
go-design-pattern
go的设计模式实例
Stars: ✭ 45 (-52.63%)
Mutual labels:  design-patterns
work
A compact library for tracking and committing changes to your entities.
Stars: ✭ 50 (-47.37%)
Mutual labels:  design-patterns
CoolerCppIdiom
cooler c++ patterns like async, event delegate, json auto serialization
Stars: ✭ 48 (-49.47%)
Mutual labels:  design-patterns

Design Patterns in Swift

This repository is part of the Refactoring.Guru project.

It contains Swift examples for all classic GoF design patterns.

There are two examples for each of the patterns:

  • Conceptual examples illustrate the internal structure of a pattern, explained with detailed comments.

  • RealWorld examples illustrate how patterns can be used in real-world Swift applications.

Requirements

For the best experience, we recommend working with examples with Swift 5 and Xcode IDE.

Usage

For the sake of simplicity, we tried to limit the scope of these examples to the code, related to the actual patterns. That's why didn't implement full-blown Swift apps, accompanied with Run targets. Instead, our examples are packaged as unit tests, where each Unit Test target executes a specific example of a pattern.

To run an example, browse it in the project directory, select the Unit Test scheme and launch the example.

How to launch an example

FAQ

1. What is the Client Code?

Client means client of classes, defined as part of a pattern, which is merely a caller of the given methods or a user of the given classes. In other words, it's the part of your application's code that uses the pattern's classes.

2. I don't understand the roles you're referring to in RealWorld examples.

Take a look at the structural example first. There you'll find detailed descriptions of each class in a pattern, its role, and connection to other classes.

License

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

Creative Commons License

Credits

"Design Patterns in Swift" were created by Maxim Eremenko for Refactoring.Guru.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].