INTRODUCTION TO THE                WORLD OF RUBY                                                                          ...
PAGE   2                                       WHO AM I?   • Nelvin Driz   • Ruby Developer   • Exist Software Labs       ...
WHAT IS RUBY?                                                                                                             ...
PAGE   4                                          ORIGINS   • Yukihiro “Matz” Matsumoto   • December 21, 1995             ...
PAGE   5                           SOMETHING LIKE...                                                                      ...
PAGE   6                         WEB DEVELOPMENT                                                                          ...
PAGE   7                                                                                                               Nel...
PAGE   8                                RUBY ON RAILS   • David Heinemeier Hansson   • July 2004                          ...
RUBY PROGRAMMING                                                                                                          ...
PAGE   10                           CHARACTERISTICS   • Object Oriented (Everything is an Object)   • Duck Typing   • Dyna...
PAGE   11                           OBJECT ORIENTED    1.to_s    ‘hello world’.upcase                                     ...
PAGE   12                                  DUCK TYPING    class       Duck      def       quack; puts ‘quack’; end    end ...
PAGE   13       DYNAMICALLY TYPED VARIABLES    variable = 1    variable = ‘hello’    variable = 1.0                       ...
PAGE   14                                         STRINGS    ‘Single Quote’ + %q{#{no_interpolation}}    => Single Quote#{...
PAGE   15                        LOOPS & ITERATORS    [0,1,2,3,4].each                  {|i|      print       i}    (0..4)...
PAGE   16                                              HASH    hash = {:key => ‘value’}    hash.each {|key, value| print v...
PAGE   17                 ANONYMOUS FUNCTIONS    fn = Proc.new { puts ‘anonymous’ }    fn.call()    => anonymous          ...
PAGE   18                       EVERYTHING IS OPEN    class Fixnum      def match?(regex)        self.to_s.match(regex) ? ...
PAGE   19                                  ZERO IS TRUE    0 ? true : false    => true    nil ? true : false    => false  ...
PAGE   20                    PARALLEL ASSIGNMENT    x, y, z = [1, 2, 3]    x, y, z = 1, 2, 3    print “#{x}#{y}#{z}”    =>...
PAGE   21                               TRANSACTIONS    File.open(‘file.txt’, ‘a’) do |f|      f.write(‘This is a new file...
PAGE   22                                  OTHER STUFF   • Interactive Ruby (IRB)   • No Unary Operations (++ / --)   • Me...
PAGE   23                         PACKAGED IN GEMS                                                                        ...
PAGE   24            PERFORMANCE PAID A PRICE                                                                             ...
PAGE   25                           FLAVORS OF RUBY                                                                       ...
PAGE   26                                              LINKS   • http://www.ruby-lang.org/en/   • https://rubygems.org/   ...
PAGE   27                                            TOOLS                                                                ...
PAGE   28                                                                                                               Ne...
PHILIPPINE RUBY USERS GROUP               (PHRUG)                              http://groups.google.com/group/ruby-phil   ...
Upcoming SlideShare
Loading in...5
×

Introduction to the World of Ruby

772
-1

Published on

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

  • Be the first to like this

No Downloads
Views
Total Views
772
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • All These Features come at a price in terms of performance it cannot compare to compiled languages or semi compiled languages like Java and C++\n
  • \n
  • \n
  • \n
  • And of course, the internet, not only do you get to download open source tools and applications like ruby\nnot only do you get to search for answers on the internet\nbut you should also help other developers as well as contribute to the ever growing open source community\n\nAnd that’s all, any questions?\n\nThank you\n
  • \n
  • Introduction to the World of Ruby

    1. 1. INTRODUCTION TO THE WORLD OF RUBY Nelvin Driz DISCLAIMER: I do not own any of the resources used in the presentation ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    2. 2. PAGE 2 WHO AM I? • Nelvin Driz • Ruby Developer • Exist Software Labs Nelvin Driz ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    3. 3. WHAT IS RUBY? Nelvin Driz DISCLAIMER: I do not own any of the resources used in the presentation ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    4. 4. PAGE 4 ORIGINS • Yukihiro “Matz” Matsumoto • December 21, 1995 Nelvin Driz ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    5. 5. PAGE 5 SOMETHING LIKE... Smalltalk, Eiffel, Ada, and Lisp Nelvin Driz ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    6. 6. PAGE 6 WEB DEVELOPMENT Nelvin Driz ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    7. 7. PAGE 7 Nelvin Driz ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    8. 8. PAGE 8 RUBY ON RAILS • David Heinemeier Hansson • July 2004 Nelvin Driz ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    9. 9. RUBY PROGRAMMING Nelvin Driz DISCLAIMER: I do not own any of the resources used in the presentation ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    10. 10. PAGE 10 CHARACTERISTICS • Object Oriented (Everything is an Object) • Duck Typing • Dynamically Typed Variables • Interpreted Nelvin Driz ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    11. 11. PAGE 11 OBJECT ORIENTED 1.to_s ‘hello world’.upcase Nelvin Driz ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    12. 12. PAGE 12 DUCK TYPING class Duck def quack; puts ‘quack’; end end class Person def quack; puts ‘quack’; end end def speak(entity); entity.quack; end speak(Person.new); speak(Duck.new) Nelvin Driz ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    13. 13. PAGE 13 DYNAMICALLY TYPED VARIABLES variable = 1 variable = ‘hello’ variable = 1.0 Nelvin Driz ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    14. 14. PAGE 14 STRINGS ‘Single Quote’ + %q{#{no_interpolation}} => Single Quote#{no_interpolation} interpolation = ‘INTERPOLATION’ “#{interpolation}” + %Q{#{interpolation}} => INTERPOLATIONINTERPOLATION Nelvin Driz ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    15. 15. PAGE 15 LOOPS & ITERATORS [0,1,2,3,4].each {|i| print i} (0..4).each {|i| print i} 5.times {|i| print i} 0.upto(4) {|i| print i} => 01234 Nelvin Driz ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    16. 16. PAGE 16 HASH hash = {:key => ‘value’} hash.each {|key, value| print value} print hash[:key] => value Nelvin Driz ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    17. 17. PAGE 17 ANONYMOUS FUNCTIONS fn = Proc.new { puts ‘anonymous’ } fn.call() => anonymous Nelvin Driz ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    18. 18. PAGE 18 EVERYTHING IS OPEN class Fixnum def match?(regex) self.to_s.match(regex) ? true : false end end 1.match(/[123]/) => true Nelvin Driz ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    19. 19. PAGE 19 ZERO IS TRUE 0 ? true : false => true nil ? true : false => false false ? true : false => false Nelvin Driz ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    20. 20. PAGE 20 PARALLEL ASSIGNMENT x, y, z = [1, 2, 3] x, y, z = 1, 2, 3 print “#{x}#{y}#{z}” => 123 Nelvin Driz ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    21. 21. PAGE 21 TRANSACTIONS File.open(‘file.txt’, ‘a’) do |f| f.write(‘This is a new file’) end Nelvin Driz ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    22. 22. PAGE 22 OTHER STUFF • Interactive Ruby (IRB) • No Unary Operations (++ / --) • Metaprogramming Nelvin Driz ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    23. 23. PAGE 23 PACKAGED IN GEMS Nelvin Driz ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    24. 24. PAGE 24 PERFORMANCE PAID A PRICE Nelvin Driz ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    25. 25. PAGE 25 FLAVORS OF RUBY Nelvin Driz ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    26. 26. PAGE 26 LINKS • http://www.ruby-lang.org/en/ • https://rubygems.org/ • http://rubykoans.com/ • http://railsforzombies.org/ • http://ruby-toolbox.com/ • http://codebrawl.com/ • http://tryruby.org/ Nelvin Driz ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    27. 27. PAGE 27 TOOLS Nelvin Driz ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    28. 28. PAGE 28 Nelvin Driz ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    29. 29. PHILIPPINE RUBY USERS GROUP (PHRUG) http://groups.google.com/group/ruby-phil Nelvin Driz ndriz@exist.comRUBY ON RAILS INTERACTIVE MEDIA IPHONE & IPAD APPS DRUPAL FLASH WEB DESIGN & DEVELOPMENT SOCIAL NETWORKING JAVASCRIPT
    1. ¿Le ha llamado la atención una diapositiva en particular?

      Recortar diapositivas es una manera útil de recopilar información importante para consultarla más tarde.

    ×