Comments (3)
This is hard to advise having just this diagram on hands. In my experience, when we had to break down the project into frameworks, it'd grow horizontally, not vertically. I understand each of the layers you have will be growing horizontally too, although I don't understand the motivation of having that many vertical layers.
The core frameworks should not change too often, otherwise, you'd need to keep recompiling them and possibly other layers too often. And the AppState, as it comes from Redux, is designed to contain all the state from the app, thus it'll be changing all the time.
Redux's approach may not be the best choice in your case, or at least you'd need to split the AppState into several containers that would reside in different layers in your architecture. This would make the team's work more independent.
from clean-architecture-swiftui.
Hey @faris-mobile89
If you need to access the AppState from the UI layer - you use @Environment injection of DI container, which carries the reference to the AppState.
The business logic layer has access to the AppState by design - AppState is injected as part of the module initialization. The same applies to the Data layer - you can inject App State as needed.
You can check out this part in the code where AppState is supplied to all the modules that need access to it.
I hope this answers your question.
from clean-architecture-swiftui.
The question is different, let me explain more. to scale the project for multiple teams we need multiple targets & frameworks. we will breakdown the features as frameworks using Cocoapods or Carthage. Hence, the classes and protocols will be abstract and private for other frameworks. Let's say we want to break down this demo to Modular architecture, The AppState and main dependency container will be embedded inside the core framework. the problem here is how the other frameworks can read the App State and how they can change the app state. the attached diagram shows the Modular Architecture.
This demo seems good for small projects, but for a large scale project, many problems will come up and needs to be solved.
from clean-architecture-swiftui.
Related Issues (20)
- Typo: TextField spelling HOT 1
- Cannot connect to REST API HOT 4
- How to save related CoreData objects? HOT 1
- Something wrong with @Builder and @resultBuilder !!! HOT 1
- How to get value from LoadableSubject? HOT 1
- Why does the '.onReceive(routingUpdate)' perform twice? HOT 1
- Project does not build in Xcode 13.2; Internal error: missingPackageDescriptionModule HOT 2
- Question: why `case .isLoading` is not called even we got `.isLoading` on didSet? HOT 1
- Find by AccessibilityIdentifier HOT 3
- Reseting route state HOT 5
- app crash after select some countires HOT 1
- Would be cool to have the same using SwiftUI Lifecycle
- safearea is not correct HOT 2
- How do I add pagination?
- Question regarding Value: Decodable and Closures
- How do i add interceptor? HOT 1
- Few questions
- CancelBag Strong Reference Cycle HOT 7
- Decouple `Respository` logic HOT 1
- DIContainer conforming EnvironmentKey - can't find its usage HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clean-architecture-swiftui.