Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

Juan Guillermo Gómez ➢ Co-Leader y Co-Founder of GDG Cali. ➢ Tech Lead in WordBox & Founder DevHack ➢ Consultant and advisor on software architecture, cloud computing and software development. ➢ Experience in several languages and platforms. (C, C#, Java, NodeJS, android, GCP, Firebase). ➢ Google Developer Expert (GDE) in Firebase & GCP ➢ BS in System Engineering and a MS in Software Engineering. ➢ @jggomezt ➢ youtube/devhack

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

❖ State of the app changes for user interactions, The UI need to be updated to display the current data. Manipulating views can increase the probability of errors and illegal states. For example, an update might try to set a value of a node that was just removed from the UI. ❖ If a piece of data is rendered in multiple places, it’s easy to forget to update one of the views that shows it. It’s also easy to create illegal states ❖ The software maintenance is increasingly complex if the number of views increases. ❖ Imperative programming.

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

❖ Declarative programming. ❖ DSL Kotlin. ❖ Declarative UI simplifies the engineering associated with building and updating user interfaces. ❖ The technique works by conceptually regenerating the entire screen from scratch, then applying only the necessary changes. ❖ Regenerating the entire screen is expensive in terms of time, computing power and battery usage.

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

❖ Compose is a declarative UI framework. ❖ Compose intelligently chooses which parts of the UI need to be redrawn at any given time. ❖ Set of composable functions that take in data and emit UI elements. ❖ Dynamic Content.

Slide 9

Slide 9 text

The function is annotated with the @Composable annotation The function takes in data The function displays text in the UI The function doesn't return anything This function is fast, idempotent, and free of side-effects Dynamic content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

The caller updates the value of clicks. Compose calls the lambda with the Text function again to show the new value; this process is called recomposition. Composable functions can execute in any order. Composable functions can run in parallel

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

Limitation of inheritance: we have to have a single parent that we inherit from.

Slide 15

Slide 15 text

❖ Compose is not an annotation processor ❖ Kotlin compiler plugin in the type checking and code generation phases of Kotlin ❖ The implementation of the Composer contains a data structure that is closely related to a Gap Buffer. This data structure is commonly used in text editors.

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

❖ https://developer.android.com/jetpack/compose/mental-model ❖ https://medium.com/androiddevelopers/understanding-jetpack-compose-part-1-of-2-ca316fe39 050 ❖ https://medium.com/androiddevelopers/under-the-hood-of-jetpack-compose-part-2-of-2-37b2c 20c6cdd

Slide 19

Slide 19 text

https://www.facebook.com/escueladevhack/ Escuela de Hackers www.devhack.co https://github.com/escueladevhack