Upgrade to Pro — share decks privately, control downloads, hide ads and more …

agreed-typed

 agreed-typed

2018/10/12 フューチャーアーキテクトとのLTバトルでの、伊藤の講演資料になります

Avatar for Recruit Technologies

Recruit Technologies

October 12, 2018
Tweet

More Decks by Recruit Technologies

Other Decks in Technology

Transcript

  1. APIͷI/Fʹؔ͢Δ໰୊ • ୭͕͍ܾͭΊΔ໰୊ • Backend͕উखʹܾΊͯFront͔Β͸࢖͍ͮΒ͍ (ex, N + 1 http

    requestͳͲ) • ϝϯςφϯεਏ͍໰୊ • DocumentͱͷෆҰகɺͦ΋ͦ΋DocͳͲͳ͍ɺ etc…
  2. Agreed • https://github.com/recruit-tech/agreed • Consumer-Driven Contract&Specification By Exampleͷπʔϧ • APIΛ࢖͏ଆʢFEʣ͕request

    / responseΛJSONͳͲͰ
 ࣗ༝ʹࢦఆͰ͖Δ • FEͷͨΊʹ͸Mock Serverͱͯ͠ৼΔ෣͏ • BEͷͨΊʹ͸E2E testing toolsͱͯ͠ৼΔ෣͏
  3. Agreed fileͷදݱྗͷ໰୊ • Agreed͸FE͕खܰʹmock serverΛཱͯΔͨΊͷ࢓૊Έ • Agreed fileΛਖ਼͘͠ॻ͘͜ͱࣗମ͕೉͍͠ • ex)

    ඞਢɾඇඞਢΛදݱͰ͖ͳ͍, ύϥϝʔλͷൈ͚͕ ݕ஌Ͱ͖ͳ͍ͳͲ • agreedͰrequest / responseΛఆٛͯ͠΋ɺFE/BEͰਖ਼ ͘͠ॲཧͰ͖ͯΔ͔Λ֬ೝ͢Δํ๏͕ͳ͍
  4. Future of API design • Specification by example or 


    Specification by design • Consumer / Producerͷඇରশੑ • ܕͰAPIΛදݱ͠ɺਖ਼౰ੑΛίϯύΠϥ͕ݕূ͢Δ ੈք͕དྷΔ • Haskell servant / Protobuf