[A1]루비는 패셔니스타

2,628 views
2,554 views

Published on

Published in: Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,628
On SlideShare
0
From Embeds
0
Number of Embeds
1,804
Actions
Shares
0
Downloads
61
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

[A1]루비는 패셔니스타

  1. 1. 루비는
  2. 2.  패셔니스타문추근KT
  3. 3.  Hitel
  4. 4.  /
  5. 5.  Web
  6. 6.  플랫폼
  7. 7.  Lab
  8. 8. 2006 ~ 2011 2011
  9. 9. Text
  10. 10. http://www.flickr.com/photos/dixieroadrash/3429742001
  11. 11. 루비는
  12. 12.  패셔니스타1. 루비 1.1. 철학 1.2. 특징 1.3. 영향2. 레일스 2.1. 특징 2.2. 영향3. 루비
  13. 13.  파생상품4. 루비와
  14. 14.  레일스의
  15. 15.  활용5. 배워야
  16. 16.  하는
  17. 17.  이유
  18. 18. Ruby1995 Yukihiro Matsumoto (Matz)
  19. 19. More powerful than Perl More object oriented than Python
  20. 20. make programming funRuby is designed to make programmers happy be human-oriented
  21. 21. 루비의
  22. 22.  특징
  23. 23. 객체
  24. 24.  지향
  25. 25.  프로그래밍
  26. 26. 객체자료 행동
  27. 27. 객체 행동
  28. 28. 모두
  29. 29.  다
  30. 30.  객체
  31. 31. 모두
  32. 32.  다
  33. 33.  객체 -1.23.abs Hello.reverse true.methods [c, a, b].sort nil.nil?
  34. 34. 모두
  35. 35.  다
  36. 36.  객체 // Java if (foo.equals(hi)) { ... } if (hi.equals(foo)) { ... } // JavaScript - Chai.js foo.should.have.length(3); expect(foo).to.have.length(3);
  37. 37. 모두
  38. 38.  다
  39. 39.  객체 // JavaScript Math.max(1, 2, 3); !foo # Ruby [1, 2, 3].max foo.empty?
  40. 40. 유연함
  41. 41. 몽키
  42. 42.  패치 class Date 3.days.since Date.yesterday def yesterday self - 1 (1.year + 6.months).ago end end person.pluralize = people class Integer def months ILoveYou.underscore.humanize     Duration.new self * 30.days = I love you end end
  43. 43. 메타
  44. 44.  프로그래밍 class User class User def initialize(email) attr_accessor :email @email = email end def initialize(email) @email = email def email end @email end end def email=(email) @email = email end end
  45. 45. 메타
  46. 46.  프로그래밍 def attr_accessor *args args.each do |arg| self.class_eval def #{arg};@#{arg};end self.class_eval def #{arg}=(val);@#{arg}=val;end end end
  47. 47. 블록
  48. 48. 블록// JavaScriptfor (var i = 0; i numbers; i++) { var n = numbers[i]; doSomething(n);}# Rubynumbers.each do |n| n.do_somethingend
  49. 49. 블록3.times {|i| puts i} (1..10).each do |i| print i end
  50. 50. Enumerable all? find minmax_by any? find_all none? chunk find_index one? collect first partition collect_concat flat_map reduce count grep reject cycle group_by reverse_each detect include? select drop inject slice_before drop_while map sort each_cons max sort_by each_entry max_by take each_slice member? take_while each_with_index min to_a each_with_object min_by zip entries minmax
  51. 51. 약속
  52. 52. 약속 puts hello nil? empty? exist? directory? [1, 2, 3].sort [1, 2, 3].sort! $global_variable @instance_variable @@class_variable CONST
  53. 53. 루비의
  54. 54.  영향
  55. 55. Ruby on Rails2004 by David Heinemeier Hansson (DHH)
  56. 56. Router /users index Controller @users SQL Query User.allView Model
  57. 57. 레일스의
  58. 58.  특징
  59. 59. Scaffold
  60. 60. Scaffold • $ rails generate scaffold post title:string content:text • Database
  61. 61.  Migration • Model • Controller • View • Route • CoffeeScript • SCSS • Test
  62. 62. http://en.wikipedia.org/wiki/Scaffold
  63. 63. RESTfulREpresentational
  64. 64.  State
  65. 65.  Transfer
  66. 66. RESTful Method URL Action GET /posts index POST /posts create GET /posts/new new GET /posts/:id/edit edit GET /posts/:id show PUT /posts/:id update DELETE /posts/:id destroy
  67. 67. 레일스의
  68. 68.  영향
  69. 69. • Model• Controller• Router
  70. 70. 루비
  71. 71.  파생상품
  72. 72. # hello.rbrequire ‘sinatra’get ‘/’ do ‘Hello world!’end$ ruby hello.rb
  73. 73. 루비와
  74. 74.  레일스의
  75. 75.  활용
  76. 76. 루비의
  77. 77.  활용 • Homebrew • Rake • Backbone • Underscore • Zepto • Angular • Jasmine • Mustache • Prototype • BDD
  78. 78. 레일스 • Wunderkit • Twitter • Hulu • Groupon • GitHub • Shopify • Scribd • Diaspora • Code
  79. 79.  School
  80. 80. 한국에서는
  81. 81.  왕따
  82. 82. 등가교환의
  83. 83.  법칙 무언가를
  84. 84.  얻기
  85. 85.  위해서는
  86. 86.  그와
  87. 87.  동등한
  88. 88.  대가가
  89. 89.  필요하다 http://anime.desktopnexus.com/wallpaper/718281/
  90. 90. 모바일
  91. 91.  시대 • 개발
  92. 92.  속도가
  93. 93.  더
  94. 94.  중요한
  95. 95.  서비스 • MVC
  96. 96.  is
  97. 97.  dead • 뷰가
  98. 98.  중요하지
  99. 99.  않은
  100. 100.  시대 • API
  101. 101.  중심
  102. 102.  서버 • RESTful
  103. 103. 배워야
  104. 104.  하는
  105. 105.  이유
  106. 106. 매년
  107. 107.  새로운
  108. 108.  언어를
  109. 109.  배워라 • 실용주의
  110. 110.  프로그래머
  111. 111.  Tip
  112. 112.  #8 • 지식
  113. 113.  포트폴리오에
  114. 114.  주기적으로
  115. 115.  투자하라. • 다른
  116. 116.  언어는
  117. 117.  동일한
  118. 118.  문제를
  119. 119.  다르게
  120. 120.  푼다.
  121. 121. 1
  122. 122.  ~
  123. 123.  10
  124. 124.  가운데
  125. 125.  짝수를
  126. 126.  배열로 numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] odds = []
  127. 127. C int numbers[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int result[10]; int i = 0; int j = 0; for (i = 0; i 10; i++) { int n = numbers[i]; if (n % 2 == 0) { result[j++] = n; } }
  128. 128. JavaScript var numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; var result = []; var i = 0; var j = 0; for (i = 0; i 10; i++) { var n = numbers[i]; if (n % 2 == 0) { result[j++] = n; } }
  129. 129. Python numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] result = [] for number in numbers: if n % 2 == 0: result.append(n)
  130. 130. Ruby numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] result = [] for number in numbers if n % 2 == 0 result.push(n) end end
  131. 131. JavaScript var numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; // ECMAScript 5, IE9+ var result = numbers.filter(function(n) { return n % 2 == 0; }); // jQuery var result = $.grep(numbers, function(n) { return n % 2 == 0; });
  132. 132. Python [n for n in range(1, 11) if n % 2 == 0]
  133. 133. Ruby (1..10).select {|n| n % 2 == 0}
  134. 134. 언어의
  135. 135.  한계가
  136. 136.  곧
  137. 137.  자기
  138. 138.  세계의
  139. 139.  한계다 루트비히
  140. 140.  비트겐슈타인

×