Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QUESTION: Xcode Playgrounds project re-write #4

Open
evergreentype opened this issue Jul 1, 2021 · 0 comments
Open

QUESTION: Xcode Playgrounds project re-write #4

evergreentype opened this issue Jul 1, 2021 · 0 comments

Comments

@evergreentype
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant