Ra#onalize	  Android	  development	  with	  StAnD	  Clement	  Escoffier,	  akquinet	  A.G.	  
What	  about	  me	  ?	  	  ¡  Head	  of	  the	  Innova=on	  Competence	  Center	  at	  akquinet	  ¡  Apache	  So@ware	  ...
          ...
Copyright	  ©	  2010	  –	  akquinet	     4	  
I	  love	  driving	                                    developers	                                         crazy	  Copyrig...
Tradi#onal	  Android	  development	  •        Eclipse	  Android	  Development	          •  Development,	  Tests,	  Debug	 ...
StAnD	  •        Let’s	  ra#onalize	  Android	  development	          •  Support	  Android	  applica=on	  produc=on	  from...
This	   is	   a	   work	   of	   ficFon.	   Names,	   characters,	  	  places	   and	   projects	   are	   all	   products	...
Once	  upon	  a	  #me…	  a	  project	  •        An	  eBook	  Reader	          •  DRM	                  •  Na=ve	  library	...
Version 1                                                    •    Eclipse                                                 ...
Version 1                                                    •    Eclipse                                                 ...
A	  bit	  beMer	                                  Version 1                   Version 2                  •        Eclipse ...
Androlog	  Androlog	  is	  a	  configurable	  log	  facade	  for	  Android	  •        Per-­‐logger	  level	  configura#on	  ...
A	  bit	  beMer	                                  Version 1                   Version 2                  •        Eclipse ...
A	  bit	  beMer	                        Version 2                             Version 3        •        New features      ...
Maven-­‐Android-­‐Plugin	  Reliable	  build	  system	  •        Same	  build	  on	  all	  machines	          •  Conven=on	...
Android	  plugin	  for	  Jenkins	  /	  Hudson	  Tests	  Android	  applica#ons	  con#nuously	  on	  several	  plaVorms	  • ...
Marvin	  –	  Simplify	  Integra#on	  Tests	  Instrumenta#on	  tests	  are	  …	  really	  annoying	  to	  write	  !	  •    ...
public void testLogin() throws Exception {!    Instrumentation instr = getInstrumentation();!!    ActivityMonitor monitor ...
public void testLogin() throws Exception {!    LoginActivity loginActivity =      !startActivity(LoginActivity.class);!   ...
From	  a	  bit	  beMer	  …	  to	  being	  efficient	                        Version 2                             Version 3 ...
Rindirect	  Sophis#cated	  modularity	  for	  Android	  •        Android	  does	  not	  support	  reusing	  components	  f...
Roboject	  A	  CDI	  for	  Android	  •        Android	  code	  can	  be	  really	  =resome	          •  A	  lot	  of	  asy...
@InjectLayout(R.layout.searchinputactivity)!public class TweetSearchActivity extends RobojectActivity {!    @InjectView!  ...
From	  a	  bit	  beMer	  …	  to	  being	  efficient	                        Version 2                             Version 3 ...
An	  example	  would	  be	  useful	  right	  about	  now	              If	  we	  have	  Fme…	  
StAnD	                                                      ü Androlog	                                                  ...
Q	  &	  A	                                                      Questions                                                 ...
Rationalize Android Development with StAnD - Clement Escoffier, akquinet
Rationalize Android Development with StAnD - Clement Escoffier, akquinet
Upcoming SlideShare
Loading in …5
×

Rationalize Android Development with StAnD - Clement Escoffier, akquinet

894
-1

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
894
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Rationalize Android Development with StAnD - Clement Escoffier, akquinet

  1. 1. Ra#onalize  Android  development  with  StAnD  Clement  Escoffier,  akquinet  A.G.  
  2. 2. What  about  me  ?    ¡  Head  of  the  Innova=on  Competence  Center  at  akquinet  ¡  Apache  So@ware  Founda=on   –  PMC  Apache  Felix,    Apache  Ace   –  Apache  Felix  iPOJO  main  developer  ¡  OW2   –  Chameleon  project  leader  ¡  A  lot  of  others  contribu=ons     –  maven-­‐android-­‐plugin   –  H-­‐UBU  Copyright  ©  2010  –  akquinet  AG   2  
  3. 3.          3  
  4. 4. Copyright  ©  2010  –  akquinet   4  
  5. 5. I  love  driving   developers   crazy  Copyright  ©  2010  –  akquinet   5  
  6. 6. Tradi#onal  Android  development  •  Eclipse  Android  Development   •  Development,  Tests,  Debug   •  Export  and  signature  of  APKs   •  Limited  modularity   •  Eclipse-­‐based  build  process   •  No  release  process  (export  wizard)  •  Apache  Ant   •  Compila=on,  Test,  Packaging   •  Release   •  Dependencies  management   •  Hard  to  maintain  –  Scalability  –  Recursion   •  Can  quickly  differ  from  standard  builds  Copyright  ©  2010  –  akquinet  AG   6  
  7. 7. StAnD  •  Let’s  ra#onalize  Android  development   •  Support  Android  applica=on  produc=on  from  development  to  delivery   •  Simplifica#on  of  the  development  model   •  Bootstrap  a  project  in  less  than  1  minute   •  Improve  the  logging  system  (Androlog)   •  Injec=on  framework  (Roboject)   •  Reliable  build  and  sophis#cated  branding   •  Maven-­‐based  build  system  (maven-­‐android-­‐plugin)   •  Advanced  modularity  and  composi=on  (rindirect)   •  Improve  quality  and  feedback   •  Integra=on  and  UI  tests  (Marvin)   •  Con=nuous  integra=on  (Android  plugin  for  Jenkins)   •  Complete  crash  report  (Androlog)  Copyright  ©  2010  –  akquinet  AG   7  
  8. 8. This   is   a   work   of   ficFon.   Names,   characters,    places   and   projects   are   all   products   of   the  author’s   imaginaFon.     Any   resemblance   to  actual   events,   locales   or   projects   is   enFrely  coincidental  ;-­‐)   Copyright  ©  2010  –  akquinet   8  
  9. 9. Once  upon  a  #me…  a  project  •  An  eBook  Reader   •  DRM   •  Na=ve  library   •  Server  integra=on   •  Tethering   •  Library  /  Vault,  Book  Store   •  Server  integra=on   •  Social  aspect     •  Friends,  Sharing,  Loaning   •  Mul=-­‐pladorm   •  iOS,  Android,  Desktop  (MacOS  /  Windows)   •  Synchroniza=on   •  >  2  years  of  ac#ve  development  Copyright  ©  2010  –  akquinet  AG   9  
  10. 10. Version 1 •  Eclipse •  2 developers •  Native lib integration o  No tests o  Log statements removed before release o  Facing Java / Android API differencesCopyright  ©  2010  –  akquinet  AG   10  
  11. 11. Version 1 •  Eclipse •  2 developers •  Native lib integration o  No tests o  Log statements removed before release o  Facing Java / Android API differencesCopyright  ©  2010  –  akquinet  AG   11  
  12. 12. A  bit  beMer   Version 1 Version 2 •  Eclipse •  New features •  2 developers •  Bad ratings •  Native lib integration •  Bigger team o  No tests o  Log statements o  Androlog removed before o  Testing using release instrumentation tests o  Facing Java / android o  Apache Ant APIs differencesCopyright  ©  2010  –  akquinet  AG   12  
  13. 13. Androlog  Androlog  is  a  configurable  log  facade  for  Android  •  Per-­‐logger  level  configura#on   •  Log  disabled  on  end-­‐user  devices   •  Can  be  enabled  by  developers  to  reproduce  issues  •  Repor#ng   •  Crashes  can  be  reported  by  mail  or  a  portal   •  Device  info   •  Log   •  Complete  stack  traces  •  Makes  logging  a  lot  easier  •  Faster  bug  fixes  Copyright  ©  2010  –  akquinet  AG   13  
  14. 14. A  bit  beMer   Version 1 Version 2 •  Eclipse •  New features •  2 developers •  Bad ratings •  Native lib integration •  Bigger team o  No tests o  Log statements o  Androlog removed before o  Testing using release instrumentation tests o  Facing Java / android o  Apache Ant APIs differencesCopyright  ©  2010  –  akquinet  AG   15  
  15. 15. A  bit  beMer   Version 2 Version 3 •  New features •  Brandings •  Bad ratings •  Quality++ •  Bigger team •  New features o  Maven o  Androlog o  Jenkins o  Testing using o  Marvin instrumentation tests o  Became really o  Apache Ant complexCopyright  ©  2010  –  akquinet  AG   16  
  16. 16. Maven-­‐Android-­‐Plugin  Reliable  build  system  •  Same  build  on  all  machines   •  Conven=on  over  configura=on   •  Con=nuous  integra=on  support   •  Dependency  management   •  Modularity  /  Branding  •  Release  process   •  Create  marketplace-­‐ready  APK  •  Archetypes   •  Quickstart,  with-­‐test,  release,  stand  •  More  reliable  •  More  maintainable  •  Release  process  Copyright  ©  2010  –  akquinet  AG   17  
  17. 17. Android  plugin  for  Jenkins  /  Hudson  Tests  Android  applica#ons  con#nuously  on  several  plaVorms  •  1.6  to  3.1   •  A  lot  of  devices  are  available   •  Huge  Fragmenta=on  (1.6)  •  Tests  executed  on  25  devices   •  Covering  the  most  common  devices   •  Emulator  configura=ons  •  More  reliable  applica#ons  •  Less  surprises  especially  when  using  internals    Copyright  ©  2010  –  akquinet  AG   18  
  18. 18. Marvin  –  Simplify  Integra#on  Tests  Instrumenta#on  tests  are  …  really  annoying  to  write  !  •  Android  instrumenta=on  tests   •  A  lot  of  asynchronocity   •  Tests  don’t  easily  navigate  across  ac=vi=es   •  UI  Tests  are  big  burdens  •  Marvin  simplifies  test  wri=ng   •  A  layer  on  the  top  of  instrumenta=on  tests   •  A  set  of  hamcrest  matchers   •  Integrated  into  the  build  process  •  Reduce  the  amount  of  code  required  to  write  tests  •  Support  complex  workflows  •  More  reliable  applica#ons  Copyright  ©  2010  –  akquinet  AG   20    
  19. 19. public void testLogin() throws Exception {! Instrumentation instr = getInstrumentation();!! ActivityMonitor monitor = !instr.addMonitor(MainActivity.class.getName(), null, !false);! Intent intent = new Intent(Intent.ACTION_MAIN);! intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);! intent.setClassName(instr.getTargetContext(), ! !LoginActivity.class.getName());! instr.startActivitySync(intent);! instr.waitForIdleSync();! instr.sendStringSync(“clement");! instr.sendKeyDownUpSync(KeyEvent.KEYCODE_DPAD_DOWN);! instr.sendStringSync(“magic");! instr.sendKeyDownUpSync(KeyEvent.KEYCODE_DPAD_DOWN);! instr.sendKeyDownUpSync(KeyEvent.KEYCODE_DPAD_CENTER);!! Activity mainActivity = !instr.waitForMonitorWithTimeout(monitor, 30000);! assertNotNull(mainActivity);!}!
  20. 20. public void testLogin() throws Exception {! LoginActivity loginActivity = !startActivity(LoginActivity.class);! assertThat(loginActivity)
 !.sendString(”clement")
 !.keyDownUp(KeyEvent.KEYCODE_DPAD_DOWN)
 !.sendString(”magic")
 !.keyDownUp(KeyEvent.KEYCODE_DPAD_DOWN)
 !.keyDownUp(KeyEvent.KEYCODE_DPAD_CENTER)
 !.startsActivity(MainActivity.class);!}!
  21. 21. From  a  bit  beMer  …  to  being  efficient   Version 2 Version 3 Version 4 •  New features •  Brandings •  More brandings •  Bad ratings •  Quality++ •  Quality++ •  Bigger team •  New features •  Socialization o  Maven o  Androlog o  Jenkins o  Rindirect o  Testing using o  Marvin o  Roboject instrumentation tests o  Became really o  Apache Ant complexCopyright  ©  2010  –  akquinet  AG   23  
  22. 22. Rindirect  Sophis#cated  modularity  for  Android  •  Android  does  not  support  reusing  components  from  another   applica=on   •  Package  conflict   •  Resources  not  found  in  R   •  Libraries  do  share  the  same  package  •  Rindirect  removes  those  limita=ons  by  genera=ng  the  missing/ required  R  files   •  Automated  during  your  build  process  •  Allow  advanced  modularity  •  Improve  component  sharing    Copyright  ©  2010  –  akquinet  AG   24  
  23. 23. Roboject  A  CDI  for  Android  •  Android  code  can  be  really  =resome   •  A  lot  of  asynchronocity   •  Service  bindings,  intents…   •  Predominance  of  the  main  thread   •  UI  code  can  be  smaller   •  Retrieving  a  View,  Senng  a  Layout  •  Roboject  dras=cally    simplifies  Android  code   •  @InjectX  where  X  is  Service,  Intent,  Extra,  View,  Layout…   •  Addi=onal  lifecycle  method  :  onReady  •  Reduce  the  amount  of  code  required  to  develop  Android   applica#ons  •  Minimum  run#me  overhead  •  Extensible    Copyright  ©  2010  –  akquinet  AG   25  
  24. 24. @InjectLayout(R.layout.searchinputactivity)!public class TweetSearchActivity extends RobojectActivity {! @InjectView! private EditText editTextSearch;!! @InjectView! private Button buttonSearch;!! @Override! public void onCreate(Bundle savedInstanceState) {! super.onCreate(savedInstanceState);!! buttonSearch.setOnClickListener(new OnClickListener() {! public void onClick(View arg0) {! Intent intent = new Intent(TweetSearchActivity.this, ! ! !TweetListActivity.class);! intent.putExtra("searchTerm”, ! !! ! ! !editTextSearch.getText().toString());! startActivity(intent);! }! });! }!}!
  25. 25. From  a  bit  beMer  …  to  being  efficient   Version 2 Version 3 Version 4 •  New features •  Brandings •  More brandings •  Bad ratings •  Quality++ •  Quality++ •  Bigger team •  New features •  Socialization o  Maven o  Androlog o  Jenkins o  Rindirect o  Testing using o  Marvin o  Roboject instrumentation tests o  Became really o  Apache Ant complexCopyright  ©  2010  –  akquinet  AG   27  
  26. 26. An  example  would  be  useful  right  about  now   If  we  have  Fme…  
  27. 27. StAnD   ü Androlog   ü Maven-­‐Android-­‐Plugin   ü Jenkins  Plugin   ü Marvin   ü Rindirect   ü Roboject   ü Enterprise  Extensions  Copyright  ©  2010  –  akquinet  AG   29  
  28. 28. Q  &  A   Questions ? hYp://stand.spree.de  Copyright  ©  2010  –  akquinet  AG   30  
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×