Welcome to MVVM-MovieDB with Clean Architecture + (Router & Adapter Pattern). To obtain the movie data, just access into MovieSDK.
MVVM is a structural design pattern that separates objects into three groups:
Model
represent as data Layer of applicationView
represent as visual and controls on the screen.View Models
represent as operations of information into a values which it will be displayed inView
.
In short, Clean architecture
helps us for an effective testing strategy because it isolated in individual modules. Besides that, easily in multiple works of stories and has a good structure to tell readers about the system (it's called Scream).
Router is used to managed the coupled and dependent of each other controllers when using a navigation.
Adapter is a structural design pattern that allows object to connect and work together. In short, it transforms the interface of an object to adapt.
To organize groups, files and code into more specifically. I use this structure as below:
- Application - contain based of application launched.
- DI - contains
Dependency Injection
as central units. - Data - contains
Repository
as coordinate data layer. - Domain - contains of
Entities
,Use Cases
, andInterfaces
. - Presentation - contains of
View
andViewModel
. - Wireframe - contains of application routing management.
Using Xcode 10.3
and written in Swift 5