Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Optimistic Approach
How to show results instead spinners
without breaking your Application
by Paul Taykalo, Stanfy
Paul Ta...
Optimistic Approach
What is it about?
Paul Taykalo, Optimistic Approach : How to show results instead spinners without bre...
Optimistic Approach
4 Speeding up application
4 "Speeding" up application
4 Making user happier
4 It's all about user-frie...
How mobile application works
Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking you...
How mobile application works
4 Handle user action
4 Send request to the server
4 Get response from the server
4 Update UI
...
Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 6
User need to wait
Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Applicati...
User need to wait
But user don't like to wait
Paul Taykalo, Optimistic Approach : How to show results instead spinners wit...
User need to wait
But user don't like to wait
User don't have time to wait
Paul Taykalo, Optimistic Approach : How to show...
Loading next slide
Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Applicat...
Solutions?
Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Sta...
Solutions - Making app faster
4 Decrease sizes
4 Compression
4 Opened connection to the server
Paul Taykalo, Optimistic Ap...
Solutions - One step
ahead
4 Caching
4 Preload pages
4 Load content in the backround
4 Be prepared
Paul Taykalo, Optimisti...
Solutions - Entertain user
Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your ...
Solutions - Entertain the user
4 Animations
4 Push/Pop
4 Spinner
4 Progress
4 Skeleton
4 Partial info
Paul Taykalo, Optimi...
Solutions - Predict
the result
4 Precalculate result
4 Show it to user
4 ????
Paul Taykalo, Optimistic Approach : How to s...
Solutions - Predict
the result
4 Precalculate result
4 Show it to user
4 Pray :)
Paul Taykalo, Optimistic Approach : How t...
Types of user
interactions
Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your ...
Actions
and
Expectations
Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Ap...
Actions and Expectations
4 If I press like I expect that
4 If I edit post I expect that
4 If I follow this guy I expect th...
Predictabevs
*elbatciderpnU_
Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking you...
Predictable
Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, St...
Predictable
If I can predict the result, why should I wait for
confirmation?
Paul Taykalo, Optimistic Approach : How to sh...
Optimistic models
Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Applicati...
Non optimistic model
Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Applic...
Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 26
Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 27
Following a person
[self.requestManager follow:original result:^(Person *res, NSError *err) {
if (err) {
// Handling error...
Following a person
// Saving original for later usage
Person *original = self.person;
// Create fake result
Person *fake =...
Following a person
if (error) {
// rollback
weakSelf.person = original;
resultBlock(original, error);
} else {
// Updating...
Following a person
// Following a person
- (void)follow:(void (^)(Person *person, NSError *error))resultBlock {
__weak __t...
What about non-breaking?
Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Ap...
Correct View Layer
MVVM*
Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Ap...
Correct View Layer
Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Applicat...
Correct View Layer
Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Applicat...
Hiperactive User?
Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Applicati...
Hiperactive User?
like unlike like unlike like unlike like unlike
like unlike like unlike like unlike like unlike
like unl...
State based on multiple updates
Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking ...
State based on multiple updates
Take a look at Parse SDK
PFObjectEstimatedData.h
Paul Taykalo, Optimistic Approach : How t...
Demo?Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2...
Recap
Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, ...
Recap
4 It's pretty easy to trick user
4 Show user what he expect
4 Fight for your users, they deserve it
4 Now you can wr...
Last slide :)
Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, ...
Optimistic Approach
How to show results instead spinners
without breaking your Application
by Paul Taykalo, Stanfy
Paul Ta...
Links
4 http://www.reactnative.com/
4 https://speakerdeck.com/frantic/react-native-
under-the-hood
4 https://medium.com/st...
Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 46
Upcoming SlideShare
Loading in …5
×

0

Share

Download to read offline

Павел Тайкало: "Optimistic Approach : How to show results instead spinners without breaking your Application"

Download to read offline

Як почати показувати користувачу контент, а не індикатори завантаження і як не зруйнувати при цьому додаток

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to like this

Павел Тайкало: "Optimistic Approach : How to show results instead spinners without breaking your Application"

  1. 1. Optimistic Approach How to show results instead spinners without breaking your Application by Paul Taykalo, Stanfy Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 1
  2. 2. Optimistic Approach What is it about? Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 2
  3. 3. Optimistic Approach 4 Speeding up application 4 "Speeding" up application 4 Making user happier 4 It's all about user-friendliness Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 3
  4. 4. How mobile application works Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 4
  5. 5. How mobile application works 4 Handle user action 4 Send request to the server 4 Get response from the server 4 Update UI Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 5
  6. 6. Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 6
  7. 7. User need to wait Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 7
  8. 8. User need to wait But user don't like to wait Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 8
  9. 9. User need to wait But user don't like to wait User don't have time to wait Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 9
  10. 10. Loading next slide Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 10
  11. 11. Solutions? Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 11
  12. 12. Solutions - Making app faster 4 Decrease sizes 4 Compression 4 Opened connection to the server Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 12
  13. 13. Solutions - One step ahead 4 Caching 4 Preload pages 4 Load content in the backround 4 Be prepared Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 13
  14. 14. Solutions - Entertain user Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 14
  15. 15. Solutions - Entertain the user 4 Animations 4 Push/Pop 4 Spinner 4 Progress 4 Skeleton 4 Partial info Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 15
  16. 16. Solutions - Predict the result 4 Precalculate result 4 Show it to user 4 ???? Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 16
  17. 17. Solutions - Predict the result 4 Precalculate result 4 Show it to user 4 Pray :) Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 17
  18. 18. Types of user interactions Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 18
  19. 19. Actions and Expectations Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 19
  20. 20. Actions and Expectations 4 If I press like I expect that 4 If I edit post I expect that 4 If I follow this guy I expect that 4 If I open a post I expect that 4 If I ask for a radom number I expect that Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 20
  21. 21. Predictabevs *elbatciderpnU_ Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 21
  22. 22. Predictable Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 22
  23. 23. Predictable If I can predict the result, why should I wait for confirmation? Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 23
  24. 24. Optimistic models Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 24
  25. 25. Non optimistic model Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 25
  26. 26. Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 26
  27. 27. Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 27
  28. 28. Following a person [self.requestManager follow:original result:^(Person *res, NSError *err) { if (err) { // Handling error resultBlock(nik, err); } else { // Updating to the new value resultBlock(res, nil); } }]; Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 28
  29. 29. Following a person // Saving original for later usage Person *original = self.person; // Create fake result Person *fake = [self.person copy]; fake.followingStatus = @"Following"; // Updating current object self.person = fake; resultBlock(fake, nil); Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 29
  30. 30. Following a person if (error) { // rollback weakSelf.person = original; resultBlock(original, error); } else { // Updating to the new value weakSelf.person = updatedPerson; resultBlock(updatedPerson, nil); } Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 30
  31. 31. Following a person // Following a person - (void)follow:(void (^)(Person *person, NSError *error))resultBlock { __weak __typeof(self) weakSelf = self; // Saving original for later usage Person *original = self.person; // Create fake result Person *fake = [self.person copy]; fake.followingStatus = @"Following"; // Updating current object self.person = fake; resultBlock(fake, nil); // Calling request manager [self.requestManager followPerson:original result:^(Person *updatedPerson, NSError *error) { if (error) { // rollback weakSelf.person = original; resultBlock(original, error); } else { // Updating to the new value weakSelf.person = updatedPerson; resultBlock(updatedPerson, nil); } }]; } Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 31
  32. 32. What about non-breaking? Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 32
  33. 33. Correct View Layer MVVM* Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 33
  34. 34. Correct View Layer Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 34
  35. 35. Correct View Layer Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 35
  36. 36. Hiperactive User? Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 36
  37. 37. Hiperactive User? like unlike like unlike like unlike like unlike like unlike like unlike like unlike like unlike like unlike like unlike like unlike like unlike like unlike like unlike like unlike like unlike Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 37
  38. 38. State based on multiple updates Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 38
  39. 39. State based on multiple updates Take a look at Parse SDK PFObjectEstimatedData.h Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 39
  40. 40. Demo?Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 40
  41. 41. Recap Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 41
  42. 42. Recap 4 It's pretty easy to trick user 4 Show user what he expect 4 Fight for your users, they deserve it 4 Now you can write even cooler apps :) Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 42
  43. 43. Last slide :) Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 43
  44. 44. Optimistic Approach How to show results instead spinners without breaking your Application by Paul Taykalo, Stanfy Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 44
  45. 45. Links 4 http://www.reactnative.com/ 4 https://speakerdeck.com/frantic/react-native- under-the-hood 4 https://medium.com/stanfy-engineering-practices/ do-not-let-your-user-see-spinners-35b824c3ce2f 4 ComponentKit Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 45
  46. 46. Paul Taykalo, Optimistic Approach : How to show results instead spinners without breaking your Application, Stanfy, 2015 46

Як почати показувати користувачу контент, а не індикатори завантаження і як не зруйнувати при цьому додаток

Views

Total views

312

On Slideshare

0

From embeds

0

Number of embeds

55

Actions

Downloads

2

Shares

0

Comments

0

Likes

0

×