https://kotlinlang.org logo
#compose
Title
# compose
c

Colton Idle

04/29/2020, 9:06 AM
For anyone not on twitter, I listened to this podcast with Leland. Very awesome. I still need to dig more on some of the topics that were covered like why just having your UI in xml and logic in kotlin not actually real separation of concerns. It's definitely a big mindset shift. https://fragmentedpodcast.com/episodes/196/
🙂 3
l

Leland Richardson [G]

04/29/2020, 2:35 PM
Glad you liked it! I'm happy to answer any questions here about that stuff if you have any, fwiw
c

Colton Idle

04/29/2020, 4:23 PM
@Leland Richardson [G] I may be mis-remembering but I think you mentioned increasing cohesion vs minimizing coupling or you talked about reading some article about the subject or something like that. Any chance that you have anything handy to read regarding that? I still don't even fully grasp "favor composition over inheritance" (besides that I know that everyone says it) and so I'm trying to see if there are any good articles that might make the lightbulb go off for cohesion vs coupling.
l

Leland Richardson [G]

04/29/2020, 4:29 PM
the “favor composition over inheritance” bit is a bit of a misnomer IMO, since inheritance is just another form of composition. class-based inheritance has some very useful properties, but also some big problems. I tried to talk about some of them in my ADS talk (not sure if you’ve seen it? i can link it if not).
My talk at ADS which we discussed during the podcast has a lot of similarities to Pete Hunt’s talk “Rethinking Best Practices” that was from a long time ago when react had just been open sourced and a lot of people were confused about it. Some of it is dated but the guiding principles are still relevant and align extremely closely to what i was saying in my talk. This is the talk that really “shifted” my mindset back when it was given
👌 1

https://www.youtube.com/watch?v=x7cQ3mrcKaY

c

Colton Idle

04/29/2020, 4:33 PM
Awesome. Thank you very much! And actually "is a bit of a misnomer IMO, since inheritance is just another form of composition" might have just helped it click. Why hasn't anyone else said that before? Hahah. Thank you! I will rewatch your ADS talk and the talk above. Appreciate it @Leland Richardson [G]
l

Leland Richardson [G]

04/29/2020, 4:34 PM
I’m also a huge fan of Ryan Florence’s talks on React. A good one is here:

https://www.youtube.com/watch?time_continue=1&v=kp-NOggyz54

it might not make as much sense if you aren’t familiar with react though, i can’t recall
c

Colton Idle

04/29/2020, 4:34 PM
I've been trying to learn a little bit of react before jumping onto compose, so this is actually really helpful!
l

Leland Richardson [G]

04/29/2020, 4:35 PM
And then here is my ADS talk for those who are listening in and haven’t seen it:

https://www.youtube.com/watch?v=Q9MtlmmN4Q0

🙌 1
👍 1
Also on the reading side, virtually 100% of Dan Abramov’s blog is gold: https://overreacted.io/
react has a lot of similarities to compose, but they’re definitely not the same thing. a lot of patterns will emerge from compose that are very distinct due to some of the differences
i’ve definitely found myself writing things differently after getting used to it for a while
c

Colton Idle

04/29/2020, 4:38 PM
Thanks for calling that out. I'll try not to engrain my way of thinking from react into compose.
l

Leland Richardson [G]

04/29/2020, 4:38 PM
but also, the android ecosystem has a lot of patterns and habits that will influence patterns that emerge in a big way (both good and bad)
sometimes i’m shocked at the number of layers android developers want to slap on things 😛
👆 2
😬 2
IMO compose really embraces an ethos of simplicity, and i think it will take some people a while to realize that they can shed >50% of the weight of their code if they want to
🤗 2
c

Colton Idle

04/29/2020, 4:40 PM
This all just has me more and more excited to start shipping compose!
🙂 2