SlideShare uma empresa Scribd logo
1 de 56
Baixar para ler offline
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

Mais conteúdo relacionado

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

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

Mais 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
 

Mais 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
 

Último

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
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
 
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
 
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
 
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
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
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
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
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
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
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
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Último (20)

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
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
 
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
 
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
 
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
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
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
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
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
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
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
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 

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