Giter VIP home page Giter VIP logo

architechtureworkshops's Introduction

ArchitechtureWorkshops

Intro

Workshops are designed to give developers who have no experience with Swift an overview of modern iOS-apps development and share with more experienced iOS-developers knowledge about unidirectional architectures and particularly Composable Architecture.

Workshops require professional programming knowledge. If you have no experience with Swift it's okay. You can drop if at any time they get harder. And vice versa; you can join any time by checking out the latest commit in this repo.

It would be much easier for you to follow if you have some experience in:

  • reactive programming
  • functional programming

But it's not required.

Workshops plan

We'll be building a slightly modified version of Babbel's code challenge. Here's the app interface:

alt-text

Here's the code of the final application that we're aiming for: https://github.com/AlexShubin/FallingWords2

We'll go through:

  1. Building a basic game app using SwiftUI
  2. Solving UI/Logic separation problems
  3. Introducing the app state and sharing it between different scenes
  4. Introducing the app state reducer
  5. Building and testing service layer using Combine
  6. Introducing side-effects and Composable Architecture
  7. Introducing Reducers composition, using Composable Architecture to modularize the app
  8. Testing the app modules

Setup

Setup Xcode 11.7 (should be the latest version from the App Store). Make sure you ran it at least once in order to install "Additional Components" (you'll be guided).

Workshop #1

Video recording

Achievements

Using SwiftUI we built a single screen game with logic and UI in the View.

Problems

Game crashes at the end of the rounds. We have no game start/results screen, we have no score screen. We have tightly coupled UI and game logic in the view which makes it untestable.

Workshop #2

Video recording

Achievements

  • We successfully separated UI and logic introducing AppState and AppStore
  • We made state read-only accessible for views
  • We built GameStartView
  • We fixed the bugs from the previous session

Problems

  • We still have no score screen and no TabBar
  • AppStore manages the concrete implementation of the state
  • GameStartView lacks the results section
  • Hardcoded set of words

Workshop #3

Video recording

Achievements

  • Fixed the state update on the game start
  • Introduced the reducer
  • Separated the architectural part from the concrete implementation
  • Implemented ScoreHistoryView and TabBar

Problems

  • Hardcoded set of words (lack of side-effects)
  • Modularization problem
  • Reducer implicitly creates Date and UUID
  • ScoreHistoryView is responsible for formatting dates
  • GameStartView lacks the results section

Small bugs:

  • New result appends instead of being inserted at 0 position

Workshop #4

Video recording

Achievements

  • Fixed small bugs
  • Implemented a score results section in the GameStartView
  • Implemented a service layer

Problems

  • Hardcoded set of words (lack of side-effects)
  • Modularization problem
  • Reducer implicitly creates Date and UUID
  • ScoreHistoryView is responsible for formatting dates
  • No tests for the service layer

Workshop #5

Video recording

Achievements

  • Finished the service layer
  • Introduced side-effects

Problems

  • Modularization problem
  • Reducer implicitly creates Date and UUID
  • ScoreHistoryView is responsible for formatting dates
  • Syncronous side-effects in the reducer

Workshop #6

Video recording

Achievements

  • Made an overview of most popular unidirectional architectures: ReSwift, RxFeedback, Composable Architecture
  • Introduced asyncronous side effects
  • Introduced Environment and injected Services into the reducer

Problems

  • Modularization problem
  • ScoreHistoryView is responsible for formatting dates

Workshop #7

Video recording

Achievements

  • Started solving the modularization problem with Composable Architecture

Problems

  • Modularization problem
  • ScoreHistoryView is responsible for formatting dates

Workshop #8

Video recording

Achievements

  • Using Composable Architecture for every module in the app

Problems

  • ScoreHistoryView is responsible for formatting dates
  • StartGameView receives unnecessary updates

Workshop #9

Video recording

Tackling final problems and final thoughts.

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.