Technical Test for Nimble
Coding test app. Using Nimble Survey api and OAuth 2.
Technical Test for Nimble
The executeOrThrow()
extension is created with the generic type <T>
, your implementation validates LoginResponse
even though this extension is being used for different API endpoint, it means that different response classes, I think we could update to generic type for common usage instead.
NimbleTest/app/src/main/java/com/kks/nimbletest/util/OkHttpExt.kt
Lines 21 to 27 in dc472de
NimbleTest/app/src/main/java/com/kks/nimbletest/util/OkHttpExt.kt
Lines 50 to 58 in dc472de
I see there are some classes located on the project but no reference. It would be better if we get rid of them, how do you think?
Following the Android app architecture fundamental, the Repository layer is responsible for handling fetching, storing,... the data for the app. Therefore, the logic to validate username and password, or loading state should be handled in the ViewModel layer instead. How do you think? π
It's a good point to see you are applying the Hilt for DI pattern on projects to manage dependencies. Besides that, I am wondering why do you need the TokenAuthenticatorEntryPoint
inside the CustomAccessTokenInterceptor
π€ It looks like a workaround solution to provide the preferenceManager
and tokenRepo
. Can we get rid of this and perform the injection when the class's instance is initialized instead?
I am curious there is a missing is
on the ResourceState.NetworkError
branch π So would it be possible to add is
for consistency to validate the particular type , or do you have any supposed idea to do that?
NimbleTest/app/src/main/java/com/kks/nimbletest/ui/home/HomeActivity.kt
Lines 223 to 225 in dc472de
Wrapping const
with Object
is old-fashioned with Java-style, Kotlin allows us to define the constants on the top-class level, it's a better approach to drop unnecessary class
or object
.
Furthermore, the properties in the Request/Response data classes violate the most common Kotlin convention. I understand that it matches the JSON key for serializing/deserializing the objects automatically but we could use annotation to serialize rather than leaving the properties name like this.
Hello Kaung Khant Soe,
Nice to e-meet you π and thanks for your effort on this submission. My name is Huey - an Android Developer at Nimble and I would like to conduct the feedback via Issue tickets regarding your performance here.
Keep in mind, this is a bidirectional process, so we would love to hear back from you as well, so please donβt hesitate to raise your question/correction in case we missed anything.
If weβre aligned on any issue here and youβd like to correct them, please go ahead and open a Pull Request per fix, merge it when you feel confident and we will follow up on those fixes π
I hope you find the process enjoyable. Good luck and happy coding π€
In my opinion, the PresentationModule
is unnecessary because the RequestOptions
and RequestManager
are useless without ImageView to load the image from URL or resource, I would suggest creating an extension to load the image with the Glide configuration for common usage? Don't hesitate to lemme know about your idea π
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.