what to expect when what to expect when you re expecting
play

WHAT TO EXPECT WHEN WHAT TO EXPECT WHEN YOU'RE EXPECTING... JETPACK - PowerPoint PPT Presentation

WHAT TO EXPECT WHEN WHAT TO EXPECT WHEN YOU'RE EXPECTING... JETPACK YOU'RE EXPECTING... JETPACK COMPOSE COMPOSE Mark Murphy, CommonsWare mmurphy@commonsware.com NEW TALK, WHO DIS? NEW TALK, WHO DIS? NEW TALK, WHO DIS? NEW TALK, WHO DIS?


  1. WHAT TO EXPECT WHEN WHAT TO EXPECT WHEN YOU'RE EXPECTING... JETPACK YOU'RE EXPECTING... JETPACK COMPOSE COMPOSE Mark Murphy, CommonsWare mmurphy@commonsware.com

  2. NEW TALK, WHO DIS? NEW TALK, WHO DIS?

  3. NEW TALK, WHO DIS? NEW TALK, WHO DIS?

  4. A BRIEF COMPOSE HISTORY A BRIEF COMPOSE HISTORY BECAUSE COMPOSE HASN'T BEEN AROUND LONG BECAUSE COMPOSE HASN'T BEEN AROUND LONG Announced at Google I|O 2019 First bits released fall 2019 Role: replacement UI framework Timeline Now: developer preview "Summer 2020": alpha 2021: stable

  5. A BIT OF COMPOSIN' A BIT OF COMPOSIN' @Composable fun NewsStory () { val image = imageResource(R.drawable.header) Column(modifier = Modifier.padding(16.dp)) { val imageModifier = Modifier .preferredHeightIn(maxHeight = 180.dp) .fillMaxWidth() Image(image, modifier = imageModifier, contentScale = ContentScale.Crop) HeightSpacer(16.dp) Text("A day in Shark Fin Cove") Text("Davenport California")

  6. REVISITING GOOGLE AND REVISITING GOOGLE AND KOTLIN KOTLIN THOSE WHO DO NOT LEARN FROM HISTORY... THOSE WHO DO NOT LEARN FROM HISTORY... 2017: Oh, you're interested in Kotlin? 2018: We support Kotlin! 2019: Kotlin first! But we still support Java! (hint: they said that once about Eclipse)

  7. TALENT ACQUISITION TALENT ACQUISITION DEVELOPERS DON'T GROW ON TREES (USUALLY) DEVELOPERS DON'T GROW ON TREES (USUALLY) Hiring Android talent has been tough... until 2020 upended matters Being considered "behind the times" makes that tougher How long before you can't land talent because you're using Java? Reasonably likely that Compose will have a similar effect

  8. WHY WE CARE NOW WHY WE CARE NOW VERSUS, Y'KNOW, LATER VERSUS, Y'KNOW, LATER Do you remember how that Kotlin migration went? Migrating to Compose will be narrower yet more complicated Narrower: effects grow closer you get to the UI rendering Complicated: less automatic tool support, most likely Perfect Planning Prevents Poor Production... Perhaps

  9. WHAT WE WANT WHAT WE WANT BESIDES FEWER MURDER HORNETS BESIDES FEWER MURDER HORNETS Minimize transition pain... with minimal extraneous prep work, in case Compose fizzles Identify opportunities to improve the apps... as Compose itself is largely a lateral move

  10. KOTLINIZE! KOTLINIZE! ALL THE THINGS! MOSTLY! ALL THE THINGS! MOSTLY! Compose relies upon a Kotlin compiler plugin to perform its magic Net: Java ain't walkin' through that door By the time Compose is mainstream, Java will be tech debt

  11. CLEAN UP YOUR LAYOUTS CLEAN UP YOUR LAYOUTS THEY'RE PROBABLY CRUFTY THEY'RE PROBABLY CRUFTY Move everything you can into styles, themes, dimension resources, etc. Those still have roles in Compose More tools/libraries to assist, such as Accompanist Objective: minimize what is in the layouts, since those get rewritten

  12. GO EASY ON DATA BINDING GO EASY ON DATA BINDING CAN'T MAKE AN OMELETTE... CAN'T MAKE AN OMELETTE... Data binding is tied to layout resources Layout resources are going away (mostly) Net: your binding expressions will need to get replaced Maybe don't change what you have, but perhaps don't add more to the pile

  13. A BIT MORE COMPOSIN' A BIT MORE COMPOSIN' private data class AgreementViewState( val terms: Boolean , val privacy: Boolean ) { fun canProceed() = terms && privacy } @Composable fun Agreement() { Column ( verticalArrangement = Arrangement.SpaceAround, horizontalGravity = Alignment.CenterHorizontally ) { val viewState = state { AgreementViewState(terms = false , privacy = f Column (horizontalGravity = Alignment Start ) {

  14. EVEN MORE COMPOSIN' EVEN MORE COMPOSIN' (INSERT ANDROID STUDIO HERE) (INSERT ANDROID STUDIO HERE)

  15. CLEAN UP YOUR CLEAN UP YOUR ARCHITECTURES ARCHITECTURES YES, ALL OF THEM YES, ALL OF THEM Compose designed for unidirectional data flows State flows down Events flow up Widgets are not stateful May require some tweaking of your approaches (e.g., two-way data binding) Consistent architecture will simplify migration

  16. IDENTIFY TACTICAL UI IDENTIFY TACTICAL UI IMPROVEMENTS IMPROVEMENTS MAKE GOOGLE HAPPY! USERS TOO! MAKE GOOGLE HAPPY! USERS TOO! Landscape? Dark mode? Split-screen?

  17. PONDER MOONSHOTS PONDER MOONSHOTS CREW DRAGON HAS TOUCHSCREENS, SO... CREW DRAGON HAS TOUCHSCREENS, SO... Things that are "game changers" that Compose might make easier to achieve Example: Desktop via ui-desktop Kotlin/Multiplatform Windows/macOS/Linux via the JVM Can you expand your market with modest re-engineering?

  18. BUDGET PLAY TIME BUDGET PLAY TIME SKIN YOUR KNEES EARLY! SKIN YOUR KNEES EARLY! By the time Compose reaches beta, try to start experimenting Partly, so you can learn and use that knowledge to better steer your plans Partly, so you can tell us what you need to succeed Tell your favorite GDE Tell your favorite Compose library maintainer Tell #compose on Kotlinlang Slack (or DM me there)

  19. PREPARE ARGUMENTS FOR PREPARE ARGUMENTS FOR MANAGEMENT MANAGEMENT OR PERHAPS JUST GENTLE CONVERSATIONS OR PERHAPS JUST GENTLE CONVERSATIONS Why are we bothering with Compose? (recruiting) Will this interrupt our delivery schedules? (hopefully not, using progressive replacement) How does this help our users? (tactical UI changes plus moontshots) How does this help the CEO's golf game? (you're on your own for that one)

  20. R-E-L-A-X R-E-L-A-X WHAT? WRONG QB? WHAT? WRONG QB? Expect a significant hype train All the cool kids will be slinging Compose code You will get your turn too Do right by your users and your team, and don't Compose without a plan

  21. WHERE TO GET THIS WHERE TO GET THIS PRESENTATION PRESENTATION https://commonsware.com/presos/2020-06-Compose/

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend