Office Hours — Today, July 10

Saturday, July 7

Jul 10
7:25 PM
Mark M.
has entered the room
Mark M.
turned on guest access
7:45 PM
Aaron
has entered the room
Mark M.
hello, Aaron!
how can I help you today?
7:50 PM
Aaron
Hi Mark. I'm studying the Busy Coder's Guide and following the tutorials. For context I have only an introductory level knowledge of Java and I'm not a professional developer. I'm on tutorial 12 and the learning curve is getting steeper. Few questions
7:55 PM
Aaron
View paste
1. I'm having trouble understanding the role of SimpleContentActivity. It seems like it doesn't add much, and my understanding is that Google recommends a single-activity app architecture now. What am I missing?

2. I'd like to read more about the Model Fragment pattern used in the app, but Googling it turns up very few results. Is there another name for this pattern?

3. I have only a nominal understanding of app architectures such as MVP, MVVM, etc. The Busy Coder's Guide doesn't seem to discuss these concepts, and searching the PDF for the keywords (and related ones such as ViewModel) produces no results. Which of these architectures most closely describes EmPubLite, and is there a section(s) of the book I'm missing that contains more information about this?
Thanks :)
To clarify #1:
Mark M.
1. SimpleContentActivity handles the help and about pages, and it is there in part to help illustrate starting other activities and passing data to them via extras. With respect to the Google-recommended single-activity architecture, that is a relatively new bit of advice.
Aaron
My question is, why do we separate out that code and place it in SimpleContentActivity, rather than including it in EmPubLiteActivity in order to have only 1 activity. I understand the code inside it, I just don't understand why it's in a separate activity
Mark M.
it is to teach you how to work with other activities, via startActivity() and extras
Aaron
Ok, got it
That makes sense.
8:00 PM
Mark M.
2. You will also find it called a "headless fragment". It is the technique used by Google for their ViewModel library, covered in "Android's Architecture Components".
3. EmPubLite does not adhere to any GUI architecture. GUI architectures are covered somewhat in "Android's Architecture Components". However, my books are on how to use Android APIs, not on the many possible ways of plugging those things together, such as various GUI architecture patterns.
Aaron
OK great. That is very helpful. I am sure I'll be back in the future but that gives me enough to go on for now
Mark M.
OK, sounds good
Aaron
One other thing to mention, I noticed that the landing page for the Busy Coder's Guide says the book has 16 tutorials, but the latest version has 17
FYI
Thanks a lot!
8:05 PM
Mark M.
thanks for pointing that out!
Aaron
No problem. Thanks again, good night
8:20 PM
Aaron
has left the room
8:30 PM
Mark M.
turned off guest access

Saturday, July 7

 

Office Hours

People in this transcript

  • Aaron
  • Mark Murphy