{"id":20935433,"url":"https://github.com/ww-tech/lasso-article-examples","last_synced_at":"2025-07-15T07:15:49.951Z","repository":{"id":91822574,"uuid":"238792349","full_name":"ww-tech/lasso-article-examples","owner":"ww-tech","description":"Code samples for \"Intro to Lasso\" articles","archived":false,"fork":false,"pushed_at":"2020-02-21T17:01:59.000Z","size":157,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-13T20:33:01.901Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ww-tech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-02-06T21:53:16.000Z","updated_at":"2022-03-28T11:44:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"6b236c15-f590-4783-b8e8-22156dd58c0e","html_url":"https://github.com/ww-tech/lasso-article-examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ww-tech/lasso-article-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ww-tech%2Flasso-article-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ww-tech%2Flasso-article-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ww-tech%2Flasso-article-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ww-tech%2Flasso-article-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ww-tech","download_url":"https://codeload.github.com/ww-tech/lasso-article-examples/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ww-tech%2Flasso-article-examples/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265416878,"owners_count":23761486,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T22:14:56.333Z","updated_at":"2025-07-15T07:15:49.847Z","avatar_url":"https://github.com/ww-tech.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\u003cimg src=\"docs/images/Lasso_Logo.svg\" width=\"75%\" alt=\"Lasso logo\" /\u003e\u003c/h1\u003e\n\nLasso is an iOS application architecture for building discrete, composable and testable components both big and small - from single one-off screens, through complex flows, to high-level application structures.\n\n## Intro article sample code\n\nThis repository contains the sample code from the introductory articles:\n\n### [Lasso: Introducing a new architectural framework for iOS](https://github.com/ww-tech/lasso/blob/master/docs/Lasso-Introduction-part1.md)\n\n- [LoginScreen.swift](Sources/Screens/LoginScreen.swift) - the meat of the code from the article.  Contains the complete module definition, store, and view controller.\n- [LoginService.swift](Sources/Services/LoginService.swift) - contains the service protocol and concrete conforming type used to log users in.\n- [LoginScreenTests.swift](Tests/LoginScreenTests.swift) - contains all unit tests of the login screen.  There's much more in here than was discussed in the article - most notably, there is some dependency injection that takes advantage of the Lasso `@Mockable` property wrapper.\n\n#### Next steps\nYou may have noticed that when the user taps the login button, there is a delay before the store hears back from the service.  During this delay, it is possible that the user could modify the information in the input fields _or_ tap the login button again.  How would you modify the store to prevent these from happening, and what should change in the view controller to accurately reflect this?  Take a look at the login screen implementation in the main Lasso repository for one approach to solving this issue.\n\n### [Lasso: An introduction to Flows](https://github.com/ww-tech/lasso/blob/master/docs/Lasso-FlowsIntro.md)\n\n  - [TutorialFlow.swift](Sources/Flows/TutorialFlow.swift)\n  - [TutorialScreen.swift](Sources/Screens/TutorialScreen.swift)\n\n\n\n### Xcode project files\n\nThe other files in the Xcode project are all in support of providing a small running app to see Lasso in action.\n\n- AppDelegate.swift - every app needs one.  This one just sets some colors and starts the `AppFlow`\n\n-  [AppFlow.swift](Sources/AppFlow.swift) - simple class for controlling the high-level application flow, showing how to `place` the screens and `start` the flow:  \n   - Login -\u003e Tutorial -\u003e Content\n\n- ContentScreen.swift - a placeholder for actual app content.\n\n- The `Extensions` group contains some conveniences to pull as much of the common UIKit drudgery away from the important code.\n\n\n\nThe included Xcode project:\n\n- requires Xcode 11.3\n- compiles with Swift 5.1\n- uses Swift package manager, to pull in the dependencies:\n  - [Lasso](https://github.com/ww-tech/lasso)\n  - [WWLayout](https://github.com/ww-tech/wwlayout)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fww-tech%2Flasso-article-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fww-tech%2Flasso-article-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fww-tech%2Flasso-article-examples/lists"}