https://github.com/0xopenbytes/datadrivenui
When did putting Classes in Structs become normal?
https://github.com/0xopenbytes/datadrivenui
datadrivenui ios macos swift swiftui tvos watchos
Last synced: 2 months ago
JSON representation
When did putting Classes in Structs become normal?
- Host: GitHub
- URL: https://github.com/0xopenbytes/datadrivenui
- Owner: 0xOpenBytes
- License: mit
- Created: 2022-11-23T01:07:17.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-23T03:16:00.000Z (over 3 years ago)
- Last Synced: 2025-05-13T00:45:46.447Z (about 1 year ago)
- Topics: datadrivenui, ios, macos, swift, swiftui, tvos, watchos
- Language: Swift
- Homepage:
- Size: 5.86 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DataDrivenUI
*Producing Views from data since 2022*
## What is DataDrivenUI?
When did putting Classes in Structs become normal? Well, when did SwiftUI get released?
DataDrivenUI takes a data first approach, by focusing on how data is passed around. To be specific, DataDrivenUI reverses the idea of the ViewModel and View. Normally the View will own the ViewModel, a Struct owning a Class. DataDrivenUI creates a contract between the View and the object producing said View. The View determines what Content and Capabilities it needs to function. Then you can create objects that can create the needed Content and Capabilities the View needs. Doing this the View doesn't know what object produced it, but does have the needed Content and Capabilities it needs to work.