-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
I'm studying patterns now using materials (and Swift examples) from RefactoringGuru. I am coding up stuff in Playgrounds as I go along.
I found out that there's this repo with all source code for Swift examples. However, it's a plain project with a lot of test profiles and, thus, unnecessary clutter.
What do you think about a possibility of a complete re-write in Xcode Playgrounds?
Pros
- It's automatically granular and self-contained. Meaning a Playground runs its own code only. No more hundreds of test profiles and simulators.
- It's hierarchical. Folders can be created for different Pattern types. Each pattern's Playground can have multiple pages of examples.
- Additional files such as Output.txt can be placed inside of the Resources folder included in every Playground.
- Code more transparent. Playgrounds show intermediate results in the sidebar.
- Less clutter code. Playgrounds support statements at the top-level.
- Markdown support. Playgrounds support markdown for rich text styles and images right in the code.
Concerns
- Because Playgrounds cannot run simulator, I wonder if there are any real world examples that require a simulator to work?
- In addition to that, Playgrounds pretty much require pure Swift code.
General setup
Create an empty Workspace in Xcode => Add folders for pattern types => Create new Playground inside a folder
I actually uploaded the Xcode workspace with my setup so you can see what I mean: github.com/Ilyumzhinov/DesignPatternsSwift. If you think it's worthwhile, I may help re-write the codebase.
Metadata
Metadata
Assignees
Labels
No labels