Oct 26 | 7:20 PM |
Mark M. | has entered the room |
Oct 26 | 7:25 PM |
Mark M. | turned on guest access |
Steve S. | has entered the room |
Mark M. |
hello, Steve!
|
Mark M. |
how can I help you today?
|
Steve S. |
Hi, Mark!
|
Steve S. |
Another follow-up question on the progress indicators... Let me paste it in.
|
Steve S. |
View paste
|
Mark M. |
off the cuff, I'd go with a modal dialog over disabling nav options that the user may be used to using
|
Steve S. |
ok. then redesigning my app to get rid of the modal dialogs becomes harder.
|
Mark M. |
even better would be to figure out how to allow the background updates while still allowing regular nav, though that's probably a lot more work
|
Steve S. |
ok. here's one of the problems i see:
|
Steve S. |
one activity has a list of contacts. you can click on a contact to get information about it and also to delete the contact. if the user deleted the contact (which triggers a rest request) and up-navigated back to the list of contacts, the list of contacts would be out of date.
|
Mark M. |
why?
|
Oct 26 | 7:30 PM |
Mark M. |
you know the contact is being deleted
|
Steve S. |
ok
|
Mark M. |
so, get rid of the contact locally, at least provisionally
|
Steve S. |
ok
|
Mark M. |
in tandem, do the REST request to delete the contact "for realz"
|
Mark M. |
if you get some sort of an error condition from that, add the contact back to the list
|
Steve S. |
ok. so have a separate local list of contacts.
|
Mark M. |
yes, at least to the level of an in-memory cache
|
Mark M. |
a typical architecture is that you have a local disk representation of the model data, which your network I/O is synchronizig
|
Mark M. |
er, synchronizing
|
Steve S. |
ok
|
Mark M. |
but, an on-disk copy is not essential, particularly depending on the nature of the app
|
Steve S. |
ok
|
Mark M. |
you see the same basic flow with a lot of Web apps nowadays: delete the item from the page, while updating the server in the background
|
Mark M. |
if for some reason the server update fails, then have the user deal with the problem
|
Mark M. |
but since success is typical, optimize the flow for the success case
|
Oct 26 | 7:35 PM |
Steve S. |
i was trying to avoid having to maintain a copy, but i guess that's what i need to do.
|
Mark M. |
relatively few apps keep re-re-re-re-re-re-downloading the same data
|
Mark M. |
whether the copy is purely an in-memory cache, or a local data store with a cache for optimization purposes, depends upon the app
|
Steve S. |
can you point me to any examples i could base my redesign on (where i maintain a copy of back-end data)?
|
Mark M. |
that's difficult to answer in the abstract
|
Steve S. |
ok
|
Mark M. |
it depends a lot on the nature of the data and the nature of the REST operations
|
Mark M. |
my book is focused on tactical matters, and so I don't really have any examples there
|
Steve S. |
sure
|
Mark M. |
(though that may change in 2017)
|
Mark M. |
the typical answer is the Google I/O app: https://github.com/google/iosched
|
Mark M. |
for some reason, they don't seem to have released the source for the 2016 edition
|
Mark M. |
and I don't know if the 2015 edition runs anymore
|
Steve S. |
i'll check out the Google I/O app.
|
Oct 26 | 7:40 PM |
Mark M. |
and their app's usage is heavily tilted to reading, with little-to-no writing
|
Mark M. |
most of the data changes are from server updates (e.g., additions to the schedule)
|
Mark M. |
but, it may give you some ideas
|
Steve S. |
great i'll check it out.
|
Steve S. |
your book has been a tremendous help to me. but a lot of the things i have the most trouble with now are larger-scale, architectural issues. if you add some material about that in 2017, that would be fantastic.
|
Mark M. |
the challenge, as I alluded to above, is that the right answer varies a lot by app
|
Mark M. |
the Google I/O app will solve this problem a lot differently than will a brokerage client app
|
Mark M. |
which will solve the problem a lot differently than will a social network client
|
Mark M. |
which will solve the problem a lot differently than will a chat client
|
Mark M. |
ad nauseum
|
Steve S. |
sure, i understand
|
Mark M. |
showing some examples of addressing these sorts of concerns may "fall out" of some other work that I am doing, but I'll be pointing out repeatedly that they are fine for some scenarios but are not silver bullets
|
Oct 26 | 7:45 PM |
Steve S. |
sure
|
Steve S. |
ok. i know what i need to do now. i'll work on rethinking my architecture to maintain copies of back-end data.
|
Steve S. |
thank you so much for the good help! no more questions today. have a good rest of the day.
|
Mark M. |
you are very welcome, and have a pleasant evening (or other relevant day part depending on your locale!)
|
Steve S. | has left the room |
Oct 26 | 7:55 PM |
Romo | has entered the room |
Mark M. |
hello, Romo!
|
Mark M. |
how can I help you today?
|
Oct 26 | 8:00 PM |
Romo |
Hi, was wondering if you could help me with this http://stackoverflow.com/questions/40273665/col...
|
Mark M. |
I have not worked with CollapsingToolbarLayout
|
Mark M. |
in a regular action bar, I would look to how SearchView is implemented
|
Mark M. |
but, that's not a direct analogue to what you are seeking
|
Mark M. |
and so I am not really in position to help on this one -- sorry!
|
Romo |
That is fine thx for consideration
|
Romo | has left the room |
Oct 26 | 8:30 PM |
Mark M. | turned off guest access |