So nice to getting to know actually good practices for this. We have very bad structured code at work and I need to improve. Great series!
@TheAndroidFactory6 ай бұрын
I'm happy I could help! The functional programming concepts/syntax is VERY clean 💯
@vedx8 ай бұрын
Great explanation as always 🔥
@TheAndroidFactory8 ай бұрын
Appreciate it ♥️
@neyasbit8 ай бұрын
Nice 💣
@TheAndroidFactory8 ай бұрын
Hope it makes sense!
@marvelrivera11943 ай бұрын
Thank you
@TheAndroidFactory3 ай бұрын
Glad it helps!
@gregoryprosper4 ай бұрын
Display name should be kept out of the domain layer. This data should be in the presentation layer using string resources so you can support localization in the future.
@TheAndroidFactory4 ай бұрын
Sorry, wasn't the data coming from an API? If so, I'd imagine a language code param sent to handle localization there. Appreciate the callout!
@gregoryprosper4 ай бұрын
@@TheAndroidFactory The display name wasn't sent from the api. API sent constant values but you mapped it to a display name in the Sealed Classes. A better approach would be to extension function in the domain layer that uses android resource files that can be converted to strings in compose.
@TheAndroidFactory4 ай бұрын
The name of the character? The name is a 1:1 mapping from API to domain. How would I convert API data to localized strings when we don't know what is coming from the server? If you want to open a pull request I'm happy to review it!
@gregoryprosper4 ай бұрын
@@TheAndroidFactory Created the pull request
@TheAndroidFactory4 ай бұрын
@gregoryprosper yup I see it. Yes, sorry when you said display name I was imagining the name of the character, not the information tied to the gender or "status" of the character. While you are correct for supporting multiple languages, this does add a reasonable bit of overhead to the content that was not the focus of the video. However, this may warrant an additional video about "steps to localize your codebase" so I appreciate the callout. The same could be applied to the hardcoded string for the DataPoint objects that callout "Last known location" or "Species", and better light/dark mode support on colors in the CharacterStatus data class.