akazadd / NimbleTechTest

This repository contains the iOS technical test project for Nimble - a demonstration of skills in iOS development for the technical evaluation process.
0 stars 0 forks source link

[Question] Architecture choices concerns #29

Open minhnimble opened 11 months ago

minhnimble commented 11 months ago

It is noticeable that you apply the MVVM architecture in your code. At the same time, I do have a few small concerns on the following parts that I would like to hear more from you:

akazadd commented 11 months ago

Choosing between manually parsing JSON and using a third-party library depends on various factors. Here are some considerations:

Advantages of Manual Parsing: Customization: Manual parsing gives you fine-grained control over the parsing process. I can customize it based on specific needs, handling edge cases or special formatting. Control Over Performance: In some scenarios, manual parsing can be more performant, especially if I'm dealing with large or complex JSON structures. I can optimize parsing based on my application's specific requirements. Dependency Management: Manually parsing JSON reduces the number of dependencies in my project. If I'm aiming to keep my project lightweight and minimize external dependencies, manual parsing may be a suitable choice.

Advantages of Using a JSON Parsing Library: Convenience and Productivity Error Handling Maintainability Community Support

For most projects, especially those with straightforward JSON structures, using Codable or a similar library is recommended. It strikes a good balance between simplicity and power. If your project has specific requirements that cannot be easily addressed by Codable or if you have performance considerations, manual parsing might be a suitable choice.

Ultimately, the decision should be based on the specific needs and goals of your project.

akazadd commented 11 months ago

Pull Request for this task -> https://github.com/akazadd/NimbleTechTest/pull/32

minhnimble commented 11 months ago

FYI, just In case you don't know what JSON API format is and why we recommend using it, please feel free to take a look at this for more information.