Declarative UI patterns (Google I/O'19)
HTML-код
- Опубликовано: 5 окт 2024
- Explore how reactive and declarative paradigms can be applied to Android UI development, making it easier for developers to integrate these patterns into their Android apps with Kotlin.
Watch more #io19 here:
Android & Play at Google I/O 2019 Playlist → goo.gle/2GRWlQh
Google I/O 2019 All Sessions Playlist → goo.gle/io19al...
Learn more on the I/O Website → google.com/io
Subscribe to the Android Developers Channel → goo.gle/Androi...
Get started at → developer.andr...
Speaker(s): Jim Sproch, Adam Powell, Romain Guy
T29485 event: Google I/O 2019; re_ty: Publish; product: Android - Languages; fullname: Adam Powell, Romain Guy;
*Romain* is the *best speaker @Google* , he doesn't hesitate to even talk about Google's/their inefficiency or mistakes and he is also humorous... We want more lectures and videos from him...
I love the Spinner backstory.
mark~
history of android UI
5:50 refactor UI
14:14 jetpack compose!
18:20
23:45 data flow
26:35
29:50 recap
30:50
This is truly awesome, very much like Flutter but for native Android with Kotlin! Can't wait for a stable version!
i developed native android apps for 3 years last year i ditched native for flutter. this year i just came to see what's new on android native platform for a webview app i'm building and here i see native android is copying Flutter
Are you happy now pal!!
This looks a lot like React Components and I think I like it!
As someone who left Android development mid 2015, this has tempted me to come back as it looks a lot easier to write and manage the UI.
Since 2015 have basically only used web apps, since most stuff needed to be cross-platform.
The most exciting change in Android since Kotlin support announcement!
This is the best part. Declarative UI ❤️
Why did they not do it earlier? 😍😍
They couldn't do that in Java
XML is also declarative, no?
Marko Mitic Litho is done in Java, basically the same thing as Jetpack
I always wondered why scattering all UI code was "best practice". Great to know this will fix it. It would take a year or so for this I guess.
Isn't reassigning mutable variables in a data class inside the function a side effect that makes the functions non-pure?
Flutter in Kotlin hell yeah
only slower and without hor reload :D
And kotlin for iOS,android,webapp in future CooL kkkkk
For me I don't care about hot reload kkkk,flutter is extremely great when comes to UI but dart lacks capabilities (features) if we compare to kotlin
Every time he says "so it turns into something very simple" I get goosebumps ;).. Yeah android and "simple" :))
Can't agree more with you
this makes me cry!
all the pain through the years.. no more!
Speaking of imperative vs declarative I don't see why one approach would exclude the other.
I like to be declarative at times, for instance when dealing with pipelines and lists, and to be imperative when things get hard so that I'm not the only person who can touch that code.
It feels like the old battle between OOP and functional programming. I've noticed that different part of an app are better written in different styles, the inner core of an app, where data is, is better written in functional style thanks to the predictability of pure functions, while the outer shell of an app, where views and components are is very well written in OOP.
Next big thing is coming! It looks like time to start playing with this.
They are paving the way for Android Developers to become Flutter Developers because of Fuchsia!
Why do functions start with upper case letter in your code?
It's just what Flutter is doing even with the "Apply Changes" hot reload feature. I thought I heard it will also bypass platform widgets and draw the view to the screen directly, very like Flutter.
I don't get. It looks like all those teams inside Google are fighting against each other. PWA, Flutter, now Jetpack Compose... Why do they invest so much time to invent so many instruments for different languages just for 1 OS. Just make 1!
I'm trying to step up my android game, what should i learn? I was going for flutter, but now we have similar declaritive UI in Android and i'm hell confused. Like most of the newcomers.
Although this might be a bit late. My suspicion is that when one thing fails, the other can quickly become the substitute. Of course, this will make developers unsure of the direction/focus of the tech.
Different use cases, different frameworks. Want to convert your well-written responsive website into a app and launch on app store - PWA is the quickest path. a startup wanting to release for both Ios and android as MVP - Flutter. Want to integrate React like paradigm slowly into your existing android app/ quickest way to android app - Jetpack composable. As a developer, don't focus on the framework names and programming languages too much. I am pretty sure someone who has professionally written declarative UI (either via React/web apps or flutter) can get up and running with composable in a few days. Learning the paradigm/architecture the first time is really hard. But once you do, all three (React/Flutter/Composable) vary only in syntax, environment and language used, the core concepts are same.
So are they planning to replace XML, that's what I want to know....
How you use Styles with this? Styles were useful for things like white labeling and different device size support..
Composable + DelegateAdapters = power
I don't necessarily like the fact every state is managed in a single place like a datastore of sort, I like the Angular approach with services in which every service owns and manages its own state. It's more modular. And I also like to have some state into components sometimes. My components are usually stateful for things like filtering of lists and pagination... For top-level variables such as lists of data I like to have injectable services manage that. So my components are both stateful from an angle and stateless from another. I think this approach is more flexible and feels more organic.
Awesome Kotlin Shirt! Where can I get it?
Can't wait to do the transition! 🔥
this will be production ready in 1.5 years.
Hey this was the flutter style of building UI. This was one the cool feature of flutter..but flutter has many more cool features like this.but Thanking you Team
Great presentation especially on data flow,
also it's interesting to see many different things are getting similar as they evolve :)
Please make this Android-first, but cross-platform.
Seems native development will teach me Flutter out of the box
Add native iOS development as well with Swift UI.
Android Transition/Migration to Flutter
This is very interested point from Google IO 2019
14:12 I love this guy
Great to see they actually credited Litho, Flutter etc
They all took their concept from React anyway...
14:34 ... and Flutter. Who would have thought?
Litho is so good
12:30"(...) if you have pets, small children, or and open plan office" Ahahah!
Now I'm really confused in learning Flutter and Kotlin. Presently I'm a java guy :(
Seems that good old Java for Android will gone in a next couple of years.
The question is which one would they prefer more Kotlin or Dart?
C++
No java will not gone, because android is open source and manufacturers uses pure android with their custom UI toolkits (xiaomi, hauwei, samsung). Seems to that they just use pure android sdk + java. They does much custom ui elements by themselves just by drawing it in pure java)
And it's bad that google changes every year development paradigm and instruments. Its almost impossible to refactor all code using these new paradigms
Hmm they showed `extends View` and contrasted it with Fragment; but what about `extends FrameLayout`?
i developed native android apps for 3 years last year i ditched native for flutter. this year i just came to see what's new on android native platform for a webview app i'm building and here i see native android is copying Flutter
ANKO ?
I am HYPED!
Wait, are those literals in dips? e.g. 4.dp @21:41
it's been a year and the api is still under developement. that is the case with all Android APIs
YES!
Where do I get one of these Android Kotlin tshirts?
This is really great news
but....why?
28:50 people haven't been doing it like this?
Awesome!
35 minutes presentation? OMG!
AMA
Every year you go forward and you continue to make a mess of services and addons of issues. I don't truly understand why....as a good thinking man once said. Over the years i started reading more code than writing.....best would be to keep your Flutter in Flutter don't mess up Android also.
This isn't replacing anything. If anything it gives us more options for how we want to develop our apps.
More options, more decisions, more delay, more confusion...
but kotlin is still just java bytecode that uses JVM like runtime
Seems for me like an attempt to solve a problem that have never existed. Build an ui from code? A very fresh idea! How to preview it? How to build constraint layout from code and doesn't use 1k lines? Should we just build and see like flutter says (with wasting a few minutes)? Thanks, but no thanks
Anko?)
Not pixel 2 wtf Google
Does this still exists ???
But whyy 😅😅😅
Flutter have overtaken native 😅
Atleast for me 😅
Do you enjoy the 😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅emoji?
I think Google is trying to align native Android development to as close to Flutter and Fuchsia as possible.
Google is clearly transitioning devs and users from using native Android concepts to getting familiar to concepts developed in Fuchsia and Flutter. Exciting times!
@@nadeemshaikh7863 Concepts developed in Fuchsia and Flutter?) You mistyped "React".
surely JetPack Compose inspired by SwiftUI not those thing which they say :D
cool
😍
Again any thing made to solve their problems and not to make it better 😒
They put in react in android. Lol
It's not really that declarative...
😇👩👩👧
🏳️🌈💙🤼🏊🤽⛹️💇
Inspired by React,litho, flutter, Viewjs?? Just say Microsoft.
Yikes
developer.android.com/jetpack/compose
Note:building under windows is currently not supported
This basically is flutter, I hate it, I love flutter but they shouldn't be bleeding into each other
Why? I think Google is trying to align native Android development as close to Flutter and Fuchsia as possible.
Google is clearly transitioning devs and users from using native Android concepts to getting familiar to concepts developed in Fuchsia and Flutter.
So, that both devs and users suddenly don't get disrupted when Google replaces the core of Android and Chrome OS ie Linux with Fuchsia/Zircon.
Kotlin Native