コードをどまんなかに据えた設計アプローチ

7919a30bc59113c94f31676158cb5881?s=47 irof
December 15, 2018

 コードをどまんなかに据えた設計アプローチ

JJUG CCC 2018 Fall
2018-12-15T16:45+09:00
#ccc_e6
http://www.java-users.jp/ccc2018fall

7919a30bc59113c94f31676158cb5881?s=128

irof

December 15, 2018
Tweet

Transcript

  1. 27.
  2. 77.

    class ShipIdentifier { String value; public ShipIdentifier() { value =

    UUID.randomUUID().toString(); } ... } ધ͸*%Ͱࣝผ͞ΕΔɻ ൪߸ମܥ͸66*%ɻ ੜ੒Օॴ͸ίϯετϥΫλͷࢀরɻ ࢖༻Օॴ͸Ϋϥεࢀরɻ
  3. 80.

    String sheetTypeCode = "1"; sheet_type_code | name ================|======= 1 |

    ࣗ༝੮ 2 | ࢦఆ੮ 3 | άϦʔϯ੮ Α͘ݟΔίʔυͱ%#ͷ૊Έ߹Θͤ
  4. 87.

    ShopIdentifier shopId = ... SchoolIdentifier schoolId = new SchoolIdentifier( shopId.toString());

    γϣοϓͱεΫʔϧΛѻ͏ۀ຿ɻ γϣοϓʹεΫʔϧΛซઃ͢Δ৔߹ ͸ಉ͡*%Λ࢖͏Α͏͕ͩɺຒ΋Ε ͯ͠·͏ɻ
  5. 89.

    class Name { ... } School school = new School(name);

    User employee = new User(name); ܕΛ࡞Δҙຯ͕ͳ͍ɻ ֶߍ໊ͱϢʔβʔ໊͕ಉ͡ͱ ͍͏ۀ຿ͳΒਖ਼͍͕͠ʜʜ
  6. 110.

    ίʔυ͕Ͳ·Μͳ͔ʹ͋Ε͹ ޾ͤʹͳΔΑ wίʔσΟϯά͸ͨ͘͞ΜঝೝཉٻΛຬ ͨͯ͘͠ΕΔɻ w ίϯύΠϧ௨ͬͨɻ w ςετ௨ͬͨɻ w ಈ͍ͨɻ

    w ͔ͯλΠϓͯ͠Δ͚ͩͰ΋ɻολʔϯɻ wίʔυॻ͘ͷָ͍͔͠ΒɺίʔυΛॻ ͘͜ͱΛਖ਼౰ԽɻͦΜͳΞϓϩʔνɻ