episode-code-samples
Resolver
Our great sponsors
episode-code-samples | Resolver | |
---|---|---|
7 | 11 | |
926 | 2,096 | |
1.2% | - | |
7.2 | 2.8 | |
6 days ago | 4 days ago | |
Swift | Swift | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
episode-code-samples
- SwiftUI app architecture - any recommended online resources?
-
Combine and functional programming
One resource I'd recommend is Point-Free - they'll teach you functional programming from the beginning.
-
What is a piece of code (or Framework, extension, etc.) that you add in every new project?
At a minimum, Composable Architecture, and now Dependencies from Point-Free.
-
On Not Drinking the FP Kool-Aid
I come from the iOS world and one of the most valuable resources I have found for understanding FP in Swift is https://www.pointfree.co These guys go over the theoretical concepts and then not only ask, "what's the point?" but they then go on to build out more complicated examples or even complete apps and publish useful libraries on GitHub.
-
A New Chapter
So it's time for a change. I'm going to build my own ideas full-time and find a way to make it work. I've put a lot of thought into it and I'm confident this is the right decision for me. As for what I'll be working on, I wanna build things for the Android community. If you know me, you know that I'm an Android developer and technologist at heart. I’ve gotten some amazing opportunities to speak at conferences and share the things I’ve learned over the years. I’m inspired by people like Josh W. Comeau, and the folks at Point-Free. These are people who master their craft, build beautiful software, and teach about their methodologies and underserved topics in their respective domains. That’s what I want. I want to master my craft, build beautiful Android experiences, and share it with you all. If you don’t wanna miss out, make sure to follow me on Youtube, Twitter, and Mastodon.
-
Any good resources for advanced topics?
https://www.pointfree.co - not exactly about patterns and best practices, but this was the best content I’ve found after reaching the same “CRUD app tutorials are not enough anymore“ phase.
- On using Dependency Injection with MVVM
Resolver
-
On using Dependency Injection with MVVM
If you're looking in to using a framework instead of doing it manually, I prefer Resolver over Swinject but both will work.
-
Popularity of unit tests with employers
But, today, I use Resolver. And recommend others also use this. There are other approaches, but Resolver is quite good. It solves this problem. "Just pass stuff in to the constructor" isn't true dependency injection anyway (but it kinda works, it's just a huge mess).
-
UIKIT Global class / environment object equivalent
You can achieve the concept as the environment in SwiftUI using protocols and Resolver https://github.com/hmlongco/Resolver
-
Dependency injection tutorial
This isn't a full tutorial, but it's a great Swift dependency injection library with lots of information in its documentation: https://github.com/hmlongco/Resolver
-
Fusion: A lightweight, @propertyWrapper based dependency injection library for Swift
I also suggest Resolver
-
MVVM + Dependency Injection
Sounds ok, and for DI I can recommend this lib, works well and easy to use https://github.com/hmlongco/Resolver/
-
SwiftUI Dependency injection
We’re using Resolver for dependency injection. Check it out: https://github.com/hmlongco/Resolver
- Add SPM dependency without exposing to clients?
- Any DI libraries for swift?
-
How to update a boolean in one view model from another view model?
Since multiple ViewModels need to access this data, I would avoid storing the data in a particular ViewModel—which should correlate only with a single, specific View—and instead implement this behavior in a third object (such as an AuthenticationService class). This way, both/any of your subsequent Views and ViewModels alike can all access that object as a single source of truth (by passing it around explicitly, putting it in the environment, or my favorite method: Resolver). Just remember to think about who should “own” data!
What are some alternatives?
Setting - Compose beautiful preference panels.
Swinject - Dependency injection framework for Swift with iOS/macOS/Linux
atomic - Write ClojureScript in JavaScript without a transpiler.
Needle - Compile-time safe Swift dependency injection framework
swift-dependencies - A dependency management library inspired by SwiftUI's "environment."
Cleanse - Lightweight Swift Dependency Injection Framework
MVVM.Demo.SwiftUI
Weaver - Dependency Injection framework for Swift (iOS/macOS/Linux)
AboutKit - Add an about screen to your app in just a few lines of code.
DIKit - Dependency Injection Framework for Swift, inspired by KOIN.
MVVM.Demo - This is a demo application used to educate and interview iOS Engineers.
Locatable - A micro-framework that leverages Swift Property Wrappers to implement the Service Locator pattern