Skip to content

dimohamdy/LocationsList

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LocationsList

App Structure

  • App structure I use MVP with Input-Output approach Delegate to notify about updates.

  • Use Async/await Swift.

  • I use the Repository design pattern to act as a Data source from API and UserDefault for saving location.

  • Separate the data source of UITableView to other class LocationsTableViewDataSource.

  • I use CellReusable protocol and create 2 extensions for UITableView to reduce code when reusing the cell.

  • Use DataLoader.swift to get data from local JSON.

  • I used SwiftLint to enhance Swift style.

  • I used create UI with code.

  • I used SPM.

Enhancement

1 - Add more unit-tests. 2 - Add UITest. 3 - Use UITableViewDiffableDataSource.

UnitTest

  • I apply Arrange, Act and Assert (AAA) Pattern in Unit Testing.
  • I use mocking to Test get data from NetworkManager, I use the same JSON file to mock data.
  • Test get data from API and From Local JSON.

Demo

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages