Subscribe for the latest updates → goo.gle/AndroidDevs
@kgjr.6224
3 сағат бұрын
bro jetpack is becoming cooler and cooler every day ........ and I love it
@karolkulbaka8577
3 сағат бұрын
In-memory instance still not available?
@theolm
2 сағат бұрын
What a nightmare.... It's cool that works.... But setting up the driver for each platform sux. Can't this step be autogenerated too? Or at least provide a default implementation
@hinocenciopaulo
2 сағат бұрын
Which db does that? Realm? You have to do the same for Sqldelight.
@theolm
2 сағат бұрын
@@hinocenciopaulo I've never used Realm for KMP, so I don't know how it works. I think that if you work with multiple platforms, the setup should be simpler. In Flutter, for example, you just need to import the lib and use it... no extra setup. In KMP, I see a tendency to delegate more than necessary to the developer... this can be good because it allows customization of use and the API will hardly change, but in practice, for simple use cases, it's just bureaucratic (there's still the problem that no one is an expert in all platforms). In a real KMP project, you end up having dozens of initializations like this.
@HoussamElbadissi
Сағат бұрын
@@theolm "dozens" is quite the overstatement, most developers will support 4 platforms max (library authors have a different story tho, but I don't think that's different for Dart library devs either). To be clear, this is not a KMP limitation per-se, but a deliberate design decision by the Room team, as they wanted to optimize for customization first. They could've provided a common API function to create the database in common code, but they chose customizability first here (which maybe a tiny bit more effort at first, but it's not really that bad, you're always in control, and you only ever have to do it once). Maybe this can be something they can add in the future. Another note is that KMP works quite differently to Dart/Flutter. Dart lives in its own little sandbox, and then interacts with the outside world through FFI or other mechanisms. That has its benefits, like a unified interface for developers to access all of these platforms, and less cognitive overhead (to an extent). But has drawbacks, like a not-so-seamless interaction with the underlying platform (the Dart/Flutter devs and famous libraries do an amazing job here, but if you ever have to do it yourself, it's a bit icky). Kotlin blends into the target environment instead (e.g. on JVM, it's Java bytecode, on native, it gets merged with Obj-C/Swift LLVM bytecode) and can interact with it directly without any middle layers, which provides a different set of expectations and capabilities. You'll always find Kotlin Multiplatform code leaning towards _some_ amount of glue code right in your project, because it's very free to do so, and you don't even need to change the language. Still, you'll be covered from head to toe for 95% of cases using KMP libraries, sparingly ever needing to touch platform-specific code. Both are valid and awesome technologies, but have different technicalities! Some people like to call Dart "cross-platform" and KMP "multi-platform", but these words don't make much sense to me, since a lot of the use cases overlap anyways. KMP is still maturing (very fast!), but it's looking quite promising, building on Kotlin's already solid foundations.
@HoussamElbadissi
Сағат бұрын
To answer your question: yes, they could've definitely made a function for common-code with sane default implementations. That makes a good feature request!
@hinocenciopaulo
2 сағат бұрын
And what about unit testing in the commonTest module? When will we be able to share the in-memory db ?
@developer.emad.mehrez
2 сағат бұрын
great video, love Kotlin and KMP
@johnnykeener3727
2 сағат бұрын
Love Android, keep improving!
@isaacoppong5330
3 сағат бұрын
Love the room puns
@typAhmedSleem
3 сағат бұрын
Love itttttttttt
@EduardoSanchez-un2hh
Сағат бұрын
She cute.
@tiltedbybox6118
2 сағат бұрын
bro does she even have 18
@pabloavila6684
2 сағат бұрын
Does it matter?
@tiltedbybox6118
2 сағат бұрын
@@pabloavila6684 if she's under 18 indeed, it probably does, legal wise at least.
Пікірлер: 17