Compose Multiplatform Alpha: The Story

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Hi, my name is Sebastian. I'm one of the developer advocates here at JetBrains. Today we are releasing the alpha version of Compose Multiplatform, which is our framework for building modern and declarative user interfaces for your applications in Kotlin, no matter whether you're targeting Android, desktop, or the browser. If you're a mobile developer, you may have already heard about the Jetpack Compose framework, which is Android's modern toolkit for building native user interfaces. Now, in collaboration with Google, JetBrains is bringing that framework to new places. With Compose Multiplatform, you can use the same declarative approach and APIs used to build modern Android applications to create user interfaces for desktop apps and apps running in the browser, powered by Kotlin on the JVM and Kotlin/JS. If this has already piqued your interest, you can explore more on that on your own in the official GitHub repository for the project. However, today we are here because we want to tell you the story of how we got to where we are today and what we plan to do next with Compose Multiplatform. Starting us off is Jim Sproch, senior software engineer at Google who originally proposed the creation of the Compose framework and is driving its development. Thanks, Sebastian. And thank you to the entire JetBrains team. This ongoing collaboration is amazing. I love seeing what you all are building and I think we're just getting started. Jetpack Compose is a declarative UI toolkit originally built for Android. Nowadays, the project is an enormous open source effort, spanning dozens of teams not to mention the countless community contributions. But it wasn't always this big. What I love about Compose is that it's a story of teams coming together to create something that is more than the sum of their parts. Back in May 2017, I had an idea to make it easier for developers to build and maintain their UI by bringing the concepts of declarative UI programming to Android. My plan was to use a Kotlin compiler plugin that would allow developers to define their UI in terms of composable widgets. I wrote up a design proposal and began working on it immediately. At the time it was just an ambitious side project. It didn't take long, though, before I was working on it full time. And after another six months, we became a multi-person team. It was rather amusing, because we were building an Android framework, but none of us had much experience with Android. Fortunately, the Android UI toolkit team was right down the hall, and they had decades of experience building for Android. Plus, they had already been contemplating a complete rewrite of the existing toolkit. It was perfect timing, and we joined forces with the Toolkit team, the Android Studio  team and number of other teams at Google To build Jetpack Compose together And JetBrains has also been there with us since the very beginning. Even when Compose was just a side project, we were regularly exchanging emails across the entire Kotlin compiler team, asking questions about the internals of the Kotlin compiler and getting architecture advice for the Compose compiler, which takes advantage of the fact that Kotlin is such a well-designed and extensible language. As the project grew, so did our collaboration. It's another example of teams coming together to form the overall story of Compose. And that's why I'm so excited about this next step in our journey. While Google has been focused on  making Compose work great on Android The modular design and open source  nature of Compose allows external   teams to explore additional  applications of the technology and contribute back if they want to Thus, I was overjoyed when Nikolay reached out with an idea to make Compose work using Kotlin Multiplatform technology. I too shared a belief in its potential endeavor. That was maybe a year and a half ago. And it's been absolutely incredible to see the progress since. JetBrains has brought together a team of brilliant engineers and brought the Compose technology to Windows, Mac, Linux, and web. I never thought I would be writing desktop applications, but honestly, Compose for Desktop makes it so easy and fun that I just can't help myself. And I can even share code with my Android application, which makes it all the better. The progress has been astonishing, and I am so excited to see what the future of Compose holds. Thus, it is my great honor to introduce Nikolay Igotti, who kicked off the whole Compose Multiplatform effort and is leading that effort at JetBrains. Over to you, Nikolay. Jim, thanks for the intro. Here at JetBrains we have been realizing that we need a multiplatform UI framework for Kotlin for a long time. And Jetpack Compose was clearly an amazing choice, being innovative, reactive, and using the full power of Kotlin to make declarative UI very easy to write. However, originally it was an Android-only solution. We investigated the code base and found it very well-written and multiplatform in nature. So we started with a simple proof of concept port using Swing and then decided to help to convert Jetpack Compose to Kotlin Multiplatform technology. With amazing support from our Google colleagues, and especially Jean, we were able to do so. We knew from the beginning that we wanted to provide a high-performance experience. That's why we relied upon the well-known and popular Skia library for our rendering needs. It comes with great support for hardware-accelerated rendering. So, we quickly enabled rendering using Metal on macOS, DirectX on Windows, and OpenGL on Linux. In November of 2020, we released Milestone 1 for three major desktop platforms: macOS, Windows, and Linux. The community warmly accepted our release, and reported to us various issues and feature requests. So since then we released three more milestones. In May 2021, we released Compose for Web technological preview, which allowed developers to use the Compose Kotlin compiler plugin and reactive engine for development of web applications. And now we're happy to announce the Compose Multiplatform alpha release for desktop and web. It features a comprehensive set of APIs to develop desktop and web applications, along with IDE tooling and application packaging support. This release is suitable for developing real-life applications. And, of course, we at JetBrains use it too. The JetBrains Toolbox App has been rewritten using Compose for Desktop, and an update release was out of the doors just recently. We hope that Compose will eventually become the most popular Kotlin UI framework. And now please welcome Roman Elizarov, Lead of the Kotlin Project here at JetBrains. Kotlin is an application-centric, modern, multiplatform programming language that runs on server-side, web, and various mobile devices. We have started Kotlin's multiplatform journey shortly after the initial release of Kotlin 1.0. Since then, we have grown the ecosystem of Kotlin libraries, so that you can share communication and business logic of your code across different platforms. Thanks to Kotlin's top-notch interoperability with platform-specific libraries, you can use UI libraries that are provided on this specific platform to write a truly native user interface for your applications. That's a great story. We see its tremendous adoption and a growing number of successful cases for it. However, at the same time we see that many developers would gladly trade a platform-native UI for a truly cross-platform one, so that they can write their code just once using a single set of common UI libraries and deploy it on multiple frontend application platforms, so that they can further save their development effort and increase the fraction of shared code in their projects. And that's exactly the niche that Compose fills. Compose is a modern reactive UI framework that builds and expands upon the features of the Kotlin language itself, embracing and matching Kotlin's philosophy of readability and ease of use, minimizing tedious boilerplate and focusing developers' attention on the task at hand. Compose is the latest contribution to the ecosystem of multiplatform Kotlin libraries that builds upon existing libraries like Coroutines and provides ample opportunities for building for the libraries on top of it. For those of us working in the core Kotlin team, Compose is a great role model of how we envision collaboration between developers and companies working to further expand the Kotlin ecosystem, providing a wide number of library choices to fill various developers' needs. Being the largest Kotlin-first library developed to date, Compose also provides a trove of feedback to the core Kotlin team on the language, libraries, and tooling. Speaking about tooling, Kotlin would not have been Kotlin if not for our focus on tooling. We strongly believe that further progress in developer productivity is only possible with smart and integrated tools that understand the context of what the developer is doing, helping automation of common tasks and catching potential errors just as the code is being typed. The Compose team shares our passion for tooling and real collaborating on the IDE aspects of Compose support just in the library itself. Together, we're committed to bringing you the best of the modern tools to write code for the modern platforms. Now, please welcome Andrey Rudenko, the first developer hired to the Compose team at JetBrains. Hi, I'm Andrey Rudenko, and I'm working on Compose for Desktop from the early days of the project. In my 15 years of development experience, this was my first deep dive into UI toolkit internals. The most surprising thing for me was how much the UI toolkits are doing, often humbly and not noticed by us developers. Even the most basic components like text labels and text fields have a bunch of embedded interactions with the operating system, pointer devices, the keyboard, and the application itself. Dozens of keyboard shortcuts, text selection support with and without Shift by keyboard, by double and triple clicks, support for input methods and accessibility protocols. Plus all the difficulties that modern text rendering and text editing brings with them, like emoji compositions and bidirectional text. Operating systems have subtle differences at almost every level of integration – from the event system to the set and behavior of keyboard shortcuts and how text selections work. For example, macOS has a special small popup when you long-press a key in a text field to select some specific character variant. When we develop applications, we usually don't think about such sort of interaction. It should just work. But in fact, we have special code to support this particular type of input method. The new generation of the UI toolkit is challenging an even bigger difference between platforms and hardware. It's essential now to have first-class support for mouse events and touch events, hardware and software keyboards, at the same time. And while there is still a lot of work here, we are working hard to make Compose for Desktop a great cross-platform UI toolkit where as much as possible is done and just works, to allow application developers to focus on their own ideas and thoughts. Thank you. At this point, we've seen the story of our collaboration between JetBrains and Google on the Compose technology to the present day. Before we wrap up, Nikolay is going to give us an outlook on what's going to happen next with Compose for Desktop and Compose for Web in the future. We at JetBrains are working hard on bringing you the stable release of Compose for Desktop and Web. We hope to have 1.0 before the end of this year, although it may change depending on the development pace. Building upon a stable core framework and IDE tooling, we all have so many exciting opportunities – new themes, new widgets, new platforms. For example, JetBrains Compose has Kotlin/Native port of Compose in development, and we are considering building all the possible Compose-based solutions, such as canvas-based rendering using a WebAssembly port of Skia. We find a lot of enthusiasm about Compose Multiplatform inside JetBrains, Google, and our amazing community. So we hope to fulfill expectations and provide a fast, reliable, and exciting application development experience for all Kotlin developers. Well, that concludes our peek behind the scenes for Compose Multiplatform for today. We're well on track to a first stable release of Compose for Web and Compose for Desktop, which also makes right now the most important time for you to try out the technology and give us feedback on your development experience. Even if you haven't worked with Kotlin before, you now have one more reason to give it a try the next time you want to build a desktop or web application with a modern declarative UI framework. To learn more about Compose for Desktop and Web, check out the repository on GitHub, link in the description. Our team is also working on providing more content on Compose for Desktop and Web, which will come your way on the Kotlin YouTube channel. If you're not subscribed yet, make sure to visit YouTube.com/Kotlin and hit that Subscribe button to never miss an update. Well, that's it. Thanks for watching. Take care and go build some awesome user interfaces!
Info
Channel: JetBrainsTV
Views: 15,468
Rating: undefined out of 5
Keywords: JetBrains, software development, developer tools, programming, developer, Jetpack Compose, Compose, Compose Multiplatform, KMM, Kotlin Multiplatform, Android, Android UI
Id: MiXkDyxEDJI
Channel Id: undefined
Length: 14min 32sec (872 seconds)
Published: Wed Aug 04 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.