介绍 Trio | 第一部分

By: Eli Hart, Ben Schwab, Yvonne Wong

作者:Eli HartBen SchwabYvonne Wong

At Airbnb, we have developed an Android framework for Jetpack Compose screen architecture, which we call Trio. Trio is built on our open-source library Mavericks, which it leverages to maintain both navigation and application state within the ViewModel.

在Airbnb,我们开发了一个基于Jetpack Compose的Android框架,称为Trio。Trio建立在我们的开源库Mavericks之上,利用它在ViewModel中维护导航和应用程序状态。

Airbnb began development of Trio more than two years ago, and has been using it in production for over a year and a half. It is powering a significant portion of our production screens in Airbnb’s Android app, and has enabled our engineers to create features in 100% Compose UI.

Airbnb开始开发Trio已经超过两年了,并且在生产中使用了一年半。它正在为Airbnb的Android应用程序的大部分生产屏幕提供支持,并使我们的工程师能够在100%的Compose UI中创建功能。

In this blog post series, we will look at how Mavericks can be used in modern, Compose based applications. We will discuss the challenges of Compose-based architecture and how Trio has attempted to solve them. This will include an exploration of concepts such as:

在这个博客系列中,我们将探讨如何在现代的基于Compose的应用程序中使用Mavericks。我们将讨论基于Compose的架构的挑战以及Trio如何尝试解决这些问题。这将包括对以下概念的探索:

  • Type-safe navigation between feature modules
  • 特性模块之间的类型安全导航
  • Storing navigation state in a ViewModel
  • 在ViewModel中存储导航状态
  • Communication between Compose-based screens, including opening screens for results and two-way communication between screens
  • 基于Compose的屏幕之间的通信,包括打开屏幕以获取结果和屏幕之间的双向通信
  • Compile-time validation of navigation and communication interfaces
  • 编译时验证导航和通信接口
  • Developer tools created to support Trio workflows
  • 为支持Trio工作流而创建的开发者工具

This series is split into three parts. Part 1 (this blog post) covers Trio’s high-level architecture. Stay tuned for Part 2, which will detail Trio’s navigation system, and Part 3, which will examine how Trio uses Props for communication between screens.

本系列文章分为三个部分。第1部分(本博客文章)介绍了Trio的高级架构。敬请期待第2部分,将详细介绍Trio的导航系统,以及第3部分,将介绍Trio如何在屏幕之间使用Props进行通信。

Background on Mavericks

Mavericks 背景

To understand Trio’s architecture, it’s important to know the ...

开通本站会员,查看完整译文。

Главная - Вики-сайт
Copyright © 2011-2024 iteam. Current version is 2.139.0. UTC+08:00, 2024-12-27 03:34
浙ICP备14020137号-1 $Гость$