SimpleModelerAndroid     ⾃自 ⽣生with g3/g42011   10⽉月15⽇日
•  Modegramming Style (           DSL           )  •  http://modegramming.blogspot.com/•  SimpleModeler  •  http://code.go...
•  JJUG CCC 2011 Fall     •  10⽉月17⽇日(⽉月)   ⽴立立                 ⻘青     •        Scala     •  http://www.java-users.jp/cont...
•  CSV   Android   (&Rest   )   ⽣生
⼊入⼒力力CSVSimpleModeler     Scala DSL   CSV                ⼊入⼒力力 #actor,parts,attrs customer,,name;phone;summary #resource g...
g3
g3class App extends G3Application with UseRecord {   port("/demo") invoke(ds)   val schema_customer = Schema(      AutoIdF...
g4•  Android                       (Java)  •   •  DI (Dependency Injection)  •   •  ⾮非•  g4  •   •            (loosely cou...
DI(Dependency Injection)•      •  Spring     •  Google Guice     •  RoboGuice          •  Android⽤用DI          •  Guice•  ...
DI   ⽅方
DIpublic class DemoModule extends GModule {  public DemoModule(GContext context) {     super(context);  }   @Override   pr...
DIpublic class CustomerRestViewActivity extends     GActivity<DemoController> {  @LayoutView(R.id.header)  TextView mHeade...
•  Scala⾔言•  Java              (Scala)class MyListActivity extends Activity with ListViewerclass MyMapActivity extends Map...
⽅方
public class CustomerRestViewActivity extends GActivity<DemoController> {  @LayoutView(R.id.header)  TextView mHeader;  @R...
•  DI   ⽬目   Android
•  SimpleModeler   •                                                  ⾃自 ⽣生       •                     ⼟土                ...
END
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
×

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

1,118 views

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
1,118
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

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

  1. 1. SimpleModelerAndroid ⾃自 ⽣生with g3/g42011 10⽉月15⽇日
  2. 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. 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. 4. •  CSV Android (&Rest ) ⽣生
  5. 5. ⼊入⼒力力CSVSimpleModeler Scala DSL CSV ⼊入⼒力力 #actor,parts,attrs customer,,name;phone;summary #resource goods,,note #event buy,customer;goods
  6. 6. g3
  7. 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. 8. g4•  Android (Java) •  •  DI (Dependency Injection) •  •  ⾮非•  g4 •  •  (loosely coupled) (high coherency) •  •  •  •  (testability) •  ⾃自 ⽣生 ⽫皿
  9. 9. DI(Dependency Injection)•  •  Spring •  Google Guice •  RoboGuice •  Android⽤用DI •  Guice•  ⼊入 •  •  ⽴立立• 
  10. 10. DI ⽅方
  11. 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. 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. 13. •  Scala⾔言•  Java (Scala)class MyListActivity extends Activity with ListViewerclass MyMapActivity extends MapActivity withMyLocationOverlayViewer
  14. 14. ⽅方
  15. 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. 16. •  DI ⽬目 Android
  17. 17. •  SimpleModeler •  ⾃自 ⽣生 •  ⼟土 ⾃自 ⽣生 •  CSV g3 Android ⽣生•  g4 •  •  ⾮非 •  DI (Dependency Injection) •  •  g4 Guice •  •  ⽴立立 •  Java⾔言 g4
  18. 18. END

×