This project is a simple progammatically made UIKit application that shows all Formula 1 championship races and both drivers and constructors standings.
All data are retrieved form ergast.com. Here are few endpoints I used:
The entire project is based on the Model-View-Controller (MVC) architecture.
StandingsStore
andRacesStore
are responsible to store the standings and races and provide few methods to format data forViewControllers
and to fetch data from the network.ViewControllerFactory
andUIViewControllerFactory
are responsible to create theUIViewControllers
and inject their required dependecies.UITabBarController
is responsible to handle the navigation between appplications tabs.StandingsViewController
is responsible to handle theUICollectionView
and populate it with theStandingsStore
data.RacesViewController
is responsible to handle theUITableView
and populate it with theRacessStore
data.
Both
StandingsViewController
andRacesViewController
useDiffableDataSorce
andNSDiffableDataSourceSnapshot
to populate data inside views
The F1StatsKit
include the entire application business logic in order to separate it from the ui framework. So in the future if we want to reimplement it with a different ui framework we can do it without recreating everything from scratch.
- How to display data in a
UITableView
usingUITableViewDiffableDataSource
- How to handle programmatically both
UITabBarView
andUINavigationView
- How to display different data types in a
UICollectionView
withUICollectionViewCompositionalLayout