This is delivery application for iOS which I created with 4 team members for school project. This is just mock app but I describe what kind of app it is and what technologies I used. I was tech lead in the team so I decided architecture and supported others.
※ In order to keep secure, I didn't upload GoogleService-Info.plist
. It means even you run this app, you cannot connect to backend.
We used Clean Architecture + MVVM. The reason why I decided using this architecture is that this is the one of most popular and common architecture recently so I thought it's worth to learn. Since each class has own responsibility, if you use this architecutre, the app will be testable, sustainable and flexible for changes.
However as it turned out, it was too much for this application and complicated for beginners.
I think perhaps we should've removed Domain layer
.
Although, other members said it was good to learn. I hope learning this architecture will help others in the future 😎👍
https://github.com/Swinject/Swinject
To use the architecture cleanly, dependency injection is useful. It worked really well and helped us to focus coding!
https://github.com/ReactiveX/RxSwift
We used RxSwift for binding View and ViewModel and also to receive result in ViewModel. Most of project members are beginner so I hesitated using Rx and write codes using callback and compared both. As a result, using Rx one looks clean and decided using RxSwift. Even though we use RxSwift just in simple way, others were struggling using Rx. But eventually they understood how to use it.(Of couse not all!! Rx has so many features 😅)
We used Firebase as backend. There are 2 options for database, Realtime Database and Cloud Firestore. We decided to use Cloud Firestore even it's still beta because it enables you to make more flexible query and it seems Cloud Firestore will be standard databse of Firebase.
First we defined entity relational diagram or ERD, but we figured out it didn't work for Firebase because Firebase is NoSQL model!! 😨 So we migrated it to SpreadSheet to fit NoSQL model like the above image.
You can insert data to Firestore using Firesbase console but if you do this way, you need to input all data one by one. It's so pain and it's not what developer should do. Therefore we input master data to SpreadSheet like following.
Then I wrote google app script using librariy which enables you to insert data to Firestore.
I also created Firestore
menu to the spread sheet in order to save data from spread sheet to Firestore easily.
The benefits of this are following.
- You don't need to input key and value one by one
- You never typo the name of key
- Even if someone deleted all data by mistake, it's easy to restore
- Bruno - Project Manager
- Kento(me!) - Tech lead
- Jaewon - Backend
- Maimai - Designer
- Diego - Member
- How to use git flow
- How to make pull request on Gitlab
- How the architecture works
- What dependency injection is
- How to use Swinject
- How to use RxSwift