https://kotlinlang.org logo
#compose-desktop
Title
# compose-desktop
b

Brian Estrada

03/10/2024, 1:23 PM
Does anyone know any good open source examples or articles on how to best structure a compose application? or what patterns to use? i've tried using stuff from android but sometimes you just don't have libraries available to accomplish all of the same things
a

Arjan van Wieringen

03/10/2024, 1:28 PM
I learned a lot from this repo: https://github.com/chrisbanes/tivi I used KodeinDI as DI framework for our html and desktop apps. I made a simple ViewModel implementation to use cross platform as well.
s

Stefan Oltmann

03/11/2024, 5:15 AM
My production app Ashampoo Photos is based on this and I can generally recommend it: https://github.com/Kotlin/kmm-production-sample This simple redux pattern is well suited to handle complex logic and make it testable.
c

Casey Brooks

03/11/2024, 3:02 PM
I’ve found the Android docs on Architecture to be extremely helpful in thinking through my own projects and really understanding the why and how of mobile app architecture. And along with that, the Now in Android is a pretty good implementation of the principles of those architecture documents
👍 1
In particular, introducing an explicit Domain Layer has been the biggest improvement I’ve been making in my own projects lately. Using my Ballast MVI library for the UI and an explicit Domain Layer has helped me to put logic in the right places to make even the most complex features pretty straightforward to implement. My “stack” does introduce a fair amount of boilerplate, but what I get in return in terms of maintainability, testability, analytics, etc. is worth it for me.
a

Arjan van Wieringen

03/11/2024, 4:33 PM
@Casey Brooks cool, that’s exactly what we did. It felt a bit over engineered at first. But when the app grows it really helps! DI was critical here though
c

Casey Brooks

03/11/2024, 4:36 PM
Yeah, I spent some time trying to get the arch to work with “manual DI”, but came to the conclusion that if the app is large enough to actually benefit from this “Clean Architecture” approach, it’s large enough that it needs proper DI. I’ve been using Koin and have been happy enough it it so far.
I’ve also been reading Just Enough Architecture, which has helped me understand when to apply this “over-engineered” architecture (because it’s definitely overkill for smaller apps)
a

Arjan van Wieringen

03/11/2024, 5:13 PM
Cool, Will check that book