clean-architecture
a dismissible view is a presented view that Navigator knows how to dismiss .
SwiftUI Navigation With Dismissible
For a good code design it's very important to use proper abstractions because they make our code loosely coupled . That means that different componenets of our code can be replaced with alternative implementations without affecting other components. When our code is loosely coupled it becomes easier to test, easier to extend, easier to reuse,... See more
Dependency Injection (DI) in Swift
Keep in mind that dismissal is largely imperative and fragile. Like manually popping views off the navigation path, it depends on an assumption of how the app is constructed and what views have been pushed and presented.
That’s not much of a problem if you’re coming at it from the application root side during a deep link. But it can be one if you’re... See more
That’s not much of a problem if you’re coming at it from the application root side during a deep link. But it can be one if you’re... See more
SwiftUI Navigation With Dismissible
They all have the same objective, which is the separation of concerns
Robert C. Martin (Uncle Bob) • Clean Coder Blog
Source code dependencies always point inwards. As you move inwards the level of abstraction increases. The outermost circle is low level concrete detail. As you move inwards the software grows more abstract, and encapsulates higher level policies. The inner most circle is the most general.
Robert C. Martin (Uncle Bob) • Clean Coder Blog
What’s the state of the art for dependency injection libraries? All the ones I looked at use the experimental decorators, and I’m not sure how well that’s going to play with the newer ecmascript decorators coming soon.
Is there another option or should I just use tsyringe?
reddit.comDiscussion on pragmatic dependency injection
Loosely coupled code is the main goal of Dependency Injection. It enables us to write loosely coupled code.
Dependency Injection (DI) in Swift
The concentric circles represent different areas of software. In general, the further in you go, the higher level the software becomes. The outer circles are mechanisms. The inner circles are policies.
Clean Coder Blog
Conforming to these simple rules is not hard, and will save you a lot of headaches going forward. By separating the software into layers, and conforming to The Dependency Rule , you will create a system that is intrinsically testable, with all the benefits that implies.
Robert C. Martin (Uncle Bob) • Clean Coder Blog
Dependency rule: as you you go into circle, abstraction level increases and nothing in inner circle knows about outer circle