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

サーバーサイドKotlinのすすめ(仮)

noripi
June 14, 2017

 サーバーサイドKotlinのすすめ(仮)

2017.06.14 【トクバイ×Retty×Gunosy】ビール片手にKotlinを語る会 で使用したスライドです。

noripi

June 14, 2017
Tweet

More Decks by noripi

Other Decks in Technology

Transcript

  1. αʔόαΠυͰ,PUMJOΛ࢖ͬͯΈͯײͨ͜͡ͱΑ͍ͱ͜Ζ  ɾαʔόαΠυͰ࢖ͬͯಛʹศརͩͬͨػೳ val restaurant: Restaurant = RestaurantModel.get(id)
 val station:

    Station? = RestaurantModel .getNearestStation(id)
 restaurant.nearestStation = station /6--ڐ༰ܕ ɾTFSJBMJ[F͞ΕͯΫϥΠΞϯτʹ౤͛Δܕ͸/6--ڐ༰͔Ͳ͏͔΋ॏཁ data class Restaurant(val id: Long, val name: String, var station: Station?) ɾ/6--ڐ༰͔Ͳ͏͔͸ίϯύΠϥͰνΣοΫ͞ΕΔ
  2. αʔόαΠυͰ,PUMJOΛ࢖ͬͯΈͯײͨ͜͡ͱΑ͍ͱ͜Ζ  ɾαʔόαΠυͰ࢖ͬͯಛʹศརͩͬͨػೳ EBUBDMBTTͱܧঝ ,PUMJOd ɾTFSJBMJ[Fର৅ͷܕΛେྔʹ࡞ΔͱɺLFZʹදهΏΕ͕ى͖΍͍͢ͷͰ
 ɹΑ͘࢖͏LFZΛJOUFSGBDFͰఆٛͯ͠ܧঝ͢Δ data class Restaurant(override

    val restaurantId: Long, 
 override val restaurantName: String, var station: Station?): IRestaurantInfo interface IRestaurantInfo { @JsonProperty(“restaurant_id”) val restaurantId: Long @JsonProperty(“restaurant_name”) val restaurantName: String }