Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Circuit 찍먹해보기(부제: Circuit 절망편)
Search
easyhooon
July 15, 2025
180
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Circuit 찍먹해보기(부제: Circuit 절망편)
easyhooon
July 15, 2025
More Decks by easyhooon
See All by easyhooon
Circuit 찍먹해보기(부제: Circuit 희망편)
easyhooon
0
180
Compose Multiplatform Image Picker
easyhooon
0
240
Featured
See All Featured
Building Adaptive Systems
keathley
44
3.3k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
640
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
430
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
760
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
500
Fireside Chat
paigeccino
43
4.1k
Testing 201, or: Great Expectations
jmmastey
46
8.3k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
410
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
430
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.3k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Transcript
ള Circuit ନݡ ೧ࠁӝ Circuit ݎಞ
ݾର - Circuit ױٜ ࣗѐ • ۨಌ۠झо ࠗೣ • ী۞ݫࣁо
ࠛೣ • Circuit Navigation ࢎਊद feature ݽٕр ࣽജ ଵઑ ߊࢤ ਤ(೧Ѿ) • AAC ViewModelਸ ࢎਊೡ ࣻ হ • Presenterীࢲ Eventܳ ߑೡ ࣻ হ • Migration ࠺ਊ ఀ • ܻ • Ӓۢীب ࠛҳೞҊ...!
1. ۨಌ۠झо ࠗೣ https://github.com/slackhq/circuit/discussions • ҕध ޙࢲо ӟ ೞ݅,
ܳ ਊೠ ࢠٜ ݒ ࠗೠ ࢚ട Circuit github samples -> ցޖ рױೣ Maintainer ZacSweersש ѐੋ ۽ં(CatchUp) -> য۰ chrisbanesש ѐੋ ۽ં(tivi) -> ѐয۰ • ۽ંী بੑೡ ۄ࠳۞ܻܳ ࢶೡ ٸ, ۄ࠳۞ܻ ࢤక҅о ੜ ҳ୷غয חח ਃೠ ࢎউ • Ӓա݃ ೯ github Discussionsо ഝߊ غҊ !
1. ۨಌ۠झо ࠗೣ য়טب discussionী Ӗਸ ࢿ೮... • Ӓېب ই
ҾӘೠ ٜࠗ࠙ ݆. (Still Hungry) • ߸೧ ࢎۈ ...ƕ ٜ ߄ࢂо ࠁ...
2. ী۞ ݫࣁо ࠛೣ • Circuit kspܳ ా೧ ࠁੌ۞ۨ ٘ܳ
ࢤࢿೞח ߑधਸ ࢎਊ -> hilt/dagger৬ э DI ۄ࠳۞ܻ য֢ప࣌ਸ भ࠙ ഝਊ -> Ӓ ূ, Navigatorա Screen ੋझఢझ э ۠ఋ ۄఠܳ زਵ۽ ੑೞӝ ਤೠ @AssistedInject৬ э য֢ప࣌ ನೣؽ -> য֢ప࣌ਸ ೞաۄب ࡅڰܾ ҃, ஹੌ/۠ఋী ী۞о ߊࢤೞѱ غחؘ যڃ য֢ప࣌ਸ ࡅ ڰ۰ࢲ ߊࢤೠ Ѫੋ Ӓ ਗੋਸ ী۞ ݫࣁܳ ా೧ ইղӝ য۰ (ksp৬ Daggerী ೠ ೧о ࠗ೧ࢲ Ӓ۠ Ѫ эӟೣ) What? Route not available?...
• goTo()ܳ ా೧ ചݶ زद, ز ೧ঠೡ ݽٕਸ ઓ೧ঠೞח ޙઁ
ߊࢤ • A -> B -> C ... -> A feature ݽٕр ࣽജ ଵઑо ߊࢤ ೡ ࣻ • ۽Ӓੋਸ ਗೞח ҃, ࠗ࠙ feature ݽٕ feature:login ݽ ٕਸ ઓೞח ޙઁ ߊࢤ 3. Circuit Navigation ࢎਊद feature ݽٕр ࣽജ ଵઑ ߊࢤ ਤ(೧Ѿ)
3. Circuit Navigation ࢎਊद feature ݽٕр ࣽജ ଵઑ ߊࢤ ਤ(೧Ѿ)
https://github.com/YAPP-Github/Reed-Android/pull/39 • Circuitীࢲ Screen UI৬ Presenterܳ োѾೞח Key(ध߹ ೡ) • screens ݽٕਸ ࢤࢿೞৈ, ݽٚ Screen(ݾ)ٜਸ ҙܻ • ݽٚ feature ݽٕ screens ݽٕ݅ਸ ઓೞب۾ ࢸ҅
4. AAC ViewModelਸ ࢎਊೡ ࣻ হ • Circuit AAC ViewModelਸ
ࢎਊೞ ঋҊ, Circuitীࢲ ਗೞח ߹ب Presenterܳ ࢎਊ • Android ѐߊীࢲ AAC ViewModelۆ? -> Con fi guration Change۽ ࠗఠ ؘఠ(࢚క) ܳ ࠁઓ оמ -> viewModelScopeܳ ా೧ উೞѱ ࠺زӝ ܻܳ ೡ ࣻ -> ೠ݃٣۽ AAC ViewModel न(ᙲ)
4. AAC ViewModelਸ ࢎਊೡ ࣻ হ • Android ѐߊীࢲ AAC
ViewModelਸ ࢎਊೡ ࣻ হח Ѫ... • Con fi guration Change۽ ࠗఠ ؘఠ(࢚క)ܳ ࠁઓೡ ࣻ হ -> Circuit rememberRetainedܳ ా೧ оמ • viewModelScopeܳ ా೧ উೞѱ ࠺زӝ ܻܳ ೡ ࣻ হ -> rememberCoroutineScope۽ оמ(?)
4. AAC ViewModelਸ ࢎਊೡ ࣻ হ • ݈۽ rememberCoroutineScopeо viewModelScopeܳ
ೡ ࣻ ਸө? • viewModelScopeח ױࣽೠ ܖ౯ झо ইש • ViewModel Lifecycleҗ ೣԋ ઙܐغয ݫݽܻ ־ࣻ ਤਸ ઁѢ • SupervisorJobਸ ా೧ ܖ౯ झܳ ࢤࢿೞৈ, ೞਤ ܖ౯ ೞաо ৻۽ ஂࣗغ؊ۄب, ܲ ܖ౯ী ೱਸ ঋب۾ ࢸ҅ https://github.com/slackhq/circuit/discussions/1883 -> ۞ೠ ޙਸ ೧ Discussionਸ ా೧ ೧ࣗೡ ࣻ
5. Presenterীࢲ Eventܳ ߊ೯ ೡ ࣻ হ Circuit Presenter •
UI۽ ࠗఠ ׳ ߉ ߮(eventSink)ܳ ా೧ ࠺زӝ সਸ ࣻ೯ೞҊ, ܳ ా೧ সؘػ Stateܳ UIীѱ ߈ജ • Presenterղীࢲ _uiEvent.send(Event), postSideE ff ect(SideE ff ect) ١ ߮ ߊ೯ ࠛоמ
5. Presenterীࢲ Eventܳ ߑೡ ࣻ হ ҕधޙࢲ ղਊ ߊ ߂
ߣ) • ਫ਼Ӭ, Stateఋੑী ߮ ߔ ನೣغয Ҋ? -> ֎! ӝઓ UDF(Unidirectional Data Flow) ಁఢҗח ܰѱ וԑ ࣻ ݅, Circuitীࢲח ߮ ߊ೯ਸ ࢚క ೠ ࠗ࠙ਵ۽ ஂәפ. ীח ߮(Flow) ߑधҗ Circuit ղࠗਵ۽ ߮ ܳ ҙܻೞח ಁఢਸ ࢎਊ೮ਵա, ۽ ੋೠ ઁডࢎ೦җ ࠂ ࢿ ٸޙী Ә Ӕߨਸ ఖೞѱ غणפ. Eventܳ State۽ ҙܻ • Compose Stateܳ ా೧ Eventܳ ܻ(on/o ff ߑध, Like StateFlow) • Channel ࢸա ߮ झܿ, ݣ౭ நझ ١ ࠂೠ ղࠗ ࢸ স ਃೞ ঋ • Flow৬ ׳ܻ, Eventо ਬपؼ ਤ হ(ױ, ۞ೠ Event ܻߑधਸ ࢶഐೞ ঋਸ ࣻ ) https://slackhq.github.io/circuit/states-and-events/
ߣ৻) StateFlow vs Compose State • Compose Stateח StateFlow update৬
э ਗ(Atomic) োܳ ਗೞ ঋ • ৈ۞ झۨ٘ীࢲ زदী Compose Stateী Ӕೡ ҃ race condition ߊࢤೡ ࣻ ! • ࠁా ҃ Main(UI) Threadীࢲ݅ Ӕೞחۄ ޙઁо হ݅, Circuitীࢲח زद ߮ ܻद ৈ۞ ܖ౯ э Stateܳ ࣻೞৈ race condition ߊࢤ ۰ؽ https://wooyoung-tom.medium.com/is-mutablestateof-not-thread-safety-12ea1bfb2bb7 ܻ೧ࢲ Discussion ৢ۰ࠅ ੋؘ, ۞ೠ ࠗ࠙ਸ ࢸ݃ рҗ೮ਸөਃ? Circuit ѐߊٜ࠙ݶ ਤ ղਊਸ ো ঌҊ ਸ బؘ ࠙ Ҋ۰ػ ࢸ҅ੋ ҾӘפ.
6. Migration ࠺ਊ ఀ • AAC ViewModelਸ ࢎਊೞ ঋҊ, Circuit
Presenterܳ ࢎਊ • Compose Navigationਸ ࢎਊೞ ঋҊ, Circuit Navigationਸ ࢎਊ -> ӝઓ ۽ંܳ Circuitਵ۽ Migrationೞחؘ ੋ স ਃ • ژೠ, ܲ MVI ۨਕ?(ۄ࠳۞ܻ?)ٜ ࠁ ۞ழ࠳о ࠺Ү ֫ ಞ -> ղ नӏ ੋਗ ైੑؼ ҃, Circuitਸ ೧ೞҊ ࣼ೧ח ؘ ࢚ೠ ৡࠁ٬ दр ਃೡ Ѫਵ۽ ࢚
✅ ۞࠶ ग ߂ ҳഅ о٘ ١ पޖ ѐߊী ਃೠ
ۨಌ۠झ ࠗ ✅ AAC ViewModel ࢎਊ ࠛо, Presenter ߮ ߊ೯ ࠛоמ ١ ӝઓ ѐߊߑध ࠺ ઁড ࢎ೦ ઓ ✅ بੑ द ֫ Migration ҕࣻ৬ ৡࠁ٬ ࠺ਊ, ୶റ ܲ ইఃఫ ߸҃ द ୶о ജ ࠺ਊ ߊࢤ ࢤక҅о ই ࢿ ױ҅ী য ۽؋࣌ ജ҃ীࢲ بੑೞӝীח नೠ Ѩషо ਃೠ द...! Circuit ױ ܻ 🗒 Ӓؘ۠ ۽؋࣌ী بੑೠ ഥࢎٜ ৈۤ ח٠ פ. оҊर
Ӓۢীب ࠛҳೞҊ...! • ۨಌ۠झо ࠗਵ۽ Circuit ղࠗ ࣗझܳ ࠙ࢳ೧ࠁݴ
Compose, DI, ViewModel ١ ী ೠ ӝࣿ ೧۱ ೱ࢚ • Circuit ҙ۲ ۨಌ۠झܳ ࢿ೧ࠁݴ, ஶܻ࠭ఠ۽ ࢿೡ ࣻ ח ӝഥ ദٙ • Android ѐߊ ېо ؼ ࣻ ח Compose-First ইఃఫ ࢶҳ ҃ णٙ https://news.hada.io/topic?id=21894
ۨಌ۠झ • https://slackhq.github.io/circuit/ • https://github.com/slackhq/circuit • https://github.com/slackhq/circuit/discussions • https://velog.io/@mraz3068/series/Circuit •
https://news.hada.io/topic?id=21894 • https://wooyoung-tom.medium.com/is-mutablestateof-not-thread- safety-12ea1bfb2bb7
Q&A хࢎפ ߣী ؊ ফӝೡ ԅ...