Skip to content
프로젝트

소개

Kotlin, 코루틴, Retrofit 기반의 쉽고 간단한 경량 네트워크 요청 래퍼.

시스템 및 인프라

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
-1
in 7 days
-1
in 15 days
-1
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

简体中文

Three ways to encapsulate Retrofit + Kotlin Coroutines for elegant and fast network requests

Introduction

This project involves three ways to encapsulate Retrofit + Kotlin Coroutines, each encapsulation idea is different.

Even if you are not familiar with the concatenation and Kotlin flow, you can get started quickly.

The purpose of the wrappers is to reduce boilerplate code and facilitate rapid development.

Branching Explained

  • Encapsulation 1 (corresponding to branch oneWay) passes ui references, allowing deep ui customization according to the project, which is fast and convenient, but highly coupled (Google's recent architecture documentation no longer recommends using LiveData in the repository). Google's recent architecture documentation no longer recommends the use of LiveData in the Repository, this approach mainly provides a kind of encapsulation of ideas)

  • Encapsulation two (corresponding to branch master) is low coupling, few dependencies, but more template code.

  • Encapsulation 3 (corresponding to branch dev) aims to reduce boilerplate code, introduces the new flow stream programming, chaining calls, loading and network requests and result processing are all together, and in many cases don't even declare the LiveData/Flow objects.

According to the latest architecture of Google's official documentation, advancing the use of dev branches.

Blog address

Acknowledgments

Some of the ideas of the project come from other open source projects, thanks to other authors for their selfless contributions.

The project debugging Api comes from wanandroid of Hongyang God, thanks for providing free and stable api.

I hope we can have a harmonious and friendly communication to build an open source community.

Translated with DeepL

Star History

관련 프로젝트 살펴보기

불러오는 중…