Table of Contents
ArithCalc is a compact calculator, where everyday or advanced difficulty mathematical tasks can be solved
Clean ArchitectureThis app uses MVVM pattern for UI follows clean architecture concept brought up by Robert C. Martin, but how exactly is it realised in ArithCalc?
Calculator is divided into three layers:
-
app - A layer that interacts with the UI, mainly Android Stuff. It would include both domain and data layers.
- Activities
- Fragments
- ViewModels
- Dependency Injection
-
domain - Contains the business logic of the application. It is the individual and innermost module. It’s a complete java module.
- Repository interface - A place where functionality blueprint is kept, which will be implemented in data module*
- UseCases - Each individual functionality, like inserting or reading data from Database, they act as a mediator between our Repository and app module
- Models - Entities or a Value Object
-
data - It includes the domain layer. It would implement the interface exposed by domain layer and dispenses data to app
- Repository implementation - Data module keeps repository implementation and waits to be injected into use-cases
- Database - Repository implementations contain database functionality
Data Flow
- If a user event is triggered in UI then we communicate it with ViewModel.
- ViewModel connects with the use case to get the result for the action.
- The use case then interacts with the repository class to get the solution from database or preference
MVVM
- MVVM is a software architectural pattern that facilitates the separation of the development of the graphical user interface (the view) from the development of the business logic or back-end logic (the model) so that the view is not dependent on any specific model platform.
Components
- Database - Room
- Dependency Injection - Dagger Hilt
- Asynchronous approach - Coroutines
Credits
- Clean Architecture - Medium article
- MVVM - Wikipedia article
See the open issues for a list of proposed features (and known issues).
- Top Feature Requests (Add your votes using the 👍 reaction)
- Top Bugs (Add your votes using the 👍 reaction)
- Newest Bugs
Reach out to the maintainer at one of the following places:
- GitHub issues
- Contact options listed on this GitHub profile
If you want to say thank you or/and support active development of ArithCalc:
- Add a GitHub Star to the project.
- Write interesting articles about the project on Dev.to, Medium or your personal blog.
Together, we can make ArithCalc better!
First off, thanks for taking the time to contribute! Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are greatly appreciated.
Please read our contribution guidelines, and thank you for being involved!
The original setup of this repository is by Avtandil Kupreishvili.
For a full list of all authors and contributors, see the contributors page.
This project is licensed under the Apache Software License 2.0.
See LICENSE for more information.
This game would not be able to exist without this dependencies:
- Google - Dagger Hilt - Dependency injector for Android and Java
- Android - Room - A robust SQLite database
- Objecthunter - exp4j - Math parser libray
ArithCalc used these sources for design:
- Google Material icons - Icons