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.

MCE^3 - Sebastiano Poggi, Eugenio Marletti - Life Without Fragments

158 views

Published on

What is wrong with Fragments as they are implemented right now? You hear a lot of rage around bugs, issues, and plain bad/obscure APIs. But what alternatives are out there?
Most of the time, Fragments are used as custom Views. But that’s overkill for Fragments, and it’s not what they’re meant for, either: they can do way more than that (and probably shouldn’t). The talk will run through the architectural choices that we found out helped us create great apps without getting lost in Fragment hell. Because #fragmentsmatter, but not more than… [dramatic music mounts to climax, screen fades to black. ""TO BE CONTINUED"" appears on screen]

Published in: Technology
  • Be the first to comment

  • Be the first to like this

MCE^3 - Sebastiano Poggi, Eugenio Marletti - Life Without Fragments

  1. 1. Sebastiano Poggi @seebrock3r Novoda, Android GDE & Eugenio Marletti @workingkills Clue without life fragments
  2. 2. * WARNING may contain traces of personal opinions and surprisingly little hate
  3. 3. wrong What’s with Fragments
  4. 4. Attila some poor guy
  5. 5. Attila some poor guy
  6. 6. FragmentManager YOU
  7. 7. Fragment Manager * schizophrenia * unpredictable behaviour
  8. 8. XML vs CODE
  9. 9. XML vs CODE
  10. 10. retained fragments
  11. 11. transactions are async executePendingTransactions *
  12. 12. state of chaos tech debt or crash: pick one * commitAllowingStateLoss *
  13. 13. BUGS
  14. 14. “Advocating Against Android Fragments”
  15. 15. Nobody Fragments understands not a view, not a controller *
  16. 16. not a view, not a controller * Balto Nobody Fragments understands
  17. 17. Nobody understands Fragments Balto not a view, not a controller * also not a context * modular UI * lifecycle *
  18. 18. CC BY-SA 4.0 by Steve Pomeroy
  19. 19. CC BY-SA 4.0 by Steve Pomeroy
  20. 20. CC BY-SA 4.0 by Steve Pomeroy
  21. 21. they can * Google says so * all the “free” stuff * don’t fully understand * (mis)use Why do people still Fragments
  22. 22. Fragments are not for: business logic * replacing views * persisting data *
  23. 23. Fragments are evolving * ¯_( )_/¯ * attach to any Context
  24. 24. Fragments are evolving * lots of fixes and less WTFs * commitNow
  25. 25. Fragments are evolving * lots of fixes and less WTFs * commitNow Thanks Adam! (sorry Adam)
  26. 26. Partial alternatives pyricau/fragnums *weefbellington/screenplay *lyft/scoop *bluelinelabs/conductor *doridori/pilot *soundcloud/lightcycle *square/flow + /mortar * * FRAGNUMS * Screenplay * Scoop * Conductor * Pilot * LightCycle * Flow + Mortar to Fragments
  27. 27. ? custom views * clean architecture * SOLID * core vs mobile * write tests * unidirectional flow? * How are we dealing without Fragments
  28. 28. Relax, not using Fragments is OK * using Fragments is… also OK * be a professional * use the Support Library * pray * pray a lot * we are not your supervisor
  29. 29. Bunch o’ Advocating Against Android Fragments * Android Forestry * Offline Application Architecture * Android Fragment & Activity Lifecycle * Let it flow * * goo.gl/VDMhs0 * goo.gl/GN0rmP * goo.gl/P2ROcA * goo.gl/K4nThH * goo.gl/LNije5 links
  30. 30. A&Q (no pressure)
  31. 31. Thank you
  32. 32. Android Pro >> Novoda Google Developer Expert @seebrock3r Clue << Android Lead loves Tequila @workingkills we’re hiring Poggi Sebastiano MARLETTI EUGENIO bit.ly/life-without-fragments

×