SlideShare une entreprise Scribd logo
1  sur  40
Télécharger pour lire hors ligne
www.immobilienscout24.de




Coexisting of Android and Robots
Introduction to RoboGuice & Robotium
Android Meetup Berlin | 30.05.2012 | Hasan Hosgel
About me
 www.immobilienscout24.de




Hasan Hoşgel
Twitter: @alosdev
Github: alosdev
G+: Hasan Hosgel

Senior Developer
Mobile enthusiast,
Man of action
Germany‘s leading
ImmobilienScout24
                                              real-estate portal
                                              550 employees,
                                              160 in the IT




 Seite | Coexisting of Android and Robots |
 3     Hasan Hosgel
Germany‘s leading
ImmobilienScout24
                                              real-estate portal
                                              550 employees,
 > 7.5 Million unique users                   160 in the IT
 > 2 Billion PI
 > 260 Million Expose views
 ~ 1.5 Million active listings
 > 110,000 Vendors
 ... per month
 > 3 Mio App-Downloads
 Seite | Coexisting of Android and Robots |
 4     Hasan Hosgel
Germany‘s leading
ImmobilienScout24
                                              real-estate portal
                                              550 employees,
 > 7.5 Million unique users                   160 in the IT
 > 2 Billion PI                                     2 datacenter
 > 260 Million Expose views                         ~100 physical
 ~ 1.5 Million active listings                      ~800 virtual
 > 110,000 Vendors                                  ... machines
 ... per month
 > 3 Mio App-Downloads
 Seite | Coexisting of Android and Robots |
 5     Hasan Hosgel
Normal activity




Seite 6   | Coexisting of Android and Robots | Hasan Hosgel
Normal activity



                                                              do you like it?




Seite 7   | Coexisting of Android and Robots | Hasan Hosgel
Normal activity



                                                              do you like it?

                                                               a lot of boilerplate
                                                               code




Seite 8   | Coexisting of Android and Robots | Hasan Hosgel
How to avoid this?




Seite 9   | Coexisting of Android and Robots | Hasan Hosgel
How to avoid this?




                         as the talk subject
                         says RoboGuice




Seite 10 | Coexisting of Android and Robots | Hasan Hosgel
RoboGuice


                                                              DI & IOC Framework
                                                              for Android




Source: http://roboguice.org




 Seite 11 | Coexisting of Android and Robots | Hasan Hosgel
RoboGuice


                                                              DI & IOC Framework
                                                              for Android

                                                              based on Google Guice no
                                                              AOP (JSR-330 compatible)




Source: http://roboguice.org




 Seite 12 | Coexisting of Android and Robots | Hasan Hosgel
RoboGuice


                                                              DI & IOC Framework
                                                              for Android

                                                              based on Google Guice no
                                                              AOP (JSR-330 compatible)

                                                              actual version 2.0


Source: http://roboguice.org




 Seite 13 | Coexisting of Android and Robots | Hasan Hosgel
definition IOC & DI
source: http://wikipedia.com
 In software engineering, Inversion of Control (IoC) is an object-oriented
 programming practice whereby the object coupling is bound at run time by
 an "assembler" object and is typically not knowable at compile time using
 static analysis.

 Dependency injection is a software design pattern that allows a choice of
 component to be made at run-time rather than compile time. This can be
 used, for example, as a simple way to load plugins dynamically or to choose
 mock objects in test environments vs. real objects in production
 environments.




Seite 14 | Coexisting of Android and Robots | Hasan Hosgel
definition IOC & DI
source: http://wikipedia.com
 In software engineering, Inversion of Control (IoC) is an object-oriented
 programming practice whereby the object coupling is bound at run time by
 an "assembler" object and is typically not knowable at compile time using
 static analysis.

 Dependency injection is a software design pattern that allows a choice of
 component to be made at run-time rather than compile time. This can be
 used, for example, as a simple way to load plugins dynamically or to choose
 mock objects in test environments vs. real objects in production
 environments.


                Spring                                       Google Guice

               EJB (> 3.0)                                   JBoss Seam

Seite 15 | Coexisting of Android and Robots | Hasan Hosgel
What you need for RoboGuice?


       Android project


       RoboGuice 2.0


       Guice 3.0 no AOP


       javax.inject


Seite 16 | Coexisting of Android and Robots | Hasan Hosgel
Configuration


       extend Robo* classes




Seite 17 | Coexisting of Android and Robots | Hasan Hosgel
Configuration


       extend Robo* classes

       create
       roboguice_modules.xml




Seite 18 | Coexisting of Android and Robots | Hasan Hosgel
Configuration


       extend Robo* classes

       create
       roboguice_modules.xml

       create your
       AbstractModule




Seite 19 | Coexisting of Android and Robots | Hasan Hosgel
Configuration


       extend Robo* classes

       create
       roboguice_modules.xml

       create your
       AbstractModule

       configure the module
       in the xml

Seite 20 | Coexisting of Android and Robots | Hasan Hosgel
Injection Types




Seite 21 | Coexisting of Android and Robots | Hasan Hosgel
Injection Types


   member injection




Seite 22 | Coexisting of Android and Robots | Hasan Hosgel
Injection Types


   member injection




   setter injection




Seite 23 | Coexisting of Android and Robots | Hasan Hosgel
injection types


   member injection




   setter injection



   constructor
   injection


Seite 24 | Coexisting of Android and Robots | Hasan Hosgel
annotation types part 1

! @Inject
   ! standard Guice annotation
! @InjectView(resId)
   ! inject views after „setContentView()“ in „onCreate()“
! @InjectResource(resId)
   ! inject resource in „onCreate()“
! @InjectExtra(extraName)
   ! inject extra only in „onCreate()“ NOT „onNewIntent()“
! @InjectPreference(keyName)
   ! reads preference by keyName
! @InjectFragment(resId, tagName)
   ! inject the fragment to the resId with the tagName

Seite 25 | Coexisting of Android and Robots | Hasan Hosgel
annotation types part 2

! @ContentView(resId)
   ! set layout for activity/ fragment
! @Named(valueName)
   ! with the valueName a specific configuration can be
           done
! no annotation but related Provider<T>
   ! asynchronous injection, if the creation is expensive and
           not always used. The method #get() can be used




Seite 26 | Coexisting of Android and Robots | Hasan Hosgel
RoboGuiced activity




Seite 27 | Coexisting of Android and Robots | Hasan Hosgel
Normal activity



                                                             for comparison




Seite 28 | Coexisting of Android and Robots | Hasan Hosgel
RoboGuiced activity




                                                             much better &
                                                             clearer




Seite 29 | Coexisting of Android and Robots | Hasan Hosgel
RoboGuice in Action




Seite 30 | Coexisting of Android and Robots | Hasan Hosgel
RoboGuice in Action




                         Live Coding...




Seite 31 | Coexisting of Android and Robots | Hasan Hosgel
Robotium


       Test Framework for
       Android

       similar to Selenium/
       WebTest

       actual version 3.2.1




Seite 32 | Coexisting of Android and Robots | Hasan Hosgel
What you need for Robotium?


       robotium-solo-3.2.1

         extend from
         ActivityInstrumentationTestCase2

       instanciate Solo

          finishInactiveActivities &
          finishOpenedActivities on solo in
          teardown
Seite 33 | Coexisting of Android and Robots | Hasan Hosgel
What you can do with Robotium?

!   remote run of application/ black box tests
!   click on view
!   long click on view
!   scroll
!   search for text and view
!   wait for text and view
!   enter text
!   send keys


! configure sleeper/ waiter? NO è use fork
    https://github.com/alosdev/robotium




Seite 34 | Coexisting of Android and Robots | Hasan Hosgel
Robotium in Action




Seite 35 | Coexisting of Android and Robots | Hasan Hosgel
Robotium in Action




                         Live Coding...




Seite 36 | Coexisting of Android and Robots | Hasan Hosgel
Why this fuss?

! clearer structure/ better API
! better testable/ test automation
! state of the art è proven in production (@IS24 since more
    than 1 year)
! good for libraries

           use RoboGuice & Robotium for Android




Seite 37 | Coexisting of Android and Robots | Hasan Hosgel
Dive into the topic & sources

! github with sample project of presentation:
    ! https://github.com/alosdev/amu-roboguice
! slideshare:
    ! http://www.slideshare.net/hosgel/coexisting-of-
           android-robots
! RoboGuice:
   ! http://roboguice.org/
! Robotium:
   ! http://robotium.org/
! deeper look into RoboGuice:
   ! http://www.blog.project13.pl/wp-content/uploads/
           2011/12/presentation.html



Seite 38 | Coexisting of Android and Robots | Hasan Hosgel
Thanks for your
attention! Questions?




               http://www.flickr.com/photos/peterjlambert/97671748/sizes/o/in/photostream/
www.immobilienscout24.de

Vielen Dank für Ihre
Aufmerksamkeit!

Kontakt:
ImmobilienScout24          Fon:   030/24301-11 00
Andreasstraße 10           Email: info@immobilienscout24.de.
10243 Berlin               URL: www.immobilienscout24.de

Contenu connexe

En vedette

Administracion del tiempo y realizacion personal
Administracion del tiempo y realizacion personalAdministracion del tiempo y realizacion personal
Administracion del tiempo y realizacion personalMonroy Asesores, S.C.
 
Cine Forum Wes Anderson Villarrubia de los Ojos
Cine Forum Wes Anderson Villarrubia de los OjosCine Forum Wes Anderson Villarrubia de los Ojos
Cine Forum Wes Anderson Villarrubia de los OjosAndrés Romero Montero
 
Photovoltaik – Produktionstechnik und Technologie im Wandel der Zeit
Photovoltaik – Produktionstechnik und Technologie im Wandel der ZeitPhotovoltaik – Produktionstechnik und Technologie im Wandel der Zeit
Photovoltaik – Produktionstechnik und Technologie im Wandel der Zeitengineeringzhaw
 
MonetizacióN 2.0 3dic09 (Marta Dominguez)
MonetizacióN 2.0   3dic09  (Marta Dominguez)MonetizacióN 2.0   3dic09  (Marta Dominguez)
MonetizacióN 2.0 3dic09 (Marta Dominguez)Marta Dominguez
 
Investment proposal for sustainable energy project
Investment proposal for sustainable energy projectInvestment proposal for sustainable energy project
Investment proposal for sustainable energy projectAnuron Technologies
 
Trastorno antisocial de la personalidad
Trastorno antisocial de la personalidadTrastorno antisocial de la personalidad
Trastorno antisocial de la personalidadDiego Neyra
 
Procesos para llegar a la calidad total
Procesos para llegar a la calidad totalProcesos para llegar a la calidad total
Procesos para llegar a la calidad totalAndres Rodriguez
 
Arquitecturas empresariales para Ingenieros de Sistemas/Informáticos/de Software
Arquitecturas empresariales para Ingenieros de Sistemas/Informáticos/de SoftwareArquitecturas empresariales para Ingenieros de Sistemas/Informáticos/de Software
Arquitecturas empresariales para Ingenieros de Sistemas/Informáticos/de SoftwareMarta Silvia Tabares
 
Distribucion comercial colgate palmolive.
Distribucion comercial colgate palmolive.Distribucion comercial colgate palmolive.
Distribucion comercial colgate palmolive.Daianna Reyes
 
Electrodinamica.
Electrodinamica.Electrodinamica.
Electrodinamica.garnan68
 
Geofisica agua
Geofisica aguaGeofisica agua
Geofisica aguawpachecoe
 

En vedette (14)

Administracion del tiempo y realizacion personal
Administracion del tiempo y realizacion personalAdministracion del tiempo y realizacion personal
Administracion del tiempo y realizacion personal
 
MANTENER EL CEREBRO SIEMPRE JOVEN
MANTENER EL CEREBRO SIEMPRE JOVENMANTENER EL CEREBRO SIEMPRE JOVEN
MANTENER EL CEREBRO SIEMPRE JOVEN
 
Cine Forum Wes Anderson Villarrubia de los Ojos
Cine Forum Wes Anderson Villarrubia de los OjosCine Forum Wes Anderson Villarrubia de los Ojos
Cine Forum Wes Anderson Villarrubia de los Ojos
 
Photovoltaik – Produktionstechnik und Technologie im Wandel der Zeit
Photovoltaik – Produktionstechnik und Technologie im Wandel der ZeitPhotovoltaik – Produktionstechnik und Technologie im Wandel der Zeit
Photovoltaik – Produktionstechnik und Technologie im Wandel der Zeit
 
Waste management presentation
Waste management presentationWaste management presentation
Waste management presentation
 
MonetizacióN 2.0 3dic09 (Marta Dominguez)
MonetizacióN 2.0   3dic09  (Marta Dominguez)MonetizacióN 2.0   3dic09  (Marta Dominguez)
MonetizacióN 2.0 3dic09 (Marta Dominguez)
 
Investment proposal for sustainable energy project
Investment proposal for sustainable energy projectInvestment proposal for sustainable energy project
Investment proposal for sustainable energy project
 
Trastorno antisocial de la personalidad
Trastorno antisocial de la personalidadTrastorno antisocial de la personalidad
Trastorno antisocial de la personalidad
 
Procesos para llegar a la calidad total
Procesos para llegar a la calidad totalProcesos para llegar a la calidad total
Procesos para llegar a la calidad total
 
Los Flip Flops
Los Flip FlopsLos Flip Flops
Los Flip Flops
 
Arquitecturas empresariales para Ingenieros de Sistemas/Informáticos/de Software
Arquitecturas empresariales para Ingenieros de Sistemas/Informáticos/de SoftwareArquitecturas empresariales para Ingenieros de Sistemas/Informáticos/de Software
Arquitecturas empresariales para Ingenieros de Sistemas/Informáticos/de Software
 
Distribucion comercial colgate palmolive.
Distribucion comercial colgate palmolive.Distribucion comercial colgate palmolive.
Distribucion comercial colgate palmolive.
 
Electrodinamica.
Electrodinamica.Electrodinamica.
Electrodinamica.
 
Geofisica agua
Geofisica aguaGeofisica agua
Geofisica agua
 

Similaire à Coexisting of Android & Robots

iOS & Android App Indexing & App Actions
iOS & Android App Indexing & App ActionsiOS & Android App Indexing & App Actions
iOS & Android App Indexing & App ActionsJustin Briggs
 
Why hybrid-is-important
Why hybrid-is-importantWhy hybrid-is-important
Why hybrid-is-importantJacob Nelson
 
Holidu Android Instant App
Holidu Android Instant AppHolidu Android Instant App
Holidu Android Instant AppAndrei Boeru
 
Bringing the Ruby language into the mobile world
Bringing the Ruby language into the mobile worldBringing the Ruby language into the mobile world
Bringing the Ruby language into the mobile worldLaurent Sansonetti
 
Android Developer Days 2013 - MultiDevice Nightmare
Android Developer Days 2013 - MultiDevice NightmareAndroid Developer Days 2013 - MultiDevice Nightmare
Android Developer Days 2013 - MultiDevice NightmareHasan Hosgel
 
Hybrid application development
Hybrid application developmentHybrid application development
Hybrid application developmentKnoldus Inc.
 
Instant app Intro
Instant app IntroInstant app Intro
Instant app IntroJintin Lin
 
DroidCon 2011: Developing HTML5 and hybrid Android apps using Phonegap
DroidCon 2011: Developing HTML5 and hybrid Android apps using PhonegapDroidCon 2011: Developing HTML5 and hybrid Android apps using Phonegap
DroidCon 2011: Developing HTML5 and hybrid Android apps using PhonegapAyushman Jain
 
Supercharge your Android UI
Supercharge your Android UISupercharge your Android UI
Supercharge your Android UIinovex GmbH
 
Project Flogo: An Event-Driven Stack for the Enterprise
Project Flogo: An Event-Driven Stack for the EnterpriseProject Flogo: An Event-Driven Stack for the Enterprise
Project Flogo: An Event-Driven Stack for the EnterpriseLeon Stigter
 
Vahid Garousi-SE meets robotics
Vahid Garousi-SE meets roboticsVahid Garousi-SE meets robotics
Vahid Garousi-SE meets roboticsVahid Garousi
 
Tools to Use in Android Development Or iOS Development.pdf
Tools to Use in Android Development Or iOS Development.pdfTools to Use in Android Development Or iOS Development.pdf
Tools to Use in Android Development Or iOS Development.pdfTechnology News & Updates
 
Mobile applications in a new way with React Native
Mobile applications in a new way with React NativeMobile applications in a new way with React Native
Mobile applications in a new way with React NativeEugene Zharkov
 
Mobile applications in a new way with React Native (by Eugene Zharkov) - Hack...
Mobile applications in a new way with React Native (by Eugene Zharkov) - Hack...Mobile applications in a new way with React Native (by Eugene Zharkov) - Hack...
Mobile applications in a new way with React Native (by Eugene Zharkov) - Hack...Intersog
 
Comparisons react native vs. flutter vs. ionic vs. xamarin vs. native script
Comparisons  react native vs. flutter vs. ionic vs. xamarin vs. native scriptComparisons  react native vs. flutter vs. ionic vs. xamarin vs. native script
Comparisons react native vs. flutter vs. ionic vs. xamarin vs. native scriptMoonTechnolabsPvtLtd
 
The Best Alternatives To The Ionic Framework.pdf
The Best Alternatives To The Ionic Framework.pdfThe Best Alternatives To The Ionic Framework.pdf
The Best Alternatives To The Ionic Framework.pdfMoon Technolabs Pvt. Ltd.
 
Cross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic FrameworkCross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic FrameworkTroy Miles
 

Similaire à Coexisting of Android & Robots (20)

iOS & Android App Indexing & App Actions
iOS & Android App Indexing & App ActionsiOS & Android App Indexing & App Actions
iOS & Android App Indexing & App Actions
 
HealthyCodeMay2014
HealthyCodeMay2014HealthyCodeMay2014
HealthyCodeMay2014
 
Why hybrid-is-important
Why hybrid-is-importantWhy hybrid-is-important
Why hybrid-is-important
 
Holidu Android Instant App
Holidu Android Instant AppHolidu Android Instant App
Holidu Android Instant App
 
Android Minnebar
Android MinnebarAndroid Minnebar
Android Minnebar
 
Bringing the Ruby language into the mobile world
Bringing the Ruby language into the mobile worldBringing the Ruby language into the mobile world
Bringing the Ruby language into the mobile world
 
Android development first steps
Android development   first stepsAndroid development   first steps
Android development first steps
 
Android Developer Days 2013 - MultiDevice Nightmare
Android Developer Days 2013 - MultiDevice NightmareAndroid Developer Days 2013 - MultiDevice Nightmare
Android Developer Days 2013 - MultiDevice Nightmare
 
Hybrid application development
Hybrid application developmentHybrid application development
Hybrid application development
 
Instant app Intro
Instant app IntroInstant app Intro
Instant app Intro
 
DroidCon 2011: Developing HTML5 and hybrid Android apps using Phonegap
DroidCon 2011: Developing HTML5 and hybrid Android apps using PhonegapDroidCon 2011: Developing HTML5 and hybrid Android apps using Phonegap
DroidCon 2011: Developing HTML5 and hybrid Android apps using Phonegap
 
Supercharge your Android UI
Supercharge your Android UISupercharge your Android UI
Supercharge your Android UI
 
Project Flogo: An Event-Driven Stack for the Enterprise
Project Flogo: An Event-Driven Stack for the EnterpriseProject Flogo: An Event-Driven Stack for the Enterprise
Project Flogo: An Event-Driven Stack for the Enterprise
 
Vahid Garousi-SE meets robotics
Vahid Garousi-SE meets roboticsVahid Garousi-SE meets robotics
Vahid Garousi-SE meets robotics
 
Tools to Use in Android Development Or iOS Development.pdf
Tools to Use in Android Development Or iOS Development.pdfTools to Use in Android Development Or iOS Development.pdf
Tools to Use in Android Development Or iOS Development.pdf
 
Mobile applications in a new way with React Native
Mobile applications in a new way with React NativeMobile applications in a new way with React Native
Mobile applications in a new way with React Native
 
Mobile applications in a new way with React Native (by Eugene Zharkov) - Hack...
Mobile applications in a new way with React Native (by Eugene Zharkov) - Hack...Mobile applications in a new way with React Native (by Eugene Zharkov) - Hack...
Mobile applications in a new way with React Native (by Eugene Zharkov) - Hack...
 
Comparisons react native vs. flutter vs. ionic vs. xamarin vs. native script
Comparisons  react native vs. flutter vs. ionic vs. xamarin vs. native scriptComparisons  react native vs. flutter vs. ionic vs. xamarin vs. native script
Comparisons react native vs. flutter vs. ionic vs. xamarin vs. native script
 
The Best Alternatives To The Ionic Framework.pdf
The Best Alternatives To The Ionic Framework.pdfThe Best Alternatives To The Ionic Framework.pdf
The Best Alternatives To The Ionic Framework.pdf
 
Cross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic FrameworkCross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic Framework
 

Plus de Hasan Hosgel

DevFest Istanbul 2014 - Developing for the Big Screen - from Android TV to Ch...
DevFest Istanbul 2014 - Developing for the Big Screen - from Android TV to Ch...DevFest Istanbul 2014 - Developing for the Big Screen - from Android TV to Ch...
DevFest Istanbul 2014 - Developing for the Big Screen - from Android TV to Ch...Hasan Hosgel
 
Android Developer Days 2014 How second screen can enhance your app
Android Developer Days 2014 How second screen can enhance your appAndroid Developer Days 2014 How second screen can enhance your app
Android Developer Days 2014 How second screen can enhance your appHasan Hosgel
 
Mtc spring 2014 best practices to develop for different android device classi...
Mtc spring 2014 best practices to develop for different android device classi...Mtc spring 2014 best practices to develop for different android device classi...
Mtc spring 2014 best practices to develop for different android device classi...Hasan Hosgel
 
Droidcon it 2014 best practices to develop for different android device class...
Droidcon it 2014 best practices to develop for different android device class...Droidcon it 2014 best practices to develop for different android device class...
Droidcon it 2014 best practices to develop for different android device class...Hasan Hosgel
 
Droidcon nl 2013 best practices to develop for different android device class...
Droidcon nl 2013 best practices to develop for different android device class...Droidcon nl 2013 best practices to develop for different android device class...
Droidcon nl 2013 best practices to develop for different android device class...Hasan Hosgel
 
MTC 2013 Berlin - Best Practices for Multi Devices
MTC 2013 Berlin - Best Practices for Multi DevicesMTC 2013 Berlin - Best Practices for Multi Devices
MTC 2013 Berlin - Best Practices for Multi DevicesHasan Hosgel
 
Droidcon 2013 Multidevice Nightmare
Droidcon 2013 Multidevice NightmareDroidcon 2013 Multidevice Nightmare
Droidcon 2013 Multidevice NightmareHasan Hosgel
 
Android bootcamp 2013 Lists & Adapter
Android bootcamp 2013 Lists & AdapterAndroid bootcamp 2013 Lists & Adapter
Android bootcamp 2013 Lists & AdapterHasan Hosgel
 
Customer's Choice @ Moosecon 2013
Customer's Choice @ Moosecon 2013Customer's Choice @ Moosecon 2013
Customer's Choice @ Moosecon 2013Hasan Hosgel
 
Customer&rsquo;s Choice @ GDG Android Berlin on January meetup
Customer&rsquo;s Choice @ GDG Android Berlin on January meetupCustomer&rsquo;s Choice @ GDG Android Berlin on January meetup
Customer&rsquo;s Choice @ GDG Android Berlin on January meetupHasan Hosgel
 
Continuously Break The Android
Continuously Break The AndroidContinuously Break The Android
Continuously Break The AndroidHasan Hosgel
 
Mobile Development across Different Platforms @ Immobilienscout24
Mobile Development across Different Platforms @ Immobilienscout24Mobile Development across Different Platforms @ Immobilienscout24
Mobile Development across Different Platforms @ Immobilienscout24Hasan Hosgel
 

Plus de Hasan Hosgel (12)

DevFest Istanbul 2014 - Developing for the Big Screen - from Android TV to Ch...
DevFest Istanbul 2014 - Developing for the Big Screen - from Android TV to Ch...DevFest Istanbul 2014 - Developing for the Big Screen - from Android TV to Ch...
DevFest Istanbul 2014 - Developing for the Big Screen - from Android TV to Ch...
 
Android Developer Days 2014 How second screen can enhance your app
Android Developer Days 2014 How second screen can enhance your appAndroid Developer Days 2014 How second screen can enhance your app
Android Developer Days 2014 How second screen can enhance your app
 
Mtc spring 2014 best practices to develop for different android device classi...
Mtc spring 2014 best practices to develop for different android device classi...Mtc spring 2014 best practices to develop for different android device classi...
Mtc spring 2014 best practices to develop for different android device classi...
 
Droidcon it 2014 best practices to develop for different android device class...
Droidcon it 2014 best practices to develop for different android device class...Droidcon it 2014 best practices to develop for different android device class...
Droidcon it 2014 best practices to develop for different android device class...
 
Droidcon nl 2013 best practices to develop for different android device class...
Droidcon nl 2013 best practices to develop for different android device class...Droidcon nl 2013 best practices to develop for different android device class...
Droidcon nl 2013 best practices to develop for different android device class...
 
MTC 2013 Berlin - Best Practices for Multi Devices
MTC 2013 Berlin - Best Practices for Multi DevicesMTC 2013 Berlin - Best Practices for Multi Devices
MTC 2013 Berlin - Best Practices for Multi Devices
 
Droidcon 2013 Multidevice Nightmare
Droidcon 2013 Multidevice NightmareDroidcon 2013 Multidevice Nightmare
Droidcon 2013 Multidevice Nightmare
 
Android bootcamp 2013 Lists & Adapter
Android bootcamp 2013 Lists & AdapterAndroid bootcamp 2013 Lists & Adapter
Android bootcamp 2013 Lists & Adapter
 
Customer's Choice @ Moosecon 2013
Customer's Choice @ Moosecon 2013Customer's Choice @ Moosecon 2013
Customer's Choice @ Moosecon 2013
 
Customer&rsquo;s Choice @ GDG Android Berlin on January meetup
Customer&rsquo;s Choice @ GDG Android Berlin on January meetupCustomer&rsquo;s Choice @ GDG Android Berlin on January meetup
Customer&rsquo;s Choice @ GDG Android Berlin on January meetup
 
Continuously Break The Android
Continuously Break The AndroidContinuously Break The Android
Continuously Break The Android
 
Mobile Development across Different Platforms @ Immobilienscout24
Mobile Development across Different Platforms @ Immobilienscout24Mobile Development across Different Platforms @ Immobilienscout24
Mobile Development across Different Platforms @ Immobilienscout24
 

Dernier

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 

Dernier (20)

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 

Coexisting of Android & Robots

  • 1. www.immobilienscout24.de Coexisting of Android and Robots Introduction to RoboGuice & Robotium Android Meetup Berlin | 30.05.2012 | Hasan Hosgel
  • 2. About me www.immobilienscout24.de Hasan Hoşgel Twitter: @alosdev Github: alosdev G+: Hasan Hosgel Senior Developer Mobile enthusiast, Man of action
  • 3. Germany‘s leading ImmobilienScout24 real-estate portal 550 employees, 160 in the IT Seite | Coexisting of Android and Robots | 3 Hasan Hosgel
  • 4. Germany‘s leading ImmobilienScout24 real-estate portal 550 employees, > 7.5 Million unique users 160 in the IT > 2 Billion PI > 260 Million Expose views ~ 1.5 Million active listings > 110,000 Vendors ... per month > 3 Mio App-Downloads Seite | Coexisting of Android and Robots | 4 Hasan Hosgel
  • 5. Germany‘s leading ImmobilienScout24 real-estate portal 550 employees, > 7.5 Million unique users 160 in the IT > 2 Billion PI 2 datacenter > 260 Million Expose views ~100 physical ~ 1.5 Million active listings ~800 virtual > 110,000 Vendors ... machines ... per month > 3 Mio App-Downloads Seite | Coexisting of Android and Robots | 5 Hasan Hosgel
  • 6. Normal activity Seite 6 | Coexisting of Android and Robots | Hasan Hosgel
  • 7. Normal activity do you like it? Seite 7 | Coexisting of Android and Robots | Hasan Hosgel
  • 8. Normal activity do you like it? a lot of boilerplate code Seite 8 | Coexisting of Android and Robots | Hasan Hosgel
  • 9. How to avoid this? Seite 9 | Coexisting of Android and Robots | Hasan Hosgel
  • 10. How to avoid this? as the talk subject says RoboGuice Seite 10 | Coexisting of Android and Robots | Hasan Hosgel
  • 11. RoboGuice DI & IOC Framework for Android Source: http://roboguice.org Seite 11 | Coexisting of Android and Robots | Hasan Hosgel
  • 12. RoboGuice DI & IOC Framework for Android based on Google Guice no AOP (JSR-330 compatible) Source: http://roboguice.org Seite 12 | Coexisting of Android and Robots | Hasan Hosgel
  • 13. RoboGuice DI & IOC Framework for Android based on Google Guice no AOP (JSR-330 compatible) actual version 2.0 Source: http://roboguice.org Seite 13 | Coexisting of Android and Robots | Hasan Hosgel
  • 14. definition IOC & DI source: http://wikipedia.com In software engineering, Inversion of Control (IoC) is an object-oriented programming practice whereby the object coupling is bound at run time by an "assembler" object and is typically not knowable at compile time using static analysis. Dependency injection is a software design pattern that allows a choice of component to be made at run-time rather than compile time. This can be used, for example, as a simple way to load plugins dynamically or to choose mock objects in test environments vs. real objects in production environments. Seite 14 | Coexisting of Android and Robots | Hasan Hosgel
  • 15. definition IOC & DI source: http://wikipedia.com In software engineering, Inversion of Control (IoC) is an object-oriented programming practice whereby the object coupling is bound at run time by an "assembler" object and is typically not knowable at compile time using static analysis. Dependency injection is a software design pattern that allows a choice of component to be made at run-time rather than compile time. This can be used, for example, as a simple way to load plugins dynamically or to choose mock objects in test environments vs. real objects in production environments. Spring Google Guice EJB (> 3.0) JBoss Seam Seite 15 | Coexisting of Android and Robots | Hasan Hosgel
  • 16. What you need for RoboGuice? Android project RoboGuice 2.0 Guice 3.0 no AOP javax.inject Seite 16 | Coexisting of Android and Robots | Hasan Hosgel
  • 17. Configuration extend Robo* classes Seite 17 | Coexisting of Android and Robots | Hasan Hosgel
  • 18. Configuration extend Robo* classes create roboguice_modules.xml Seite 18 | Coexisting of Android and Robots | Hasan Hosgel
  • 19. Configuration extend Robo* classes create roboguice_modules.xml create your AbstractModule Seite 19 | Coexisting of Android and Robots | Hasan Hosgel
  • 20. Configuration extend Robo* classes create roboguice_modules.xml create your AbstractModule configure the module in the xml Seite 20 | Coexisting of Android and Robots | Hasan Hosgel
  • 21. Injection Types Seite 21 | Coexisting of Android and Robots | Hasan Hosgel
  • 22. Injection Types member injection Seite 22 | Coexisting of Android and Robots | Hasan Hosgel
  • 23. Injection Types member injection setter injection Seite 23 | Coexisting of Android and Robots | Hasan Hosgel
  • 24. injection types member injection setter injection constructor injection Seite 24 | Coexisting of Android and Robots | Hasan Hosgel
  • 25. annotation types part 1 ! @Inject ! standard Guice annotation ! @InjectView(resId) ! inject views after „setContentView()“ in „onCreate()“ ! @InjectResource(resId) ! inject resource in „onCreate()“ ! @InjectExtra(extraName) ! inject extra only in „onCreate()“ NOT „onNewIntent()“ ! @InjectPreference(keyName) ! reads preference by keyName ! @InjectFragment(resId, tagName) ! inject the fragment to the resId with the tagName Seite 25 | Coexisting of Android and Robots | Hasan Hosgel
  • 26. annotation types part 2 ! @ContentView(resId) ! set layout for activity/ fragment ! @Named(valueName) ! with the valueName a specific configuration can be done ! no annotation but related Provider<T> ! asynchronous injection, if the creation is expensive and not always used. The method #get() can be used Seite 26 | Coexisting of Android and Robots | Hasan Hosgel
  • 27. RoboGuiced activity Seite 27 | Coexisting of Android and Robots | Hasan Hosgel
  • 28. Normal activity for comparison Seite 28 | Coexisting of Android and Robots | Hasan Hosgel
  • 29. RoboGuiced activity much better & clearer Seite 29 | Coexisting of Android and Robots | Hasan Hosgel
  • 30. RoboGuice in Action Seite 30 | Coexisting of Android and Robots | Hasan Hosgel
  • 31. RoboGuice in Action Live Coding... Seite 31 | Coexisting of Android and Robots | Hasan Hosgel
  • 32. Robotium Test Framework for Android similar to Selenium/ WebTest actual version 3.2.1 Seite 32 | Coexisting of Android and Robots | Hasan Hosgel
  • 33. What you need for Robotium? robotium-solo-3.2.1 extend from ActivityInstrumentationTestCase2 instanciate Solo finishInactiveActivities & finishOpenedActivities on solo in teardown Seite 33 | Coexisting of Android and Robots | Hasan Hosgel
  • 34. What you can do with Robotium? ! remote run of application/ black box tests ! click on view ! long click on view ! scroll ! search for text and view ! wait for text and view ! enter text ! send keys ! configure sleeper/ waiter? NO è use fork https://github.com/alosdev/robotium Seite 34 | Coexisting of Android and Robots | Hasan Hosgel
  • 35. Robotium in Action Seite 35 | Coexisting of Android and Robots | Hasan Hosgel
  • 36. Robotium in Action Live Coding... Seite 36 | Coexisting of Android and Robots | Hasan Hosgel
  • 37. Why this fuss? ! clearer structure/ better API ! better testable/ test automation ! state of the art è proven in production (@IS24 since more than 1 year) ! good for libraries use RoboGuice & Robotium for Android Seite 37 | Coexisting of Android and Robots | Hasan Hosgel
  • 38. Dive into the topic & sources ! github with sample project of presentation: ! https://github.com/alosdev/amu-roboguice ! slideshare: ! http://www.slideshare.net/hosgel/coexisting-of- android-robots ! RoboGuice: ! http://roboguice.org/ ! Robotium: ! http://robotium.org/ ! deeper look into RoboGuice: ! http://www.blog.project13.pl/wp-content/uploads/ 2011/12/presentation.html Seite 38 | Coexisting of Android and Robots | Hasan Hosgel
  • 39. Thanks for your attention! Questions? http://www.flickr.com/photos/peterjlambert/97671748/sizes/o/in/photostream/
  • 40. www.immobilienscout24.de Vielen Dank für Ihre Aufmerksamkeit! Kontakt: ImmobilienScout24 Fon: 030/24301-11 00 Andreasstraße 10 Email: info@immobilienscout24.de. 10243 Berlin URL: www.immobilienscout24.de