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
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
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
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
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