SlideShare une entreprise Scribd logo
1  sur  56
Télécharger pour lire hors ligne
building


                            More With Less
                                       with android bootstrap




Wednesday, February 6, 13
@donnfelker



Wednesday, February 6, 13
Wednesday, February 6, 13
Building More With Less




Wednesday, February 6, 13
agenda




                                     open source
                                     libraries
                                     examples
                                     bootstrap




Wednesday, February 6, 13
Wednesday, February 6, 13
Pay with Square   GitHub   Gaug.es




Wednesday, February 6, 13
tons of open source


                            tons of integration work




Wednesday, February 6, 13
open source

                                          roboguice
                                          action bar sherlock
                                          http-request
                                          gson
                                          view pager indicator
                                          robotium
                                          maven
                                          android maven plugin
                                          fragments




Wednesday, February 6, 13
roboguice.org




                            roboguice
                            dependency injection
                            for android




Wednesday, February 6, 13
roboguice.org




                            class RoboWay extends RoboActivity {
                                @InjectView(R.id.name)             TextView name;
                                @InjectView(R.id.thumbnail)        ImageView thumbnail;
                                @InjectResource(R.drawable.icon)   Drawable icon;
                                @InjectResource(R.string.app_name) String myName;
                                @Inject                            LocationManager loc;

                                    public void onCreate(Bundle savedInstanceState) {
                                        super.onCreate(savedInstanceState);
                                        setContentView(R.layout.main);
                                        name.setText( "Hello, " + myName );
                                    }
                            }




Wednesday, February 6, 13
roboguice.org




                                      User Interface


                                       Service Layer
                                                                                                  ng
                                                                                      ee d a stri
                                                                             at if I n             ?
                                                                          wh
                                                                                       do wn here
                                                                           r esource
                                   Persistence Layer




                            service layer: goo.gl/7NQVZ   persistence layer: goo.gl/j5u74
Wednesday, February 6, 13
roboguice.org




                            public class UserRepository {

                                @InjectResource(R.string.public_key) String publicKey;

                                public void saveProfile(UserProfile profile) {
                                    // user publicKey to do some encryption
                                    // Now, save the encrypted profile to db/api/etc
                                }
                            }




Wednesday, February 6, 13
roboguice.org




                            public class UserRepository {

                                @InjectResource(R.string.public_key) String publicKey;
                                @Inject protected AuthService authService;

                                public   void saveProfile(UserProfile profile) {
                                    //   Get auth token from auth service then save
                                    //   user publicKey to do some encryption
                                    //   Now, save the encrypted profile to api
                                }
                            }




Wednesday, February 6, 13
roboguice.org




                            must extend




                                          RoboActivity
                                          RoboListActivity
                                          RoboFragmentActivity
                                          RoboListFragmentActivity
                                          ...




Wednesday, February 6, 13
roboguice.org




Wednesday, February 6, 13
actionbarsherlock.com




                            action bar sherlock
                            action bar support for pre 3.x




Wednesday, February 6, 13
actionbarsherlock.com



                            Pay with Square   GitHub      Gaug.es




Wednesday, February 6, 13
actionbarsherlock.com




Wednesday, February 6, 13
actionbarsherlock.com




                            usage



                                    getSupportActionBar()

                                    native calls

                                    supports theming

                                    must use Sherlock themes
                                    as parent




Wednesday, February 6, 13
actionbarsherlock.com




                            must extend




                                          SherlockActivity
                                          SherlockListActivity
                                          SherlockFragmentActivity
                                          SherlockListFragmentActivity
                                          ...




Wednesday, February 6, 13
actionbarsherlock.com




                                             ruh roh.
                            roboguice and actionbarsherlock must both extend activity




Wednesday, February 6, 13
github.com/rtyley/roboguice-sherlock




                            roboguice-sherlock
                             combines roboguice and sherlock




Wednesday, February 6, 13
github.com/rtyley/roboguice-sherlock



                            public	
  class	
  CarouselActivity	
  extends	
  RoboSherlockFragmentActivity	
  {

                            	
  	
  	
  	
  @InjectView(id.tpi_header)	
  private	
  TitlePageIndicator	
  indicator;
                            	
  	
  	
  	
  @InjectView(id.vp_pages)	
  private	
  ViewPager	
  pager;

                            	
  	
  	
  	
  @Override
                            	
  	
  	
  	
  protected	
  void	
  onCreate(Bundle	
  savedInstanceState)	
  {

                            	
  	
  	
  	
  	
  	
  	
  	
  requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);

                            	
  	
  	
  	
  	
  	
  	
  	
  super.onCreate(savedInstanceState);
                            	
  	
  	
  	
  	
  	
  	
  	
  setContentView(R.layout.carousel_view);

                            	
  	
  	
  	
  	
  	
  	
  	
  pager.setAdapter(new	
  BootstrapPagerAdapter(getResources(),	
  getSupportFragmentManager()));

                            	
  	
  	
  	
  	
  	
  	
  	
  indicator.setViewPager(pager);
                            	
  	
  	
  	
  	
  	
  	
  	
  pager.setCurrentItem(1);
                            	
  	
  	
  	
  }


                            }




Wednesday, February 6, 13
github.com/rtyley/roboguice-sherlock




Wednesday, February 6, 13
kevinsawicki.github.com/http-request/




                                           http-request
                            A simple convenience library for using a HttpURLConnection to make requests and
                                                           access the response.




Wednesday, February 6, 13
kevinsawicki.github.com/http-request/




Wednesday, February 6, 13
kevinsawicki.github.com/http-request/




Wednesday, February 6, 13
Wednesday, February 6, 13
kevinsawicki.github.com/http-request/




Wednesday, February 6, 13
code.google.com/p/google-gson/




                                   gson
                            a library for working with json




Wednesday, February 6, 13
code.google.com/p/google-gson/
                            a pojo
                              class	
  BagOfPrimitives	
  {
                              	
  	
  private	
  int	
  value1	
  =	
  1;
                              	
  	
  private	
  String	
  value2	
  =	
  "abc";
                              	
  	
  private	
  transient	
  int	
  value3	
  =	
  3;
                              	
  	
  BagOfPrimitives()	
  {
                              	
  	
  	
  	
  //	
  no-­‐args	
  constructor
                              	
  	
  }
                              }




                             serialization
                              BagOfPrimitives	
  obj	
  =	
  new	
  BagOfPrimitives();
                              Gson	
  gson	
  =	
  new	
  Gson();
                              String	
  json	
  =	
  gson.toJson(obj);	
  



                              deserialization
                               BagOfPrimitives	
  obj2	
  =	
  gson.fromJson(json,	
  BagOfPrimitives.class);



Wednesday, February 6, 13
code.google.com/p/google-gson/




                            woohoo! no more manual json parsing




Wednesday, February 6, 13
code.google.com/p/google-gson/




Wednesday, February 6, 13
viewpagerindicator.com




                            view pager indicator




Wednesday, February 6, 13
viewpagerindicator.com




Wednesday, February 6, 13
viewpagerindicator.com




Wednesday, February 6, 13
viewpagerindicator.com




Wednesday, February 6, 13
code.google.com/p/maven-android-plugin/




                              android-maven-plugin
                            an easy to use maven plugin for android




Wednesday, February 6, 13
<project	
  xmlns="http://maven.apache.org/POM/4.0.0"	
  
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-­‐instance"	
  
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0	
  http://maven.apache.org/maven-­‐v4_0_0.xsd">
  	
  	
  	
  	
  <modelVersion>4.0.0</modelVersion>

  	
  	
  	
  	
  <artifactId>android-­‐bootstrap</artifactId>
  	
  	
  	
  	
  <packaging>apk</packaging>
  	
  	
  	
  	
  <name>Android	
  Bootstrap	
  app</name>
  	
  	
  	
  	
  <url>https://github.com/donnfelker/android-­‐bootstrap</url>

  	
  	
  	
  	
  <parent>
  	
  	
  	
  	
  	
  	
  	
  	
  <version>1.0</version>
  	
  	
  	
  	
  	
  	
  	
  	
  <groupId>com.donnfelker.android.bootstrap</groupId>
  	
  	
  	
  	
  	
  	
  	
  	
  <artifactId>android-­‐bootstrap-­‐parent</artifactId>
  	
  	
  	
  	
  </parent>

  	
  	
  	
  	
  <properties>
  	
  	
  	
  	
  	
  	
  	
  	
  <abs.version>4.1.0</abs.version>
  	
  	
  	
  	
  </properties>
  	
  	
  	
  	
  <dependencies>
  	
  	
  	
  	
  	
  	
  	
  	
  <dependency>
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  <groupId>com.google.android</groupId>
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  <artifactId>android</artifactId>
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  <scope>provided</scope>
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  <version>${android.version}</version>
  	
  	
  	
  	
  	
  	
  	
  	
  </dependency>
  	
  	
  	
  	
  	
  	
  	
  	
  <dependency>
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  <groupId>com.google.code.gson</groupId>
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  <artifactId>gson</artifactId>
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  <version>2.1</version>
  	
  	
  	
  	
  	
  	
  	
  	
  </dependency>
  	
  	
  	
  	
  	
  	
  	
  	
  <dependency>
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  <groupId>com.github.rtyley</groupId>
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  <artifactId>roboguice-­‐sherlock</artifactId>
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  <version>1.4</version>
  	
  	
  	
  	
  	
  	
  	
  	
  </dependency>
  	
  	
  	
  	
  	
  ...	
  


 	
  	
  	
  	
  	
  	
  	
  	
  <dependency>
 	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  <groupId>com.github.kevinsawicki</groupId>
 	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  <artifactId>wishlist</artifactId>
 	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  <version>0.3</version>
 	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  <type>apklib</type>
 	
  	
  	
  	
  	
  	
  	
  	
  </dependency>
 	
  	
  	
  	
  	
  	
  	
  	
  <dependency>
Wednesday, February 6, 13
code.google.com/p/maven-android-plugin/




                            build process easier to manage




Wednesday, February 6, 13
code.google.com/p/maven-android-plugin/




                            resources




                                        google group

                                        ch14 of sonatype book
                                        goo.gl/3Waf5 (sample next)




Wednesday, February 6, 13
Wednesday, February 6, 13
code.google.com/p/maven-android-plugin/




Wednesday, February 6, 13
fragments android support library




Wednesday, February 6, 13
download from android sdk




Wednesday, February 6, 13
code.google.com/p/robotium




                            “its like selenium, but for android”




Wednesday, February 6, 13
code.google.com/p/robotium
                            public class EditorTest extends
                                            ActivityInstrumentationTestCase2<EditorActivity> {

                              private Solo solo;

                                public EditorTest() {
                                              super("com.test.editor",
                                                              EditorActivity.class);
                                }

                                public void setUp() throws Exception {
                                      solo = new Solo(getInstrumentation(), getActivity());
                                }
                             
                                public void testPreferenceIsSaved() throws Exception {
                             
                                                            solo.sendKey(Solo.MENU);
                                                            solo.clickOnText("More");
                                                            solo.clickOnText("Preferences");
                                                            solo.clickOnText("Edit File Extensions");
                                                            Assert.assertTrue(solo.searchText("rtf"));
                                                         
                                                            solo.clickOnText("txt");
                                                            solo.clearEditText(2);
                                                            solo.enterText(2, "robotium");
                                                            solo.clickOnButton("Save");
                                                            solo.goBack();
                                                            solo.clickOnText("Edit File Extensions");
                                                            Assert.assertTrue(solo.searchText("application/robotium"));
                                                         
                                }

                                 @Override
                                 public void tearDown() throws Exception {
                                      solo.finishOpenedActivities();
                                }
                            }




Wednesday, February 6, 13
code.google.com/p/robotium




Wednesday, February 6, 13
androidbootstrap.com




Wednesday, February 6, 13
Wednesday, February 6, 13
androidbootstrap.com



                            influences are from github and gaug.es

                                        GitHub            Gaug.es




Wednesday, February 6, 13
androidbootstrap.com
                     includes
                                roboguice
                                action bar sherlock
                                http-request
                                gson
                                view pager indicator
                                robotium
                                maven
                                android maven plugin
                                fragments
                                api consumption
                                image downloading
                                image caching
                                cache mechanism
                                pojo support                   ahhhhhh yeah
                                and more...
Wednesday, February 6, 13
androidbootstrap.com




                            uses



                                   template for your next project
                                   use as a reference
                                   a how to tutorial
                                   project MVP bootstrap




Wednesday, February 6, 13
androidbootstrap.com




                            q&a




Wednesday, February 6, 13
Thank You.
                            questions? tweet @donnfelker




Wednesday, February 6, 13

Contenu connexe

Similaire à Building More with Less

Android my Scala @ JFokus 2013
Android my Scala @ JFokus 2013Android my Scala @ JFokus 2013
Android my Scala @ JFokus 2013Konrad Malawski
 
The Backend Side of the Mobile
The Backend Side of the MobileThe Backend Side of the Mobile
The Backend Side of the MobileRodrigo Ayala
 
Open innovation in software means Open Source (2011 remix)
Open innovation in software means Open Source (2011 remix)Open innovation in software means Open Source (2011 remix)
Open innovation in software means Open Source (2011 remix)Bertrand Delacretaz
 
How to write better code: in-depth best practices for writing readable, simpl...
How to write better code: in-depth best practices for writing readable, simpl...How to write better code: in-depth best practices for writing readable, simpl...
How to write better code: in-depth best practices for writing readable, simpl...Oursky
 
How to write better code: in-depth best practices for writing readable, simpl...
How to write better code: in-depth best practices for writing readable, simpl...How to write better code: in-depth best practices for writing readable, simpl...
How to write better code: in-depth best practices for writing readable, simpl...Jane Chung
 
Using Java from Ruby with JRuby IRB
Using Java from Ruby with JRuby IRBUsing Java from Ruby with JRuby IRB
Using Java from Ruby with JRuby IRBHiro Asari
 
Testing Drupal with Ghosts and Gherkin
Testing Drupal  with Ghosts and GherkinTesting Drupal  with Ghosts and Gherkin
Testing Drupal with Ghosts and GherkinPhase2
 
Groovy & Grails: Scripting for Modern Web Applications
Groovy & Grails: Scripting for Modern Web ApplicationsGroovy & Grails: Scripting for Modern Web Applications
Groovy & Grails: Scripting for Modern Web Applicationsrohitnayak
 
O que há de novo no Rails 3 - Ruby on Rails no Mundo Real - 23may2010
O que há de novo no Rails 3 - Ruby on Rails no Mundo Real - 23may2010O que há de novo no Rails 3 - Ruby on Rails no Mundo Real - 23may2010
O que há de novo no Rails 3 - Ruby on Rails no Mundo Real - 23may2010Plataformatec
 
O que há de novo no Rails 3
O que há de novo no Rails 3O que há de novo no Rails 3
O que há de novo no Rails 3Hugo Baraúna
 
Atlassian Groovy Plugins
Atlassian Groovy PluginsAtlassian Groovy Plugins
Atlassian Groovy PluginsPaul King
 
Overview of Android Infrastructure
Overview of Android InfrastructureOverview of Android Infrastructure
Overview of Android InfrastructureAlexey Buzdin
 
Overview of Android Infrastructure
Overview of Android InfrastructureOverview of Android Infrastructure
Overview of Android InfrastructureC.T.Co
 
Functional Reactive Programming in the Netflix API
Functional Reactive Programming in the Netflix APIFunctional Reactive Programming in the Netflix API
Functional Reactive Programming in the Netflix APIC4Media
 
Hotcode 2013: Javascript in a database (Part 2)
Hotcode 2013: Javascript in a database (Part 2)Hotcode 2013: Javascript in a database (Part 2)
Hotcode 2013: Javascript in a database (Part 2)ArangoDB Database
 
Introdução Ruby On Rails
Introdução Ruby On RailsIntrodução Ruby On Rails
Introdução Ruby On RailsLukas Alexandre
 

Similaire à Building More with Less (20)

Android my Scala @ JFokus 2013
Android my Scala @ JFokus 2013Android my Scala @ JFokus 2013
Android my Scala @ JFokus 2013
 
Lightweight javaEE with Guice
Lightweight javaEE with GuiceLightweight javaEE with Guice
Lightweight javaEE with Guice
 
Smartgears
SmartgearsSmartgears
Smartgears
 
The Backend Side of the Mobile
The Backend Side of the MobileThe Backend Side of the Mobile
The Backend Side of the Mobile
 
Open innovation in software means Open Source (2011 remix)
Open innovation in software means Open Source (2011 remix)Open innovation in software means Open Source (2011 remix)
Open innovation in software means Open Source (2011 remix)
 
Rails Intro & Tutorial
Rails Intro & TutorialRails Intro & Tutorial
Rails Intro & Tutorial
 
How to write better code: in-depth best practices for writing readable, simpl...
How to write better code: in-depth best practices for writing readable, simpl...How to write better code: in-depth best practices for writing readable, simpl...
How to write better code: in-depth best practices for writing readable, simpl...
 
How to write better code: in-depth best practices for writing readable, simpl...
How to write better code: in-depth best practices for writing readable, simpl...How to write better code: in-depth best practices for writing readable, simpl...
How to write better code: in-depth best practices for writing readable, simpl...
 
Using Java from Ruby with JRuby IRB
Using Java from Ruby with JRuby IRBUsing Java from Ruby with JRuby IRB
Using Java from Ruby with JRuby IRB
 
Testing Drupal with Ghosts and Gherkin
Testing Drupal  with Ghosts and GherkinTesting Drupal  with Ghosts and Gherkin
Testing Drupal with Ghosts and Gherkin
 
Groovy & Grails: Scripting for Modern Web Applications
Groovy & Grails: Scripting for Modern Web ApplicationsGroovy & Grails: Scripting for Modern Web Applications
Groovy & Grails: Scripting for Modern Web Applications
 
O que há de novo no Rails 3 - Ruby on Rails no Mundo Real - 23may2010
O que há de novo no Rails 3 - Ruby on Rails no Mundo Real - 23may2010O que há de novo no Rails 3 - Ruby on Rails no Mundo Real - 23may2010
O que há de novo no Rails 3 - Ruby on Rails no Mundo Real - 23may2010
 
O que há de novo no Rails 3
O que há de novo no Rails 3O que há de novo no Rails 3
O que há de novo no Rails 3
 
Atlassian Groovy Plugins
Atlassian Groovy PluginsAtlassian Groovy Plugins
Atlassian Groovy Plugins
 
Overview of Android Infrastructure
Overview of Android InfrastructureOverview of Android Infrastructure
Overview of Android Infrastructure
 
Overview of Android Infrastructure
Overview of Android InfrastructureOverview of Android Infrastructure
Overview of Android Infrastructure
 
Functional Reactive Programming in the Netflix API
Functional Reactive Programming in the Netflix APIFunctional Reactive Programming in the Netflix API
Functional Reactive Programming in the Netflix API
 
Hotcode 2013: Javascript in a database (Part 2)
Hotcode 2013: Javascript in a database (Part 2)Hotcode 2013: Javascript in a database (Part 2)
Hotcode 2013: Javascript in a database (Part 2)
 
Introdução Ruby On Rails
Introdução Ruby On RailsIntrodução Ruby On Rails
Introdução Ruby On Rails
 
BEAR (Suday) design
BEAR (Suday) designBEAR (Suday) design
BEAR (Suday) design
 

Plus de donnfelker

Understanding Android Build Variants
Understanding Android Build VariantsUnderstanding Android Build Variants
Understanding Android Build Variantsdonnfelker
 
Building HTTP API's with NodeJS and MongoDB
Building HTTP API's with NodeJS and MongoDBBuilding HTTP API's with NodeJS and MongoDB
Building HTTP API's with NodeJS and MongoDBdonnfelker
 
Whats New in Android
Whats New in AndroidWhats New in Android
Whats New in Androiddonnfelker
 
Android Bootstrap
Android BootstrapAndroid Bootstrap
Android Bootstrapdonnfelker
 
Outsourcing Do's and Don'ts
Outsourcing Do's and Don'tsOutsourcing Do's and Don'ts
Outsourcing Do's and Don'tsdonnfelker
 
Advanced android
Advanced androidAdvanced android
Advanced androiddonnfelker
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Developmentdonnfelker
 
20080531 Intro To Dependency Injection & Inversion Of Control
20080531 Intro To Dependency Injection & Inversion Of Control20080531 Intro To Dependency Injection & Inversion Of Control
20080531 Intro To Dependency Injection & Inversion Of Controldonnfelker
 

Plus de donnfelker (8)

Understanding Android Build Variants
Understanding Android Build VariantsUnderstanding Android Build Variants
Understanding Android Build Variants
 
Building HTTP API's with NodeJS and MongoDB
Building HTTP API's with NodeJS and MongoDBBuilding HTTP API's with NodeJS and MongoDB
Building HTTP API's with NodeJS and MongoDB
 
Whats New in Android
Whats New in AndroidWhats New in Android
Whats New in Android
 
Android Bootstrap
Android BootstrapAndroid Bootstrap
Android Bootstrap
 
Outsourcing Do's and Don'ts
Outsourcing Do's and Don'tsOutsourcing Do's and Don'ts
Outsourcing Do's and Don'ts
 
Advanced android
Advanced androidAdvanced android
Advanced android
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
20080531 Intro To Dependency Injection & Inversion Of Control
20080531 Intro To Dependency Injection & Inversion Of Control20080531 Intro To Dependency Injection & Inversion Of Control
20080531 Intro To Dependency Injection & Inversion Of Control
 

Dernier

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 

Dernier (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Building More with Less

  • 1. building More With Less with android bootstrap Wednesday, February 6, 13
  • 4. Building More With Less Wednesday, February 6, 13
  • 5. agenda open source libraries examples bootstrap Wednesday, February 6, 13
  • 7. Pay with Square GitHub Gaug.es Wednesday, February 6, 13
  • 8. tons of open source tons of integration work Wednesday, February 6, 13
  • 9. open source roboguice action bar sherlock http-request gson view pager indicator robotium maven android maven plugin fragments Wednesday, February 6, 13
  • 10. roboguice.org roboguice dependency injection for android Wednesday, February 6, 13
  • 11. roboguice.org class RoboWay extends RoboActivity {     @InjectView(R.id.name)             TextView name;     @InjectView(R.id.thumbnail)        ImageView thumbnail;     @InjectResource(R.drawable.icon)   Drawable icon;     @InjectResource(R.string.app_name) String myName;     @Inject                            LocationManager loc;     public void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.main);         name.setText( "Hello, " + myName );     } } Wednesday, February 6, 13
  • 12. roboguice.org User Interface Service Layer ng ee d a stri at if I n ? wh do wn here r esource Persistence Layer service layer: goo.gl/7NQVZ persistence layer: goo.gl/j5u74 Wednesday, February 6, 13
  • 13. roboguice.org public class UserRepository {     @InjectResource(R.string.public_key) String publicKey;     public void saveProfile(UserProfile profile) {         // user publicKey to do some encryption // Now, save the encrypted profile to db/api/etc     } } Wednesday, February 6, 13
  • 14. roboguice.org public class UserRepository {     @InjectResource(R.string.public_key) String publicKey;     @Inject protected AuthService authService;     public void saveProfile(UserProfile profile) {         // Get auth token from auth service then save // user publicKey to do some encryption // Now, save the encrypted profile to api     } } Wednesday, February 6, 13
  • 15. roboguice.org must extend RoboActivity RoboListActivity RoboFragmentActivity RoboListFragmentActivity ... Wednesday, February 6, 13
  • 17. actionbarsherlock.com action bar sherlock action bar support for pre 3.x Wednesday, February 6, 13
  • 18. actionbarsherlock.com Pay with Square GitHub Gaug.es Wednesday, February 6, 13
  • 20. actionbarsherlock.com usage getSupportActionBar() native calls supports theming must use Sherlock themes as parent Wednesday, February 6, 13
  • 21. actionbarsherlock.com must extend SherlockActivity SherlockListActivity SherlockFragmentActivity SherlockListFragmentActivity ... Wednesday, February 6, 13
  • 22. actionbarsherlock.com ruh roh. roboguice and actionbarsherlock must both extend activity Wednesday, February 6, 13
  • 23. github.com/rtyley/roboguice-sherlock roboguice-sherlock combines roboguice and sherlock Wednesday, February 6, 13
  • 24. github.com/rtyley/roboguice-sherlock public  class  CarouselActivity  extends  RoboSherlockFragmentActivity  {        @InjectView(id.tpi_header)  private  TitlePageIndicator  indicator;        @InjectView(id.vp_pages)  private  ViewPager  pager;        @Override        protected  void  onCreate(Bundle  savedInstanceState)  {                requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);                super.onCreate(savedInstanceState);                setContentView(R.layout.carousel_view);                pager.setAdapter(new  BootstrapPagerAdapter(getResources(),  getSupportFragmentManager()));                indicator.setViewPager(pager);                pager.setCurrentItem(1);        } } Wednesday, February 6, 13
  • 26. kevinsawicki.github.com/http-request/ http-request A simple convenience library for using a HttpURLConnection to make requests and access the response. Wednesday, February 6, 13
  • 31. code.google.com/p/google-gson/ gson a library for working with json Wednesday, February 6, 13
  • 32. code.google.com/p/google-gson/ a pojo class  BagOfPrimitives  {    private  int  value1  =  1;    private  String  value2  =  "abc";    private  transient  int  value3  =  3;    BagOfPrimitives()  {        //  no-­‐args  constructor    } } serialization BagOfPrimitives  obj  =  new  BagOfPrimitives(); Gson  gson  =  new  Gson(); String  json  =  gson.toJson(obj);   deserialization BagOfPrimitives  obj2  =  gson.fromJson(json,  BagOfPrimitives.class); Wednesday, February 6, 13
  • 33. code.google.com/p/google-gson/ woohoo! no more manual json parsing Wednesday, February 6, 13
  • 35. viewpagerindicator.com view pager indicator Wednesday, February 6, 13
  • 39. code.google.com/p/maven-android-plugin/ android-maven-plugin an easy to use maven plugin for android Wednesday, February 6, 13
  • 40. <project  xmlns="http://maven.apache.org/POM/4.0.0"   xmlns:xsi="http://www.w3.org/2001/XMLSchema-­‐instance"   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0  http://maven.apache.org/maven-­‐v4_0_0.xsd">        <modelVersion>4.0.0</modelVersion>        <artifactId>android-­‐bootstrap</artifactId>        <packaging>apk</packaging>        <name>Android  Bootstrap  app</name>        <url>https://github.com/donnfelker/android-­‐bootstrap</url>        <parent>                <version>1.0</version>                <groupId>com.donnfelker.android.bootstrap</groupId>                <artifactId>android-­‐bootstrap-­‐parent</artifactId>        </parent>        <properties>                <abs.version>4.1.0</abs.version>        </properties>        <dependencies>                <dependency>                        <groupId>com.google.android</groupId>                        <artifactId>android</artifactId>                        <scope>provided</scope>                        <version>${android.version}</version>                </dependency>                <dependency>                        <groupId>com.google.code.gson</groupId>                        <artifactId>gson</artifactId>                        <version>2.1</version>                </dependency>                <dependency>                        <groupId>com.github.rtyley</groupId>                        <artifactId>roboguice-­‐sherlock</artifactId>                        <version>1.4</version>                </dependency>          ...                  <dependency>                        <groupId>com.github.kevinsawicki</groupId>                        <artifactId>wishlist</artifactId>                        <version>0.3</version>                        <type>apklib</type>                </dependency>                <dependency> Wednesday, February 6, 13
  • 41. code.google.com/p/maven-android-plugin/ build process easier to manage Wednesday, February 6, 13
  • 42. code.google.com/p/maven-android-plugin/ resources google group ch14 of sonatype book goo.gl/3Waf5 (sample next) Wednesday, February 6, 13
  • 45. fragments android support library Wednesday, February 6, 13
  • 46. download from android sdk Wednesday, February 6, 13
  • 47. code.google.com/p/robotium “its like selenium, but for android” Wednesday, February 6, 13
  • 48. code.google.com/p/robotium public class EditorTest extends                 ActivityInstrumentationTestCase2<EditorActivity> {   private Solo solo;   public EditorTest() {                 super("com.test.editor",                                 EditorActivity.class);   }   public void setUp() throws Exception {         solo = new Solo(getInstrumentation(), getActivity());   }     public void testPreferenceIsSaved() throws Exception {                   solo.sendKey(Solo.MENU);                 solo.clickOnText("More");                 solo.clickOnText("Preferences");                 solo.clickOnText("Edit File Extensions");                 Assert.assertTrue(solo.searchText("rtf"));                                 solo.clickOnText("txt");                 solo.clearEditText(2);                 solo.enterText(2, "robotium");                 solo.clickOnButton("Save");                 solo.goBack();                 solo.clickOnText("Edit File Extensions");                 Assert.assertTrue(solo.searchText("application/robotium"));                   }    @Override    public void tearDown() throws Exception {         solo.finishOpenedActivities();   } } Wednesday, February 6, 13
  • 52. androidbootstrap.com influences are from github and gaug.es GitHub Gaug.es Wednesday, February 6, 13
  • 53. androidbootstrap.com includes roboguice action bar sherlock http-request gson view pager indicator robotium maven android maven plugin fragments api consumption image downloading image caching cache mechanism pojo support ahhhhhh yeah and more... Wednesday, February 6, 13
  • 54. androidbootstrap.com uses template for your next project use as a reference a how to tutorial project MVP bootstrap Wednesday, February 6, 13
  • 55. androidbootstrap.com q&a Wednesday, February 6, 13
  • 56. Thank You. questions? tweet @donnfelker Wednesday, February 6, 13