Your SlideShare is downloading. ×
DIとトレイとによるAndroid開発の効率化
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

DIとトレイとによるAndroid開発の効率化

1,805
views

Published on

Published in: Technology, News & Politics

0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,805
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
13
Comments
0
Likes
3
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. DIAndroid2011 10⽉月10⽇日 Lab
  • 2. ⾃自⼰己•  ⽇日 Java ⻑⾧長 ( ) Lab edge2.cc•  •  XML SmartDoc (XML⽂文 ) •  Relaxer (XML/Java )•  •  SimpleModeler (Scala DSL ) •  g3 ( )•  •  ⼯工 UML (⽇日 BP) •  ( ) •  Scala (Softbank Creative)
  • 3. •  Modegramming Style ( DSL ) •  http://modegramming.blogspot.com/•  SimpleModeler •  http://code.google.com/p/simplemodeler/•  g3 •  http://code.google.com/p/goldenport3/•  g4 •  https://github.com/asami/goldenport-android-library
  • 4. •  JJUG CCC 2011 Fall •  10⽉月17⽇日(⽉月)   ⽴立立 ⻘青 •  Scala •  http://www.java-users.jp/contents/events/ccc2011fall/ index.html •  http://kokucheese.com/event/index/18473/
  • 5. •  CSV Android (&Rest ) ⽣生
  • 6. g4•  Android (Java) •  DI (Dependency Injection) •  •  ⾮非•  g4 •  •  (loosely coupled) (high coherency) •  •  •  •  (testability)
  • 7. DI(Dependency Injection)•  •  Spring •  Googl Guice •  RoboGuice •  Android⽤用DI •  Guice•  ⼊入 •  •  ⽴立立• 
  • 8. DI ⽅方
  • 9. DIpublic class DemoModule extends GModule { public DemoModule(GContext context) { super(context); } @Override protected void configure() { configure_context(); bind(DemoContext.class).toInstance((DemoContext)gcontext); bind(GErrorModel.class).to(DemoErrorModel.class).in(Singleton.class); bind(GModel.class).to(DemoModel.class).in(Singleton.class); bind(GAgent.class).to(DemoAgent.class).in(Singleton.class); bind(GController.class).to(DemoController.class); bind(IDemoRestDriver.class).to(DemoG3Driver.class); }}
  • 10. DIpublic class CustomerRestViewActivity extends GActivity<DemoController> { @LayoutView(R.id.header) TextView mHeader; @ResourceString(R.string.header) String mHeaderLabel; @ResourceColor(R.color.header) Color mHeaderColor; @IntentExtra("message") String mMessage; public CustomerRestViewActivity() { addTrait(new ListViewTrait()); }…
  • 11. •  Scala⾔言•  Java•  (Scala)class MyListActivity extends Activity with ListViewerclass MyMapActivity extends MapActivity withMyLocationOverlayViewer
  • 12. ⽅方
  • 13. public class CustomerRestViewActivity extends GActivity<DemoController> { @LayoutView(R.id.header) TextView mHeader; @ResourceString(R.string.header) String mHeaderLabel; @ResourceColor(R.color.header) Color mHeaderColor; @IntentExtra("message") String mMessage; public CustomerRestViewActivity() { addTrait(new ListViewTrait()); }…
  • 14. •  DI ⽬目 Android
  • 15. •  DI (Dependency Injection) •  •  g4 Guice•  •  ⽴立立 •  Java⾔言 g4
  • 16. END