Calculate the famous rule of three in your wrist!
This tiny WearOS app allows you to use the rule of three to calculate the fourth number by inputting the prior three numbers.
I created tests that cover 100% of the model
and viewmodel
packages. You can click on the image below to see the full test report generated by Gradle:
Technology | Purpose |
---|---|
Jetpack Compose |
Design UI |
Room |
Persist application data |
IconCreator |
Generate application Icon (my own library) |
- There weren't any particular challenges in creating this app. Although it's a very simple app, it was interesting to create a WearOS app.
Please check this repository to learn more about the notation I used to create the diagrams in this project.]
This diagram shows all the packages the application has, along with their structures. Some packages are simplified, while others are more detailed.
These diagrams illustrate the relationship between screens from view
and viewmodel
classes. The arrows from the View Models represent View Data objects (classes that hold all the necessary data for the view to display), primitives, or collections encapsulated by State Flows, which are classes that encapsulate data streams. Every update in the View Data triggers the State Flow to emit these new values to the view
, and the view updates automatically. Typically, the methods called from screens in view
to classes in viewmodel
trigger these changes, as represented in the diagram below by arrows from the view
screens to viewmodel
classes.
View Datas are classes that hold all the data the view
needs to present. They are created from model
classes and served by View Models to the view
. This diagram represents all the associations among the classes in the view.viewdata
.
View Models serve the view
with objects made from viewmodel.viewdata
classes, collections, or primitive objects encapsulated by State Flows. This diagram represents all the associations among the classes in viewmodel
and viewmodel.viewdata
.
View Models also serve as a façade, triggering methods in model.repository
classes. This diagram shows that each View Model has its own Repository Class and illustrates all methods each View Model calls, represented by arrows from View Models to Repositories.
Model classes handle the logic of the application. This diagram represents all the associations among the classes in the model
.
These diagrams represent all the associations among the classes in model.repository
and model
.
Repository classes use the Data Source classes to perform the Creation, Retrieval, Update, and Deletion of the model objects. The Data Source classes use the database to persist these alterations. This diagram represents all the associations among the classes in model.repository
, model.datasource
, model.datasource.local
, and library.room
. The classes in the model.datasource.local
uses the memory to persist data for preview and test purposes, while the classes in library.room
are located the database.
- Improve the performance, especially loading the database at the beginning.
- Publish it on the Play Store.
- Create Android, watchOS, and iOS versions.
- Perform View Tests.
- Some View Model tests sometimes do not pass, apparently due to the test framework not handling async calls properly. However, it needs further investigation.