Nov 29 | 7:20 PM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Nov 29 | 7:45 PM |
Pao | has entered the room |
Mark M. |
hello, Pao!
|
Mark M. |
how can I help you today?
|
Pao |
Hi Mark, I have 2 questions. The first one is the difference about `test` and `androidTest` in an android project. I know these can be used for unit testing but do I need to have duplicated tests for a certain class that should exists in both directories?
|
Mark M. |
most of the time, you test one app class either using instrumented tests (androidTest/) or unit tests (test/)
|
Mark M. |
sometimes, though, while you would prefer to test the app class with unit tests (as they run faster), some features of the app class are too tightly tied to Android
|
Mark M. |
in that case, you might wind up testing different parts of the app class in androidTest/ and test/
|
Mark M. |
however, you should not need *duplicated* tests
|
Pao |
Ohhhh. I see, so basically the test requires android stuff it goes to `androidTest/` and I don't need to do it in `test/`. I get it now. Thanks!
|
Nov 29 | 7:50 PM |
Pao |
Is it storing the API keys in Android Native Module good enough layer for an additional protection of API keys?
|
Pao |
Btw, that's my second question :)
|
Mark M. |
storing API keys in NDK code (C/C++) does virtually nothing to help secure them
|
Mark M. |
anybody talented enough to want to get your API keys will be talented enough to get to them regardless of where in the APK that they reside
|
Pao |
Okay, so additional effort will be useless. Since, there's no bullet proof solution to it.
|
Mark M. |
the NDK trick isn't even a decent "speed bump" to slow people down
|
Mark M. |
let alone a bulletproof solution
|
Pao |
I thought storing the API keys in NDK will have another layer of protection
|
Mark M. |
it does, but that layer is not very good and IMHO is not worth the headache
|
Mark M. |
in general, there is no bulletproof solution, unless the provider of the API offers one
|
Nov 29 | 7:55 PM |
Pao |
I see. Thanks Mark! That's all for me today :)
|
Pao |
Have a great day or night! Thank you for the answers
|
Mark M. |
OK, sounds good!
|
Mark M. |
you're welcome!
|
Pao | has left the room |
Nov 29 | 8:10 PM |
Joel | has entered the room |
Mark M. |
hello, Joel!
|
Mark M. |
how can I help you today?
|
Nov 29 | 8:15 PM |
Joel |
hi, Im actually the person who posted about how to build mobile app in object oriented way in commonsware community
|
Mark M. |
OK -- hi!
|
Joel |
what im having problem about is the fact that i dont know where to start in terms of starting to visualize the components in mobile app
|
Mark M. |
for your very first Android app, I would start by thinking about what screens you want, and then work your way inwards from there
|
Mark M. |
right now, I recommend that your top priority be to learn how Android works
|
Joel |
for example if within a normal software application, i will just need to draw class diagram and identify what are the necessary classes and objects to determine how program works
|
Nov 29 | 8:20 PM |
Joel |
but as for mobile app im quite clueless on it
|
Mark M. |
I have not seen anyone create a class diagram in 20 years or so
|
Mark M. |
I guess some people still do that
|
Joel |
could you just maybe describe a general way as to how people normally work their way up in mobile app development
|
Joel |
cause im trying to get a job by my own through self learning so i will need to develop a prototype in proving my ability
|
Mark M. |
well, you have access to some books, through the Warescription -- you could read *Elements of Android Jetpack* (a traditional programming guide) or *Exploring Android* (a set of tutorials to help you build an app)
|
Mark M. |
in terms of "proving my ability", worry about that later
|
Mark M. |
right now, focus on learning how Android works, by creating "throwaway" apps, ones that require no real design work
|
Mark M. |
as you gain some experience with the Android framework and the requirements it imposes, things like that YouTube video on Android architecture will start to make a bit more sense
|
Joel |
does the book you mentioned using Java language
|
Mark M. |
and then you can start to work out how you preferred software design approaches fit modern Android architectures
|
Mark M. |
*Elements of Android Jetpack* shows both Java and Kotlin for the vast majority of the book, with a couple of chapters purely showing Kotlin
|
Mark M. |
*Exploring Android* uses Kotlin
|
Nov 29 | 8:25 PM |
Joel |
what does the android jetpack includes
|
Mark M. |
Jetpack is a "brand" that Google is applying to a lot of existing technology and some new stuff: https://developer.android.com/jetpack
|
Mark M. |
of those, the things that nearly all developers use include: AppCompat, Test, Lifecycles, LiveData, ViewModel, Permissions, Fragment, and Layout
|
Mark M. |
(all of which pre-date the "Jetpack" branding)
|
Mark M. |
some of the other things listed on that page, like data binding, navigation, Room, and WorkManager, are popular but are not needed by every app
|
Nov 29 | 8:30 PM |
Joel |
so mobile app design is very different from other software in terms of design approach?
|
Mark M. |
I would phrase it more as: software design fills in the gaps between the platform, the architecture, and the business requirements
|
Mark M. |
as such, software design needs to take the platform and architecture into account
|
Mark M. |
you would not design a Web service the same way that you would design a mobile app
|
Mark M. |
*elements* of OO design techniques may be valid for both cases, but the way those elements get applied may differ
|
Mark M. |
that is all the time that I have for today
|
Joel |
could you provide an example on that?
|
Mark M. |
the chat transcript will be posted to https://commonsware.com/office-hours/ shortly
|
Mark M. |
and the next chat is scheduled for tomorrow at 8:30am US Eastern (so, 12 hours from now)
|
Mark M. |
have a pleasant day!
|
Joel |
ok thx
|
Joel | has left the room |
Mark M. | turned off guest access |