Hi all, Has anyone looked into / tried out the <Ci...
# compose
s
Hi all, Has anyone looked into / tried out the Circuit from the folks at Slack? (presented during the Kotlin conf

here

)? I searched but didn’t find any mention of it here yet(?)
s
To be frank, I personally perceive the framework as somewhat over-engineered. That's the impression I had while listening to the talk. Essentially, they took the Redux architecture, as implemented in https://github.com/Kotlin/kmm-production-sample, for instance, and added additional helpers and architecture classes on top of it. I acknowledge that it's likely a commendable framework, but in my opinion, it has become more complex than necessary for its intended purpose. These are just my personal thoughts on the matter. I like simple things. 😄
c
I think I’d generally agree, and I have the same thoughts on Square’s Workflow and other large architecture frameworks. They’re clearly very well built, and get a lot of things right, but ultimately they were built with the needs of those companies’ apps in mind, not necessarily the needs of general mobile app development. It’s going to be highly specific to their teams, their workflows, and is very much intended to be fairly rigid so as to streamline their large codebases. But when looking to build your mobile apps, those architectures are typically too opinionated and too strong, and you’ll probably find some use-cases that doesn’t fit your app very well, and it’s gong to be difficult to make them work well for your app’s needs.
s
The NanoRedux architecture used in the kmm-production-sample is very simple and minimalistic, but it served my app very well so far and I didn’t feel the need to add more complexity on top.
c
For Circuit, in particular, one of its main features is the Compose-based state management, which is basically just Molecule wrapped up in some other stuff. You may be better off starting with just Molecule and figuring out what else you need for your app, adding new libraries or other features as you go. Or if you’re looking for a more traditional style of state management, Ballast may interest you, which also includes its own lightweight navigation module. Unlike Circuit, which is fairly all-or-nothing, you can just pick the pieces of Ballast you need, without having to buy into a huge architecture or app structure
s
I think the key aspect is that an unidirectional data flow that uses immutable data is the way to go. How much framework to add on top is matter of taste and requirements. Or in other words: Redux is king 😄
c
Yup, there are a lot of smart folks at Facebook really know what they’re doing, and everyone else is just copying their ideas 😂 The specific libraries, frameworks, or patterns you choose to use for UDF is purely a matter of personal taste, but as long as the core principles are held true you’ll be fine
s
thanks guys - very useful
l
It looks like it assumes the UI is also compose. Not sure how I'd like that in a multiplatform app. I generally use #decompose, and the fact that it's separated from UI libraries (aside from a couple of helpers) is very nice. I can use it on any platform and any UI style.