Android Development :
Approach For Agile Teams
                      Anay Kamat
          Consultant/Co-Founder
 PresentSoft Technologies Pvt. Ltd.


 Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
Android
•   A great mobile platform
•   Easy to learn SDK
•   Lot of apps
•   But…




           Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
How many iOS based devices do you know?




    Now count the number of Android devices..

        Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
And then there are client
             expectations!
• Android as a silver bullet
• Mobiles devices have smaller screens, thus
  app development should be simple
• Static & Dynamic apps.. WHAT??
• UI has to be fancy or should match the theme
  of their web app.



         Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
Development Anti-Patterns
• Most consider Android to be something like
  iOS clone
  – Often forget the existence of concepts like
    “Intent”
• Most of the code is for fancy UI including
  layouts and images for different screens and
  orientations
• XML for purpose other than data transfer or
  data markup

         Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
Android is not iOS clone
• Android supports collaboration between apps
• Android port of iOS app should be same as the
  original iOS app… WHY??




         Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
Layout design with XML is good
But..
  – XML was not created for that purpose
  – Too verbose
  – Does not directly interact with logical behavior
        • Compare “rake” with “ant”
  – Difficult to refactor




             Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
Fancy UI
• Consider Windows and OSX applications
  – They use standard UI libraries provided by the OS
  – Feature rich
  – Makes it easier to use new application due to
    familiar UI concepts
• Fancy UI for mobile app
  – Requires more development efforts
  – Adds learning curve for the user


         Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
All this adds to development
                complexity
• Difficult to be Agile while developing
  completely native application
• Alternative: Hybrid Approach
  – Native code (Java): To power business logic and
    backend services
  – HTML &Javascript: For UI
  – This makes refactoring easy for both UI and
    backend.

         Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
Java
•   Tried and trusted
•   Object oriented
•   Powers lot of enterprise applications
•   But makes it difficult to write event based
    code
    – For e.g GUI Applications




           Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
Javascript
• Has some OO features
• Great functional language
• Good for developing event based UI apps




         Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
HTML & CSS
• Already in widespread use for building fancy
  web UIs
• HTML5 takes it even further




         Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
But what about performance?
• Works great unless you are building games
  involving heavy graphics




         Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
Example
• Lets take a look at a sample hybrid application
  developed using Forge (Trigger.io)
  – https://github.com/trigger-corp/forge-template-
    list-and-detail




         Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
Observation
• Can help to quickly build hybrid apps with
  Fancy UI
• But the file size of final APK is 2.9 MB
• What if we don’t make use of frameworks like
  Forge/PhoneGap?
  – Use the same HTML/CSS and JS
  – Write your own JS bridge



         Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
Observation
• Took around 4 hours to develop underlying
  native bridge
• APK file size : 93 KB (WOW)




         Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
Final approach
• Develop your great application using tools like
  Forge/PhoneGap
  – This ensures quick turnaround
  – Existing talent and agile practices could be used
• Optimize it further (if required) using custom
  native bridge




         Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
What’s next?
• Continuous integration
• Automated function tests




         Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
Thank You

About me
– Consultant/Co-Founder at PresentSoft Technologies Pvt. Ltd.
– Creator of Programming Language for students
   • https://github.com/kamatanay/MayaLanguage
– Twitter: @kamatanay
– Email:anay@presentsoft.co.in
– Company Home Page: http://www.prsentsoft.co.in
– Personal Home Page: http://www.anaykamat.com

         Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.

Android Development: Approach for Agile Teams

  • 1.
    Android Development : ApproachFor Agile Teams Anay Kamat Consultant/Co-Founder PresentSoft Technologies Pvt. Ltd. Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 2.
    Android • A great mobile platform • Easy to learn SDK • Lot of apps • But… Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 3.
    How many iOSbased devices do you know? Now count the number of Android devices.. Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 4.
    And then thereare client expectations! • Android as a silver bullet • Mobiles devices have smaller screens, thus app development should be simple • Static & Dynamic apps.. WHAT?? • UI has to be fancy or should match the theme of their web app. Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 5.
    Development Anti-Patterns • Mostconsider Android to be something like iOS clone – Often forget the existence of concepts like “Intent” • Most of the code is for fancy UI including layouts and images for different screens and orientations • XML for purpose other than data transfer or data markup Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 6.
    Android is notiOS clone • Android supports collaboration between apps • Android port of iOS app should be same as the original iOS app… WHY?? Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 7.
    Layout design withXML is good But.. – XML was not created for that purpose – Too verbose – Does not directly interact with logical behavior • Compare “rake” with “ant” – Difficult to refactor Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 8.
    Fancy UI • ConsiderWindows and OSX applications – They use standard UI libraries provided by the OS – Feature rich – Makes it easier to use new application due to familiar UI concepts • Fancy UI for mobile app – Requires more development efforts – Adds learning curve for the user Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 9.
    Copyright © 2007-2012PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 10.
    All this addsto development complexity • Difficult to be Agile while developing completely native application • Alternative: Hybrid Approach – Native code (Java): To power business logic and backend services – HTML &Javascript: For UI – This makes refactoring easy for both UI and backend. Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 11.
    Java • Tried and trusted • Object oriented • Powers lot of enterprise applications • But makes it difficult to write event based code – For e.g GUI Applications Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 12.
    Javascript • Has someOO features • Great functional language • Good for developing event based UI apps Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 13.
    HTML & CSS •Already in widespread use for building fancy web UIs • HTML5 takes it even further Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 14.
    But what aboutperformance? • Works great unless you are building games involving heavy graphics Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 15.
    Example • Lets takea look at a sample hybrid application developed using Forge (Trigger.io) – https://github.com/trigger-corp/forge-template- list-and-detail Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 16.
    Copyright © 2007-2012PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 17.
    Copyright © 2007-2012PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 18.
    Copyright © 2007-2012PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 19.
    Copyright © 2007-2012PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 20.
    Observation • Can helpto quickly build hybrid apps with Fancy UI • But the file size of final APK is 2.9 MB • What if we don’t make use of frameworks like Forge/PhoneGap? – Use the same HTML/CSS and JS – Write your own JS bridge Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 21.
    Copyright © 2007-2012PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 22.
    Copyright © 2007-2012PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 23.
    Copyright © 2007-2012PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 24.
    Copyright © 2007-2012PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 25.
    Observation • Took around4 hours to develop underlying native bridge • APK file size : 93 KB (WOW) Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 26.
    Final approach • Developyour great application using tools like Forge/PhoneGap – This ensures quick turnaround – Existing talent and agile practices could be used • Optimize it further (if required) using custom native bridge Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 27.
    What’s next? • Continuousintegration • Automated function tests Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.
  • 28.
    Thank You About me –Consultant/Co-Founder at PresentSoft Technologies Pvt. Ltd. – Creator of Programming Language for students • https://github.com/kamatanay/MayaLanguage – Twitter: @kamatanay – Email:anay@presentsoft.co.in – Company Home Page: http://www.prsentsoft.co.in – Personal Home Page: http://www.anaykamat.com Copyright © 2007-2012 PresentSoft Technologies Pvt. Ltd., All Rights Reserved.