Pro Yearly is on sale from $80 to $50! »

A Perl Monger in the Ruby World

A Perl Monger in the Ruby World

@yapcasia 2012

23f4d5d797a91b6d17d627b90b5a42d9?s=128

Kentaro Kuribayashi

September 29, 2012
Tweet

Transcript

  1. Rubyistͷࠃͷ Perl࢖͍ @kentaro ܀ྛ݈ଠ࿠ paperboy&co.

  2. @kentaro ,ZPUPQNॴଐ ΤϯδχΞ 1FSMFS ϧϏʔετ ฐࣾެࣜίϯςϯπ /FX ܀ྛ݈ଠ࿠ paperboy&co.

  3. None
  4. ٕज़ج൫੔උΤϯδχΞ

  5. None
  6. ʊਓਓਓਓਓਓਓਓʊ ʼɹಥવͷRubyԽɹʻ ʉ^Y^Y^Y^Y^Y^Y^ʉ

  7. ͷΜͨΜ ·͚ͭΜ mizzy

  8. None
  9. Kyoto.pm͔Βདྷ·ͨ͠

  10. Kyoto.pm΁Ҡ؅

  11. Cinnamon A Minimalistic Deploy Tool

  12. https://speakerdeck.com/u/kentaro/p/datamapper

  13. ࠷ۙ͸Perlશવॻ͍ͯ ͳ͍ ͨ·ʹίʔυϨ Ϗϡʔ͢Δ͙Β͍

  14. YAPCͷ5γϟπΛ ணͯRubyͷձͰ rubygemsΛDISͬͯ Δࢲͷ༐࢟Ͱ͢ Emacsͷձͳͷʹ Subilme Text2ͷ࿩ ͷΈͷεϥΠυ

  15. ͱ͍͏Θ͚Ͱɺࠓ೔ ͸Perlʹ͸ಛʹؔ܎ ͷͳ͍࿩Λ͠·͢ɻ

  16. ϖύϘͰ͸࠷ ۙͳʹ΍ͬͯ ΔΜͰ͔͢ʁ ͏ʙΜʜͳΜͱ ͍͏͔ɺ͍Ζ͍ ΖͰ͢Ͷʜɻ

  17. Ξ΢τϓοτͷେ੾͞ http://www.flickr.com/photos/timjoyfamily/532089575/

  18. http://www.paperboy.co.jp/recruit/important/

  19. ҰൠԽ ݕূՄ ૑ൃੑ Ξ΢τϓοτ ֎ʹग़͢͜ͱͰ಺෦ࣄ৘ ΛҰൠԽͰ͖Δ Ξ΢τϓοτ͞Εͳ͍͜ ͱʹ͸ݕূ͠Α͏͕ͳ͍ Ξ΢τϓοτͷॏͳΓ߹ ͍͕৽͍͠΋ͷΛੜΉ

  20. ಺޲͖ ֎޲͖ ։ൃ؀ڥ੔උ ։ൃίϛϡχέʔγϣϯ ΞδϟΠϧ։ൃ αʔϏεϦϦʔε ϦʔϯελʔτΞοϓ ٕज़తΞ΢τϓοτ

  21. ։ൃϓϩηεͷվળ http://www.flickr.com/photos/betsyweber/6719452305/

  22. w/@hsbt ྡ੮ͷΔͼΓ͢ͱࢯ

  23. ϦʔϯελʔτΞοϓ εΫϥϜ 91ϓϥΫςΟε ։ൃϓϩηεͷࡾ૚ߏ଄

  24. None
  25. http://www.flickr.com/photos/goodoldsparky/2716165693/ ίϯηϓτΛݻΊΔ

  26. ։ൃऀ ͷͨΊͷ  ϖύϘձٞࣨ JEBOUJQPQ QBQFSCPZDP Ϧʔϯ ελʔτΞοϓ http://blog.kentarok.org/entry/2012/07/10/185408

  27. Build Measure Learn

  28. #.- #.- #.- #.- #.- #.- #VJME .FBTVSF -FBSO όοναΠζ

  29.  αʔϏε։ൃΛՊֶ ࣮ݧͷΑ͏ʹԾઆͱͦ ͷݕূΛ௨ͯ͡ߦ͏͜ ͱ  ·ͣ͸Ծઆݕূͷͨ Ίͷඞཁ࠷খݶͷ੡඼ Λ࡞Δ͜ͱ 

    ԾઆݕূϧʔϓΛͰ ͖Δ͚ͩ଎͘ճ͢͜ͱ
  30. *OUSPEVDUJPOUP -FBO$BOWBT JEBOUJQPQ QBQFSCPZDP  http://www.imi.ie/news-and-events/wp-content/uploads/2011/11/IMI-Ash-Maurya-Running-Lean-Presentation.pdf http://blog.kentarok.org/entry/2012/07/10/185408

  31. http://www.imi.ie/news-and-events/wp-content/uploads/2011/11/IMI-Ash-Maurya-Running-Lean-Presentation.pdf ໰୊  ސ٬  Ձ஋  ղܾ  ޿ใ

     ऩೖ  ࢧग़  ༏Ґ  ݕূ 
  32. None
  33. http://d.hatena.ne.jp/nawoto/20111011/1318303619

  34. https://speakerdeck.com/u/nawoto/p/head-first-inception-deck?slide=11

  35. http://www.flickr.com/photos/cdm/2336025560/ νʔϜͰ։ൃ͢Δ

  36. ϢʔβετʔϦऩू

  37. ϖʔύʔϓϩτλΠϐϯά

  38. εϓϦϯτܭը ϓϩμΫτόοΫϩά εϓϦϯτόοΫϩά

  39. εϓϦϯτϨϏϡʔ

  40. https://speakerdeck.com/u/nawoto/p/head-first-inception-deck?slide=11 ίʔυϨϏϡʔ

  41. ϖΞϓϩάϥϛϯά

  42. https://speakerdeck.com/u/hsbt/p/20120916-sappororubykaigi2012

  43. https://speakerdeck.com/u/hsbt/p/20120916-sappororubykaigi2012?slide=59 αΠΫϧλΠϜ Λ୹ॖ͢Δ

  44. http://www.slideshare.net/startuplessonslearned/2012-05-15-eric-ries-the-lean-startup-pwc-canada ੺ઢ͸։ൃऀʹͱͬͯಛʹॏཁͳࣄ߲

  45. ඇ3VCZͳձࣾͰ ͭͷํ๏ !LFOUBSP ࢓ࣄʹΛ ࣋ͪࠐΉͨΊͷ ܀ྛ݈ଠ࿠ QBQFSCPZDP

  46. ࣗಈԽ ࣮֬ੑ ҆શੑ ଎͍αΠΫϧ capistrano/webistrano chef/puppet tests, more tests continuous

    integration developer sandbox incremental deployment
  47. ։ൃϓϩηε͕ ઃܭΛม͑Δ http://www.flickr.com/photos/wolflawlibrary/4703808270/

  48. ໾ׂ ͱͯ͠ ΰʔϧ Λୡ੒ ͍ͨ͠ɻͦΕ͸ ཧ༝ ͷͨΊͩ ϢʔβετʔϦ

  49. ໾ׂ ͱͯ͠ ΰʔϧ Λୡ੒ ͍ͨ͠ɻͦΕ͸ ཧ༝ ͷͨΊͩ ໾ׂ ͱͯ͠ ΰʔϧ

    Λୡ੒ ͍ͨ͠ɻͦΕ͸ ཧ༝ ͷͨΊͩ ໾ׂ ͱͯ͠ ΰʔϧ Λୡ੒ ͍ͨ͠ɻͦΕ͸ ཧ༝ ͷͨΊͩ M V C
  50. package Controller::Cart; sub create { user->add_cart(params{book_id}); # ... } controllers

    package Controller::Follow; sub create { user->add_follow(params{user_id}); # ... } package Controller::Blog; sub create { user->add_post(params{text}); # ... } package Model::User; sub add_cart { # ... } sub add_follow { # ... } sub add_post { # ... } model Too many methods.
  51. ػೳͱ࣮૷ʹؔ ࿈ੑ͕ͳ͍ Կ͕໰୊͔ ετʔϦͷݟ͑ ͳ͍ઃܭ

  52. “Slim Controller, fat model”, but it’s too fat to be

    a model. ࢀߟ http://lab.ursm.jp/blog/2012/09/17/sapporo-rubykaigi-2012/ Կ͕໰୊͔
  53. DCI Data Context Interaction

  54. “We can translate use case scenarios into algorithms, just in

    time, as new senarios enter the business process. We encode these algorithms directly as role methods.”
  55. None
  56. package Controller::Cart; sub create { my $res = Context::Cart->new( user,

    params{item_id}, )->call; # ... } controller package Context::Cart sub new { my ($class, $user, $item_id) = @_; $user->extend(“Role::Customer”); bless { user => $user, item_id => $item_id, }, $class; } sub call { my $self = shift; $self->{user}->add_cart( $self->{item_id} ); } { package Role::Customer; sub add_cart { ... } } context https://github.com/kentaro/Class-Extendable `$user->extend` is enabled by my experimental module, Class::Extendable.
  57. ໾ׂ ͱͯ͠ ΰʔϧ Λୡ੒ ͍ͨ͠ɻͦΕ͸ ཧ༝ ͷͨΊͩ ໾ׂ ͱͯ͠ ΰʔϧ

    Λୡ੒ ͍ͨ͠ɻͦΕ͸ ཧ༝ ͷͨΊͩ Data + Role context Data + Role ର ର
  58. ετʔϦʔࢦ޲ ͷઃܭ͕Մೳ DCIʹΑͬͯ Too fat model໰ ୊΋ղܾ

  59. ։ൃϓϩηεͱ ੔߹͢Δઃܭɾ ࣮૷ख๏Λೖख DCIʹΑͬͯ

  60. ·ͱΊ

  61. Ξ΢τϓοτॏཁ ·ͱΊ ։ൃऀͷΞ΢τϓοτΛ ߴΊΔ ։ൃϓϩηεΛվળ͢Δ DCI΋͋ΔΑ

  62. ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠