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

ginza-ruby-kaigi-01

onigra
August 05, 2017

 ginza-ruby-kaigi-01

onigra

August 05, 2017
Tweet

More Decks by onigra

Other Decks in Technology

Transcript

  1. స৬ͯ͠
 Java + Spring Frameworkʹ৮ΕΔ • ਖ਼֬ʹ͸Spring Boot • Spring

    Boot͸ɺSpring Frameworkͷ͍ͭ͘ ͔ͷϞδϡʔϧΛ౷߹ͯ͠ɺWebΞϓϦ έʔγϣϯΛߏங͠΍ͨ͘͢͠΋ͷ
  2. RubyͰRepository • rom-rb • http://rom-rb.org/ • Ruby Object Mapper •

    HANAMIͷ಺෦Ͱ࢖༻͞Ε͍ͯΔ • http://hanamirb.org/
  3. Adviceͷఆٛ @Aspect @Component public class LoggingAdvice { private static final

    Logger LOGGER = LoggerFactory.getLogger(LoggingAdvice.class); @Before(“com.onigra.springaopsample.aspect.UserPointcut.save()") public void beforeSave(JoinPoint joinPoint) { LOGGER.info("UserRepositoryͷsaveϝιου࣮ߦલʹϩάΛग़ྗ͢Δ"); } }
  4. Spring Framework • ϓϨθϯςʔγϣϯ • View(Template Engine(ThymeLeaf౳)) • Controller(Spring MVC)

    • υϝΠϯ • Service(Spring Core) • Repository(Spring Core) • σʔλιʔε • Template(Spring Data) • ͦΕͧΕͷ૚͔ΒModelΛѻ͏
  5. Ruby on Rails • ϓϨθϯςʔγϣϯ • View(ActionView, View Template Engine(ERB౳))

    • Controller(ActionController) • υϝΠϯ • Model(ActiveRecord, ActiveModel) • σʔλιʔε • Model(ActiveRecord)
  6. 2ͭͷϑϨʔϜϫʔΫΛ
 ൺֱͯ͠ • Rails͸ϢʔεέʔεΛߜͬͯɺׂΓ੾ͬͨઃܭʹ͍ͯ͠Δ • ͦͷ෼ɺϚον͠ͳ͍Ϗδωεཁ݅ʹΑͬͯɺਏΈ͸౰વग़Δ • Spring Framework͸ɺ͸͡Ί͔Β޿͍ϢʔεέʔεʹରԠ͢Δ ͜ͱΛ໨ࢦ͍ͯ͠Δ

    • ෳࡶͳϏδωεཁ݅΍ɺ௕ظతͳ֦ுͷՄೳੑΛߟ͑Δͱɺ Spring Framework͸༏Εͨબ୒ࢶ • ҰํͰɺ͋Β͔͡Ίཧղ͓ͯ͘͠΂͖จ຺ɺ஌͕ࣝଟ͍