Coder Social home page Coder Social logo

o0oi1i / design-patterns-swift Goto Github PK

View Code? Open in Web Editor NEW

This project forked from refactoringguru/design-patterns-swift

0.0 0.0 0.0 1.95 MB

Design Pattern Examples in Swift

Home Page: https://refactoring.guru/design-patterns/swift

License: Other

Swift 100.00%

design-patterns-swift's Introduction

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.

design-patterns-swift's People

Contributors

devmeremenko avatar druidream avatar neochief avatar o0oi1i avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.