Your SlideShare is downloading. ×
0
SimpleModelerによるAndroidアプリ自動生成 with g3/g4
SimpleModelerによるAndroidアプリ自動生成 with g3/g4
SimpleModelerによるAndroidアプリ自動生成 with g3/g4
SimpleModelerによるAndroidアプリ自動生成 with g3/g4
SimpleModelerによるAndroidアプリ自動生成 with g3/g4
SimpleModelerによるAndroidアプリ自動生成 with g3/g4
SimpleModelerによるAndroidアプリ自動生成 with g3/g4
SimpleModelerによるAndroidアプリ自動生成 with g3/g4
SimpleModelerによるAndroidアプリ自動生成 with g3/g4
SimpleModelerによるAndroidアプリ自動生成 with g3/g4
SimpleModelerによるAndroidアプリ自動生成 with g3/g4
SimpleModelerによるAndroidアプリ自動生成 with g3/g4
SimpleModelerによるAndroidアプリ自動生成 with g3/g4
SimpleModelerによるAndroidアプリ自動生成 with g3/g4
SimpleModelerによるAndroidアプリ自動生成 with g3/g4
SimpleModelerによるAndroidアプリ自動生成 with g3/g4
SimpleModelerによるAndroidアプリ自動生成 with g3/g4
SimpleModelerによるAndroidアプリ自動生成 with g3/g4
SimpleModelerによるAndroidアプリ自動生成 with g3/g4
SimpleModelerによるAndroidアプリ自動生成 with g3/g4
SimpleModelerによるAndroidアプリ自動生成 with g3/g4
SimpleModelerによるAndroidアプリ自動生成 with g3/g4
SimpleModelerによるAndroidアプリ自動生成 with g3/g4
SimpleModelerによるAndroidアプリ自動生成 with g3/g4
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

SimpleModelerによるAndroidアプリ自動生成 with g3/g4

865

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
865
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
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. SimpleModelerAndroid ⾃自 ⽣生with g3/g42011 10⽉月15⽇日
  • 2. •  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
  • 3. •  JJUG CCC 2011 Fall •  10⽉月17⽇日(⽉月)   ⽴立立 ⻘青 •  Scala •  http://www.java-users.jp/contents/events/ccc2011fall/ index.html •  http://kokucheese.com/event/index/18473/•  ( 1 ) •  10⽉月29⽇日(⼟土) ( ) •  ⽉月 •  http://atnd.org/events/20884
  • 4. •  CSV Android (&Rest ) ⽣生
  • 5. ⼊入⼒力力CSVSimpleModeler Scala DSL CSV ⼊入⼒力力 #actor,parts,attrs customer,,name;phone;summary #resource goods,,note #event buy,customer;goods
  • 6. g3
  • 7. g3class App extends G3Application with UseRecord { port("/demo") invoke(ds) val schema_customer = Schema( AutoIdField, (name, XString), (summary, XString), SimpleModeler (phone, XString)) ⾃自 ⽣生 val schema_goods = Schema( AutoIdField, (name, XString), (summary, XString), (note, XString)) val schema_buy = Schema( AutoIdField, (dateTime, XDateTime), (customer, XEntityReference(customer)), (goods, XEntityReference(goods))) datastore(ds, RecordClassSpace( RecordClass(customer, schema_customer), RecordClass(goods, schema_goods), RecordClass(buy, schema_buy)))}
  • 8. g4•  Android (Java) •  •  DI (Dependency Injection) •  •  ⾮非•  g4 •  •  (loosely coupled) (high coherency) •  •  •  •  (testability) •  ⾃自 ⽣生 ⽫皿
  • 9. DI(Dependency Injection)•  •  Spring •  Google Guice •  RoboGuice •  Android⽤用DI •  Guice•  ⼊入 •  •  ⽴立立• 
  • 10. DI ⽅方
  • 11. 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); }}
  • 12. 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()); }…
  • 13. •  Scala⾔言•  Java (Scala)class MyListActivity extends Activity with ListViewerclass MyMapActivity extends MapActivity withMyLocationOverlayViewer
  • 14. ⽅方
  • 15. 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()); }…
  • 16. •  DI ⽬目 Android
  • 17. •  SimpleModeler •  ⾃自 ⽣生 •  ⼟土 ⾃自 ⽣生 •  CSV g3 Android ⽣生•  g4 •  •  ⾮非 •  DI (Dependency Injection) •  •  g4 Guice •  •  ⽴立立 •  Java⾔言 g4
  • 18. END

×