Goal of this project was to consume the data returned by Seat Geek API search API, display it in the appropriate scroll view subclass and allow users to view more details on it
The completed project contains the following functionalities
- Ability to search by specific event name
- Displaying the available events matching the search string in the table view
- Support for showing more event details on the next page
I used Xcode 11.1 (11A1027) to write and run the application
App uses a single third-party dependency through Cocoapods. However, the dependency is included as a part of project bundle and there is no need to run pod install
again. Project should be good to build and run once it's extracted from the attached zip file
The app allows users to favorite certain events. However, this is a limited feature.
- Users can only favorite items in the given list of fixed search term
- If the user enters another search keyword or clears the list, favorited are lost
- If an item is favorited on the list page, the favorite status is carried on to the details page
- This is an in-memory operation. If the app restarts, favorited will be lost
I used MVVM (Model-View-ViewModel) software architecture to design this project.
- View - Used to display user-visible elements. Mostly dumb part of the architecture. All the information is pulled from the view model
- Model - The object models received from the network (Conforming to Decodable protocol). This is a raw data and view model is responsible for converting it into user displayable format
- ViewModel - The real brain of application. It applies the business logic and data transformations needed to convert raw models into view models which make more sense when displayed on the screen
I am using only one third-party library called PINRemoteImage
. This is a framework for downloading images from the server and assign them to image views. It's a lightweight, easy to use and well-maintained
I am using a few icons from third-party sources too. They include icons for displaying favorite/unfavorite items as well as generic placeholder images
The app is designed with unit testing in mind. I tried to make sure ViewModel - Which houses the brain of the application and applying viewModel to view operation are well tested.
For the part which is not tested could either be UI tested or mocked (For example, network utility which in unit tests is mocked)
Some part has been left unimplemented in the interest of time. However, they can definitely be implemented in the future as an extension to current work
- Better architecture for favoriting events
- Persisting favorited between successive launches
- Scroll view support on details page in case we want to display additional information other than just location and date and time of the event
The app is designed to handle and display appropriate error messages to the user if something goes wrong. The error logic handles following cases,
- Invalid URL
- Malformed content
If any of the above-mentioned errors occur, an appropriate error message is displayed to the user.
For starter, the app only supports iPhone - both portrait and landscape orientations. In the future, given the designs, we can also extend the current implementation to support iPad devices