This PR contains the work done to write some explanations to the work done for this application. Reviewed-on: #20 Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
Reviews app
Assignment instructions
- Make a small app that has our review feed.
- Add the possibility to filter by number of stars.
- Show the top three occurring words in the filtered reviews (omit the ones less than 4 characters long).
- Make use of native APIs and do not use 3rd party libraries.
- Add more screens or UI-controls if needed.
Feed: https://itunes.apple.com/nl/rss/customerreviews/id=474495017/sortby=mostrecent/json
We provide you a dummy app which already has a feed and details screens with some randomly generated data. Consider it as your starting point. Feel free to keep the layout untouched, we don't want you to waste your time on arranging the labels and fine-tuning the constraints. We are mostly curious about the business logic under the hood.
Feel free to change all the provided code if you want to. It’s there only to save you some time.
We expect to see a simple app but the one which is ready to be scaled up. Let's keep in mind more screens, user flows and services (e.g. Google Store reviews for example) which supposed to be added to the app in future.
If you have any questions or doubts make your own assumptions. But please convey the reasoning to us (code comments, documentation, some other way).
Explanations
Based on the given requirements and provided source code, I built my implementation on top of what was given with an iterative/incremental, bottom-to-top approach. In a nutshell, I started by implementing the each and every library first, then I built the framework that contains the "feed" feature, to finally present the mentioned feature in the app.
From a technical point of view, I decided to use the provided UIKit
app provided to built this exercise, as a way to simulate an established, battle-tested app built before the "SwiftUI era" like, for example, the ING banking app. In addition, the platform of choice to make the deliverable for the exercise is, for obvious reasons, iPhone
; and the minimum target platform was changed to iOS 14.0
to simulate the current minimum iOS requirements from the existing ING banking app. This change not only allowed me to make use of the existing UI implemented in the given view controllers, but also build new UI components and/or views with SwiftUI
and, integrate them into the provided view controllers.
The chosen architecture for this solution is MVVM-C
, with some Combine
reactiveness in the view models. As easily seen in the folder structure, and to answer to the scalability requirements mentioned above, the source code is clearly divided into 3 main sections:
- Libraries: every single-purposed, clearly defined library built to implement the solution, implemented and (unit and/or preview) tested as independent
SwiftPM
packages. - Frameworks: every clearly defined and cohesive group of views and view models that conforms particular features, implemented and (unit and/or preview) tested as
Framework
targets in the project. - App: ideally, the place where the features frameworks are glued together cohesively with some help from the libraries, resulting in the app deliverable.