SlideShare a Scribd company logo
Android - A Practitioner's take on doing it The Agile Way Thiyagu, Krishna, Soundar, Ashwin
Can we run an Android Application Development Project the Agile Way?
As a practitioner, what are the effects of the Technical Stack on the process?
How can I follow the 'Extreme Programming' Practices?
As ThoughtWorks why can we expect Android Projects?
Enterprises are looking for a Mobile Presence
Mostly CRUD Applications though.
Then Why a native app over a Web App?
Native Applications are much more enabled than a web application 
etc.....
But why Android?
Steep increase in the user  base
Lots of new Vendors
So as ThoughtWorks, why have this capability?
We want to build something cool !
Disclaimer
Why is this not just a Java Project?
When you’re working with Android, it sure feels like you are writing regular old standard Java SE code
You are not!!
So what is the difference? Its the runtime!!!!
In the Android platform, we have the Dalvik Runtime which is specially designed for devices that are contrained in terms of memory, speed and battery power.
Dalvik is not even a Java Virtual Machine at all!
It does not understand byte code. Instead...
It understands Dex Code
Everything you need as a programmer is available in the Dalvik implementation of Java
Why do I mention all this?
Because you might want to use something like JMock to mock your dependencies when writing your unit tests
Its not a full Java SE implementation
 
Test Driven Development
The Application to be tested must/needs to run on a device instance
Any entity that aims to test the Android Application must be on the device instance as well
So the test in itself is Another Application!
Android Testing and Instrumentation
public class LoginActivity extends Activity       /* declarations of states*/          @Override     public void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.login);              loginButton = (Button) findViewById(R.id.login_login_button);         usernameText = (TextView) findViewById(R.id.user_name_input);         passwordText = (TextView)findViewById(R.id.pass_word_input);                   loginButton.setOnClickListener(new OnClickListener() {              public void onClick(View v) {                 String username = usernameText.getText().toString();                 String password = passwordText.getText().toString();                 MyApplication.getLoginService().login(username, password);             }         });     } }
public class LoginActivityTest extends ActivityUnitTestCase<LoginActivity> {      public LoginActivityTest() {           super(LoginActivity.class);      }        protected void setUp() throws Exception {           super.setUp();          ...      }     /* Other tests for testing whether the button and text box exists*/      public void testOnClickOfLoginButtonItShouldSendUserNameAndPassWordToLoginServiceForVerifying() {          String userName = &quot;rapidftr&quot;;          userNameEditText.setText(userName);          String passWord = &quot;rapidftr&quot;;          passWordEditText.setText(passWord);            LoginService loginService = EasyMock.createMock(LoginService.class);          EasyMock.expect(loginService.login(userName, passWord)).andReturn(true);          EasyMock.replay(loginService);            RapidFTRApplication.setLoginService(loginService);                   loginButton.performClick();                    EasyMock.verify(loginService);      } }
Does the service Locator Pattern Seem like a bad idea?
Ensure that your Mocking Framework is supported by the Dalvik VM
The problem with easy mock .... Mocking Concrete Classes
So can we clean up this mockery?
Split the code into 2 types: 1.Android Framework Dependent  2.Android Framework Independent
Over Engineering the code is Dangerous.
ActivityInstrumentationTestCase    
Continuous Integration
Android Debugger Bridge adb install, -r, standup-timer-app.apk
The Testing Application and the Application under test are deployed on the same device instance
Android Maven Plugin  &Ant Script     Android SDK Path Platform Used Device Instance to use
<plugin>                    <groupId>com.jayway.maven.plugins.android.generation2</groupId>                    <artifactId>maven-android-plugin</artifactId>                    <version>2.5.1</version>                    <configuration>                        <sdk>                             <path>android_sdk</path>                            <platform>7</platform>                        </sdk>                        <emulator>                            <avd>my_avd</avd>                        </emulator>                        <deleteConflictingFiles>                             true                        </deleteConflictingFiles>                        <undeployBeforeDeploy>true</undeployBeforeDeploy>                    </configuration>                    <extensions>true</extensions>    </plugin>
Independent parts of the build
     // start tracing to &quot;/sdcard/calc.trace&quot;     Debug.startMethodTracing(&quot;calc&quot;);     // ...     // stop tracing     Debug.stopMethodTracing();
 
 
Time for Demo

More Related Content

What's hot (19)

PPTX
SwtBot: Unit Testing Made Easy
Ankit Goel
 
PDF
AngularJS for Beginners
Edureka!
 
ODP
Developing and testing ajax components
Ignacio Coloma
 
PDF
Efficient JavaScript Unit Testing, May 2012
Hazem Saleh
 
PDF
Selenium Overview
Abhijeet Vaikar
 
DOCX
Angular.js interview questions
codeandyou forums
 
PPT
21 android2 updated
GhanaGTUG
 
PDF
Langkah-langkah Instalasi software untuk develop aplikasi android
Agus Haryanto
 
PDF
Angular js interview question answer for fresher
Ravi Bhadauria
 
ODP
Passo a Passo para criar uma aplicação Móvel Híbrida
Juliano Martins
 
PDF
Night Watch with QA
Carsten Sandtner
 
PDF
High Performance JavaScript 2011
Nicholas Zakas
 
ODP
Desenvolvimento Mobile Híbrido
Juliano Martins
 
PPTX
Working Software Over Comprehensive Documentation
Andrii Dzynia
 
PDF
Angularjs interview questions and answers
Anil Singh
 
PDF
Use React Patterns to Build Large Scalable App
Yao Nien Chung
 
PPTX
Automate testing with behat, selenium, phantom js and nightwatch.js (5)
Faichi Solutions
 
PDF
Enhance react app with patterns - part 1: higher order component
Yao Nien Chung
 
PPT
Strutsjspservlet
Sagar Nakul
 
SwtBot: Unit Testing Made Easy
Ankit Goel
 
AngularJS for Beginners
Edureka!
 
Developing and testing ajax components
Ignacio Coloma
 
Efficient JavaScript Unit Testing, May 2012
Hazem Saleh
 
Selenium Overview
Abhijeet Vaikar
 
Angular.js interview questions
codeandyou forums
 
21 android2 updated
GhanaGTUG
 
Langkah-langkah Instalasi software untuk develop aplikasi android
Agus Haryanto
 
Angular js interview question answer for fresher
Ravi Bhadauria
 
Passo a Passo para criar uma aplicação Móvel Híbrida
Juliano Martins
 
Night Watch with QA
Carsten Sandtner
 
High Performance JavaScript 2011
Nicholas Zakas
 
Desenvolvimento Mobile Híbrido
Juliano Martins
 
Working Software Over Comprehensive Documentation
Andrii Dzynia
 
Angularjs interview questions and answers
Anil Singh
 
Use React Patterns to Build Large Scalable App
Yao Nien Chung
 
Automate testing with behat, selenium, phantom js and nightwatch.js (5)
Faichi Solutions
 
Enhance react app with patterns - part 1: higher order component
Yao Nien Chung
 
Strutsjspservlet
Sagar Nakul
 

Viewers also liked (6)

PPTX
Social Networking
guest79e62de
 
PPTX
Social Networking
Debarghya Chanda
 
DOC
Corey King
Jack ver Mieten
 
PDF
Introduction to Social Media
Kelsey Ruger
 
PDF
Social Networking Presentation
Anusorn Kansap
 
PPT
Social networking PPT
varun0912
 
Social Networking
guest79e62de
 
Social Networking
Debarghya Chanda
 
Corey King
Jack ver Mieten
 
Introduction to Social Media
Kelsey Ruger
 
Social Networking Presentation
Anusorn Kansap
 
Social networking PPT
varun0912
 
Ad

Similar to Android the Agile way (20)

PPT
Struts,Jsp,Servlet
dasguptahirak
 
PPT
Strutsjspservlet
Sagar Nakul
 
PDF
Migrating from Struts 1 to Struts 2
Matt Raible
 
PPT
Code Quality Practice and Tools
Bob Paulin
 
PPT
Jsfsunum
cagataycivici
 
PPT
Migration testing framework
IndicThreads
 
ODP
jBPM5 in action - a quickstart for developers
Kris Verlaenen
 
PPT
Developing in android
Christopher Decker
 
PDF
Going web native
Marcus Hellberg
 
ODP
ActiveWeb: Chicago Java User Group Presentation
ipolevoy
 
PPTX
Introduction to JSF
SoftServe
 
PPT
Automated Testing Of Web Applications Using XML
diongillard
 
PPTX
J Query Presentation
Vishal Kumar
 
PPTX
Building apps for multiple devices
Terry Ryan
 
PPTX
Alfresco Forms Service Deep Dive
Alfresco Software
 
PPTX
Windows Azure - Cloud Service Development Best Practices
Sriram Krishnan
 
PPTX
Introduction To Google Android (Ft Rohan Bomle)
Fafadia Tech
 
PDF
Vaadin DevDay 2017 - DI your UI
Peter Lehto
 
PPTX
Xam expertday
Codrina Merigo
 
PDF
1 aleksandr gritsevski - attd example using
Ievgenii Katsan
 
Struts,Jsp,Servlet
dasguptahirak
 
Strutsjspservlet
Sagar Nakul
 
Migrating from Struts 1 to Struts 2
Matt Raible
 
Code Quality Practice and Tools
Bob Paulin
 
Jsfsunum
cagataycivici
 
Migration testing framework
IndicThreads
 
jBPM5 in action - a quickstart for developers
Kris Verlaenen
 
Developing in android
Christopher Decker
 
Going web native
Marcus Hellberg
 
ActiveWeb: Chicago Java User Group Presentation
ipolevoy
 
Introduction to JSF
SoftServe
 
Automated Testing Of Web Applications Using XML
diongillard
 
J Query Presentation
Vishal Kumar
 
Building apps for multiple devices
Terry Ryan
 
Alfresco Forms Service Deep Dive
Alfresco Software
 
Windows Azure - Cloud Service Development Best Practices
Sriram Krishnan
 
Introduction To Google Android (Ft Rohan Bomle)
Fafadia Tech
 
Vaadin DevDay 2017 - DI your UI
Peter Lehto
 
Xam expertday
Codrina Merigo
 
1 aleksandr gritsevski - attd example using
Ievgenii Katsan
 
Ad

Recently uploaded (20)

PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PPTX
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
July Patch Tuesday
Ivanti
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
July Patch Tuesday
Ivanti
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 

Android the Agile way

  • 1. Android - A Practitioner's take on doing it The Agile Way Thiyagu, Krishna, Soundar, Ashwin
  • 2. Can we run an Android Application Development Project the Agile Way?
  • 3. As a practitioner, what are the effects of the Technical Stack on the process?
  • 4. How can I follow the 'Extreme Programming' Practices?
  • 5. As ThoughtWorks why can we expect Android Projects?
  • 6. Enterprises are looking for a Mobile Presence
  • 8. Then Why a native app over a Web App?
  • 9. Native Applications are much more enabled than a web application 
  • 12. Steep increase in the user  base
  • 13. Lots of new Vendors
  • 14. So as ThoughtWorks, why have this capability?
  • 15. We want to build something cool !
  • 17. Why is this not just a Java Project?
  • 18. When you’re working with Android, it sure feels like you are writing regular old standard Java SE code
  • 20. So what is the difference? Its the runtime!!!!
  • 21. In the Android platform, we have the Dalvik Runtime which is specially designed for devices that are contrained in terms of memory, speed and battery power.
  • 22. Dalvik is not even a Java Virtual Machine at all!
  • 23. It does not understand byte code. Instead...
  • 25. Everything you need as a programmer is available in the Dalvik implementation of Java
  • 26. Why do I mention all this?
  • 27. Because you might want to use something like JMock to mock your dependencies when writing your unit tests
  • 28. Its not a full Java SE implementation
  • 29.  
  • 31. The Application to be tested must/needs to run on a device instance
  • 32. Any entity that aims to test the Android Application must be on the device instance as well
  • 33. So the test in itself is Another Application!
  • 34. Android Testing and Instrumentation
  • 35. public class LoginActivity extends Activity       /* declarations of states*/          @Override     public void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.login);              loginButton = (Button) findViewById(R.id.login_login_button);         usernameText = (TextView) findViewById(R.id.user_name_input);         passwordText = (TextView)findViewById(R.id.pass_word_input);                   loginButton.setOnClickListener(new OnClickListener() {              public void onClick(View v) {                 String username = usernameText.getText().toString();                 String password = passwordText.getText().toString();                 MyApplication.getLoginService().login(username, password);             }         });     } }
  • 36. public class LoginActivityTest extends ActivityUnitTestCase<LoginActivity> {     public LoginActivityTest() {         super(LoginActivity.class);     }       protected void setUp() throws Exception {         super.setUp();         ...     }    /* Other tests for testing whether the button and text box exists*/     public void testOnClickOfLoginButtonItShouldSendUserNameAndPassWordToLoginServiceForVerifying() {          String userName = &quot;rapidftr&quot;;         userNameEditText.setText(userName);          String passWord = &quot;rapidftr&quot;;         passWordEditText.setText(passWord);           LoginService loginService = EasyMock.createMock(LoginService.class);         EasyMock.expect(loginService.login(userName, passWord)).andReturn(true);         EasyMock.replay(loginService);           RapidFTRApplication.setLoginService(loginService);                  loginButton.performClick();                  EasyMock.verify(loginService);      } }
  • 37. Does the service Locator Pattern Seem like a bad idea?
  • 38. Ensure that your Mocking Framework is supported by the Dalvik VM
  • 39. The problem with easy mock .... Mocking Concrete Classes
  • 40. So can we clean up this mockery?
  • 41. Split the code into 2 types: 1.Android Framework Dependent  2.Android Framework Independent
  • 42. Over Engineering the code is Dangerous.
  • 45. Android Debugger Bridge adb install, -r, standup-timer-app.apk
  • 46. The Testing Application and the Application under test are deployed on the same device instance
  • 47. Android Maven Plugin  &Ant Script     Android SDK Path Platform Used Device Instance to use
  • 48. <plugin>                    <groupId>com.jayway.maven.plugins.android.generation2</groupId>                    <artifactId>maven-android-plugin</artifactId>                    <version>2.5.1</version>                    <configuration>                        <sdk>                             <path>android_sdk</path>                            <platform>7</platform>                        </sdk>                        <emulator>                            <avd>my_avd</avd>                        </emulator>                        <deleteConflictingFiles>                             true                        </deleteConflictingFiles>                        <undeployBeforeDeploy>true</undeployBeforeDeploy>                    </configuration>                    <extensions>true</extensions>    </plugin>
  • 49. Independent parts of the build
  • 50.     // start tracing to &quot;/sdcard/calc.trace&quot;     Debug.startMethodTracing(&quot;calc&quot;);     // ...     // stop tracing     Debug.stopMethodTracing();
  • 51.  
  • 52.