This Project, developed using MVVM architecture, connects to a RESTful API with Retrofit, is an Android application that allows users to manage their shoe data. Users can perform basic CRUD Operations.
- OkHttp and Retrofit: Used to send HTTP requests and connect to the API.
- Gson: Used for processing JSON data.
- Kotlin Coroutines: Used for asynchronous programming.
- AndroidX Components: RecyclerView, AppCompat, Material Design components and other AndroidX libraries were used.
Basic CRUD Operations:
- Add Shoes: Users can add new shoe information.
- Update Shoes: Users can update existing shoe information.
- Delete Shoes: Users can delete existing shoes.
- View Shoes: Users can view existing shoes.
This project was developed using the MVVM (Model-View-ViewModel) architecture. The role of each component is as follows:
- Model: Shoe data model classes were used to represent the data returned from API calls.
- View: User interface components
- ViewModel: Middleware classes that manage the connection to the UI and execute the business logic.
- Clone this repository:
git clone https://github.com/mertncu/RetrofitDataFetch
- A database with JSON Output like this (I didn't use a local database, I prefer remote in this project)
"Shoes": { "ShoeBrand": "", "ShoeColour": "", "ShoeId": "", "ShoeModel": "", "ShoePrice": "", "ShoeSize": "" }
- Open the project folder in Android Studio.
- Run the application using an Android device or emulator.
- ViewModel https://developer.android.com/topic/libraries/architecture/viewmodel
- LiveData https://developer.android.com/topic/libraries/architecture/livedata
- Android Architecture Blueprints https://github.com/googlesamples/android-architecture
- Android Jetpack: ViewModel https://www.youtube.com/watch?v=5qlIPTDE274
If you would like to contribute to this project, please submit a pull request. We welcome your contribution!