NYC Schools Challenge
How to run:
- Download the zip file and unzip it.
- Open
NYCSchool.xcodeproj
in xcode - Run project (cmd + R or Product > Run)
Note: I developed the project on Xcode14 using Swift & UIKit. I tested it on both iOS15 and 16. Please let me know if you face any issues in building it.
Focus Area:
- I have focused on Scalable, extensible architecture which handles error and exceptions gracefully.
- I have created a minimum UI which shows all the relevant information in a list view (School name, Phone and location/neighbourhood).
- When tap on any "School" card, it will open a detail pafe which shows "SAT score" information.
Technical/Functional consideration and tradeoffs:
- I’m using MVVM (Model-view-viewmodel) architecture for this project. As this is a sample project, I wanted to create a simple but extensible and testable architecture. MVVM has its pro and cons but for this project, it has everything needed with capabilities for a future enhancement.
- I handle different kinds of errors (decoding, bad requests, network unavailability etc).
- I’m showing an empty screen with a message in case of an error. I wanted to build a minimal viable product which handles all the exceptions and gives meaningful information to a user when an error occurs. That's why I decided to show error messages.
- I have built UI in SwiftUI.
- When there is an empty response, I’m showing a message on the screen. This message is same as error message.
- I have written a unit test
NetworkManagerTests
to validate the ‘validand ‘malformed
json. - Tested it on small & large screen size with landscape and portrait orientation.
Future Enhancement: If I would have more time, I would:
- Add a coordinator which would follow the coordinator pattern. It would be responsible for navigation between screens.
- This Json response is very large, I would add
pagination
andpullToRefresh
for better user experience. - Snapshot test for regression
- Instead of adding “hardcoded string” for labels, I could create a localized object which would have all strings saved.
- UI enhancement for School list.
- Will add caching layer to cache information for faster load.
-
Search feature
for School list as it would be super helpful to user
None
Around 3-4 hours throughout week in chunks