Skip to content

Commit dfa16d4

Browse files
Fernando Prieto MoyanoFernando Prieto Moyano
Fernando Prieto Moyano
authored and
Fernando Prieto Moyano
committed
Added new banner, gif and Readme update
1 parent 55ec197 commit dfa16d4

5 files changed

+68
-49
lines changed

README.md

+68-49
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,25 @@
1-
[![Android Studio Arctic Fox](https://img.shields.io/badge/AS%20Arctic%20Fox-2020.3.1-9cf)]
2-
[![Jetpack Compose](https://img.shields.io/badge/Jetpack%20Compose-1.0.0--beta03-blueviolet)]
3-
[![Platform](https://img.shields.io/badge/platform-android-brightgreen)](https://developer.android.com/reference)
4-
[![Build Status](https://app.bitrise.io/app/64cd2ed600a14151/status.svg?token=9eYCKzT6HcFJeAGeZmEH6g&branch=master)](https://app.bitrise.io/app/64cd2ed600a14151)
1+
<h1 align="center">SpaceX prepare for Clean Architecture liftoff:rocket:</h1>
52

6-
# SpaceX prepare for Clean Architecture liftoff:rocket:
7-
![banner](art/CoroutinesFlows-Modularised.jpg)
8-
9-
10-
## Table of Contents
11-
- [Demo](#demo)
12-
- [Introduction](#introduction)
13-
- [Modules](#modules)
14-
- [Testing](#testing)
15-
- [Libraries Used](#libraries_used)
16-
- [License](#license)
17-
18-
## Demo
193
<p align="center">
20-
<img src="art/SpaceX-Dark.gif" width="49%">
21-
<img src="art/SpaceX-Light.gif" width="49%">
4+
<a href="https://opensource.org/licenses/Apache-2.0"><img alt="License" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"/></a>
5+
<a href="https://android-developers.googleblog.com/2021/07/android-studio-arctic-fox-202031-stable.html"><img alt="Android Studio Arctic Fox" src="https://img.shields.io/badge/AS%20Arctic%20Fox-2020.3.1-9cf.svg"/></a>
6+
<a href="https://developer.android.com/reference"><img alt="Platform" src="https://img.shields.io/badge/platform-android-brightgreen.svg"/></a>
7+
<a href="https://app.bitrise.io/app/64cd2ed600a14151"><img alt="Build Status" src="https://app.bitrise.io/app/64cd2ed600a14151/status.svg?token=9eYCKzT6HcFJeAGeZmEH6g&branch=master"/></a>
228
</p>
239

24-
## Introduction
25-
The purpose of this project is to consolidate some of the learned insights throughout the years about the `Clean Architecture` principles and reflect those lesson on Android, taking advantage of the Kotlin programming language features too.
26-
This project summarises some of the general use cases and needs that could be demanded on a production project using:`Jetpack Compose`, `Functional Programming`,`MVVM` setup, `Coroutines`, `Kotlin Flows` and `LiveData` (I've kept a branch using `RxJava` too).
27-
28-
![structure](art/clean_architecture_dark.jpg)
29-
30-
## Modules
31-
* **app** - The application module with access to **all the application**
32-
* **data** - Android module that **can only access domain module**
33-
* **data-api** - Android module that **can only access data module**
34-
* **domain** - Kotlin module that **cannot access any other module**
35-
36-
And two extra modules:
37-
* **core** - Base classes module (factories, events, etc.) that **cannot access any other module**
38-
* **core-android-test** - Tests classes module (rules, date builders,etc.) that **cannot access any other module**
39-
40-
## Testing
41-
42-
### Unit Testing
10+
<p align="center">
11+
SpaceX prepare for Clean Architecture liftoff:rocket: is a small demo application based on modern Android application tech-stacks and MVVM architecture.<br>The purpose of this project is to consolidate some of the learned insights throughout the years about the `Clean Architecture` principles and reflect those lesson on Android, taking advantage of the Kotlin programming language features too.
12+
<br>This project summarises some of the general use cases and needs that could be demanded on a production project using:`Jetpack Compose`, `Functional Programming`,`MVVM` setup, `Coroutines`, `Kotlin Flows` and `LiveData` (I've kept a branch using `RxJava` too).
4313

44-
There are some highlights:
45-
* Every layer in the architecture has been tested with its mapper|transformer|provider.
46-
* Mockito has been used for mocking|stubbing.
47-
* `Given|When|Then` steps have been followed, in order to give a more structured overview.
48-
* No comments in the tests because the tests functions are already concise and clear.
14+
</p>
15+
</br>
4916

50-
### UI Testing (Compose)
17+
<p align="center">
18+
<img src="/art/SpaceX-Latest-Banner"/>
19+
</p>
5120

52-
I opted to use two types of approaches:
53-
- One using MockWebserver, where I recreate a real scenario where the app connects to an endpoint and I test the cases.
54-
- Another one, that I consider `Isolated Compose Tests`, where it's possible to mock and set any content, UI state, etc. Which is to emulate very specific cases.
55-
56-
This section is still evolving.
5721

22+
<img src="/art/SpaceX-Demo.gif" align="right" width="32%"/>
5823

5924
## Libraries Used
6025
* [Compose][0] for building native UI (declarative way using Kotlin).
@@ -85,6 +50,60 @@ This section is still evolving.
8550
[11]: https://airbnb.io/lottie/#/android-compose
8651
[12]: https://github.com/JodaOrg/joda-time
8752

53+
## Modules
54+
* **app** - The application module with access to **all the application**
55+
* **data** - Android module that **can only access domain module**
56+
* **data-api** - Android module that **can only access data module**
57+
* **domain** - Kotlin module that **cannot access any other module**
58+
59+
And two extra modules:
60+
* **core** - Base classes module (factories, events, etc.) that **cannot access any other module**
61+
* **core-android-test** - Tests classes module (rules, date builders,etc.) that **cannot access any other module**
62+
63+
## Branches
64+
There are three options depending on different tech-stack desired. The latest codebase will be updated in master.
65+
These are the three options available (all of them maintained):
66+
67+
- master
68+
- Jetpack Compose (declarative UI)
69+
- Dagger Hilt
70+
- VM approach using UI States and Effects
71+
- Kotlin Flows (removed LiveData)
72+
- Modules simplification
73+
- The rest of modules remain the same (Tests)
74+
75+
- SpaceX-Coroutines-Flows
76+
- Imperative UI
77+
- Dagger2
78+
- Kotlin Coroutines and Flows
79+
- Granular modularisation (CleanArchitecture approach)
80+
- Unit Tests + UI Tests + MockWebServer + Robot Pattern
81+
82+
- SpaceX-RxJava
83+
- VMs and Fragments communication via RxJava
84+
- Dagger2
85+
- Granular modularisation (CleanArchitecture approach)
86+
- Unit Tests + UI Tests + MockWebServer + Robot Pattern
87+
88+
## Testing
89+
90+
### Unit Testing
91+
92+
There are some highlights:
93+
* Every layer in the architecture has been tested with its mapper|transformer|provider.
94+
* Mockito has been used for mocking|stubbing.
95+
* `Given|When|Then` steps have been followed, in order to give a more structured overview.
96+
* No comments in the tests because the tests functions are already concise and clear.
97+
98+
### UI Testing (Compose)
99+
100+
I opted to use two types of approaches:
101+
- One using MockWebserver, where I recreate a real scenario where the app connects to an endpoint and I test the cases.
102+
- Another one, that I consider `Isolated Compose Tests`, where it's possible to mock and set any content, UI state, etc. Which is to emulate very specific cases.
103+
104+
This section is still evolving.
105+
106+
88107
## License
89108
Copyright 2021 Fernando Prieto Moyano
90109

art/CoroutinesFlows-Modularised.jpg

-77.5 KB
Binary file not shown.

art/SpaceX-Dark.gif

-20.6 MB
Binary file not shown.
22.2 MB
Loading

art/SpaceX-Latest-Banner.jpg

514 KB
Loading

0 commit comments

Comments
 (0)