Office Hours — Today, September 2

Thursday, August 31

Sep 2
3:55 PM
Mark M.
has entered the room
Mark M.
turned on guest access
4:35 PM
Susheel
has entered the room
4:40 PM
Mark M.
whoops -- hello, Susheel!
how can I help you today?
(sorry about the delay there -- got distracted...)
Susheel
Hey Mark
No problem at all
I just have a couple quick questions
Mark M.
go right ahead
Susheel
1. I need a viewpager style widget that will allow me to scroll through views/fragments but I will only need to use two layout files and the first view is an introduction page(first layout) and the remaining views will be of the second type of layout file. I am wondering if I can use any type of view recycling mechanism for the '2nd' type of views. Does that make sense?
Mark M.
personally, I have switched away from ViewPager to RecyclerView for this sort of horizontal swiping scenario
recycling of the pages is one reason, as ViewPager doesn't really offer that, though you could probably rig up a custom PagerAdapter that did it
that contains four sample projects demonstrating the technique
one uses a third-party RecyclerViewPager library
4:45 PM
Mark M.
the others use PagerSnapHelper
Susheel
I see. I had no idea. Do you mention this repo in your book?
Mark M.
yup, whole chapter on it
Susheel
Great! You are amazing!
Mark M.
I try to be useful :-)
Susheel
:) Now to my second question...Do you have a chapter on mvp or clean architecture?
Mark M.
not presently
Susheel
Are you familiar with an architecture called VIPER?
Mark M.
I have heard of it
Ndrocchietto C.
has entered the room
Ndrocchietto C.
has left the room
Ndrocchietto C.
has entered the room
Mark M.
I will be covering some of that sort of thing in "Android's Architecture Components" later this year
Susheel
It's based on SINGLE Responsibility. Our company has just adopted it.
I know you already have a book on architecture components.
Ndrocchietto C.
Hello
Mark M.
(Ndrocchietto -- hi! I will be with you momentarily!)
Ndrocchietto C.
(OK thanks)
Ndrocchietto C.
has left the room
Mark M.
that book's current focus is literally on the Architecture Components libraries from Google
but, I plan on exploring their use in MV* scenarios
though my current lean is towards MVI (model-view-intent)
Susheel
Right. I will need to go through the main book to see where you talk about the recycling mechanism we were talking about.
Mark M.
I will make a point to read more on VIPER and see if it makes sense to include as part of that architecture material
4:50 PM
Susheel
Thank you
Ndrocchietto C.
has entered the room
Mark M.
Ndrocchietto: hi! your turn! do you have a question?
Ndrocchietto C.
HI Mark, do you know something about Clean Architecture?
(for Android, not Uncle Bob for Java)
Mark M.
I was just about to point out that the term gets overloaded
Ndrocchietto C.
ah ah
Mark M.
I am a bit more familiar with the Uncle Bob formulation than how it is being used in Android apps, but I know bits about it
as I was telling Susheel, this sort of subject will eventually make its way into the "Android's Architecture Components" book
Ndrocchietto C.
that is fantastic
just I cannot get why you the Android community uses ThreadPoolExecutor with java
sorry I mean RXJava
Mark M.
sorry, but I did not understand that comment
Ndrocchietto C.
well when you use Clean Architecture you want that all your interactors act asyncronously
in a separate way
so there is the tendency to combine ThreadPoolExecutor, to insure that a certain number of Thread are executed sequentially with RXJava2
4:55 PM
Ndrocchietto C.
and this is a bit confusing to me, especially when I use Kotlin
Mark M.
I haven't seen that particular combination
you definitely want to manage your thread count, so that you don't wind up with far too many forked threads
Ndrocchietto C.
ah ok
Mark M.
your abstractions are only as good as the environment lets them be
Ndrocchietto C.
because with RXJava you cannot do that
Mark M.
and in Android, with mobile device CPUs, limited heap space, etc., the environment is unfriendly to abstractions
so, in this case, perhaps they are trying to enforce a thread pool semantic on RxJava to allow for N threads but for a controlled value of N
Ndrocchietto C.
ok I leave you the link of the blogger guy that everybody is following, just in the case you are curious, not to reply to me (https://fernandocejas.com/2015/07/18/architecti...)
ah I get
makes perfectly sense
Mark M.
note that the blog post that you linked to is from 2015, so it will be RxJava, not RxJava2
Ndrocchietto C.
you are right
Mark M.
Susheel: do you have another question?
Ndrocchietto C.
is with RXJava
Susheel
Do you remember the name of the chapter with the recyclerview viewpager off the top of your head? Is it Recyclerview as a pager from Advanced Recyclerview?
Mark M.
that's it
Susheel
Sounds great.
5:00 PM
Mark M.
that's a wrap for today's chat
Susheel
Have you heard the release of ARCore for Android?
Oh cool.
Mark M.
as usual, the transcript will be posted to https://commonsware.com/office-hours/ shortly
Ndrocchietto C.
have a pleasant day
Mark M.
yes, I saw it
I have a tenuous grip on reality, so perhaps augmented reality will help :-)
Susheel
I was wondering if you will cover it in the book sometime but I will continue this question in the next chat
Ndrocchietto C.
:)
the time is over:)
Mark M.
no, AR/VR isn't my area, sorry
Susheel
Oh okay
Mark M.
the next chat is Tuesday at 9am US Eastern
Susheel
Thank you Mark
Mark M.
have a pleasant day!
Ndrocchietto C.
Bye
Susheel
Have a pleasant day gentlemen
Ndrocchietto C.
youtoo
Susheel
has left the room
Ndrocchietto C.
has left the room
Mark M.
turned off guest access

Thursday, August 31

 

Office Hours

People in this transcript

  • Mark Murphy
  • Ndrocchietto Crazy Architect
  • Susheel