Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Lightweight Android lifecycle annotations

Lightweight Android lifecycle annotations

In this talk I will demonstrate how to create reusable components that can be applied on an ad hoc basis to activities and fragments, bypassing Androids restrictive inheritance model, allowing the implementation of cross cutting concerns (such as ads and analytics) without polluting your code base

Savvas Dalkitsis

November 02, 2015
Tweet

More Decks by Savvas Dalkitsis

Other Decks in Programming

Transcript

  1. Ads

  2. AOP is Traits are very powerful but very dangerous. “If

    all you have is a hammer, everything looks like a nail” •  Use cautiously •  Only  for  pure  cross-­‐cu/ng  concerns   •  Don’t  be  afraid  to  move  aspects  traits  back  to  business  logic  if  it   becomes  apparent  that  it  belongs  there   •  For  uber-­‐cross-­‐cu/ng-­‐concerns  (like  global  session  management)  you   can  use  Applica,on.registerAc,vityCallbacks()   Conclusions
  3. •  Pageviews •  Ads   •  Implicit  user  event  parameters

     (screen  name  plus  more)   •  FAB   •  HierrarchyViewer  aspect  trait  for  debugging   •  more  to  come…   How do we use this @