SlideShare una empresa de Scribd logo
1 de 56
Descargar para leer sin conexión
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

Más contenido relacionado

Similar 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
 

Similar 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
 

Más 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
 

Más 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

Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dashnarutouzumaki53779
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 

Último (20)

Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
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
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dash
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 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