https://github.com/adagio/swiftadapterdp
🔌 object Adapter Design Pattern, in Swift 3.0
https://github.com/adagio/swiftadapterdp
adapter-pattern design-patterns swift-3 swift-language
Last synced: 3 months ago
JSON representation
🔌 object Adapter Design Pattern, in Swift 3.0
- Host: GitHub
- URL: https://github.com/adagio/swiftadapterdp
- Owner: adagio
- Created: 2017-04-29T21:57:05.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-30T04:40:13.000Z (almost 9 years ago)
- Last Synced: 2024-12-27T19:31:02.934Z (about 1 year ago)
- Topics: adapter-pattern, design-patterns, swift-3, swift-language
- Language: Swift
- Homepage:
- Size: 91.8 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Adapter Design Pattern, in Swift 3.0
This is a Structural Design Pattern
Inspired on [github ochococo/Design-Patterns-In-Swift](https://github.com/ochococo/Design-Patterns-In-Swift#-adapter)
## Pattern Definition
The adapter pattern is used to provide a link between two otherwise incompatible types by wrapping the "adaptee" with a class that supports the interface required by the client.
## Class Diagram

## Class Diagram for [OldDeathStar Adapter example (@ochococo)](https://github.com/ochococo/Design-Patterns-In-Swift#-adapter)

## Implementation Details
I implemented a second example, the one present in [Design Patterns book by Head First](http://shop.oreilly.com/product/9780596007126.do). An implementation in Java can be found in [github:adagio/javaAdapterDP](https://github.com/adagio/javaAdapterDP)
## Other examples
- [Introducing iOS Design Patterns in Swift: Part 2, at raywenderlich.com](https://www.raywenderlich.com/90773/introducing-ios-design-patterns-in-swift-part-2)
- [Design Patterns in Swift: Adapter by @kingreza](https://shirazian.wordpress.com/2016/05/24/design-patterns-in-swift-adapter/)
- [Adapter pattern in Swift, at jeremy-codes](https://medium.com/jeremy-codes/adapter-pattern-in-swift-7332e178f112)