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
230
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Between Models and Reality
mayunak
4
470
Building an army of robots
kneath
307
47k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
250
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
420
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
250
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
580
The SEO Collaboration Effect
kristinabergwall1
1
580
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
490
Building a Scalable Design System with Sketch
lauravandoore
464
34k
Making the Leap to Tech Lead
cromwellryan
135
10k
Paper Plane (Part 1)
katiecoart
PRO
2
11k
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 хࢎפ ߣী ؊ ফӝೡ ԅ...