SEMAC 2011 - Apresentando Ruby e Ruby on Rails
Upcoming SlideShare
Loading in...5
×
 

SEMAC 2011 - Apresentando Ruby e Ruby on Rails

on

  • 1,166 views

Apresentação sobre Ruby e Ruby on Rails para o SEMAC da UNESP de São José do Rio Preto.

Apresentação sobre Ruby e Ruby on Rails para o SEMAC da UNESP de São José do Rio Preto.

Statistics

Views

Total Views
1,166
Views on SlideShare
1,071
Embed Views
95

Actions

Likes
1
Downloads
12
Comments
0

2 Embeds 95

http://www.gonow.com.br 79
http://coderwall.com 16

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    SEMAC 2011 - Apresentando Ruby e Ruby on Rails SEMAC 2011 - Apresentando Ruby e Ruby on Rails Presentation Transcript

    • Apresentando Ruby e Ruby on Rails a apresentação já vai começar ...
    • Apresentando Ruby e Ruby on Rails
    • Fabio Akitawww.akitaonrails.com @akitaonrails
    • Fabio Akitawww.akitaonrails.com @akitaonrails 1990
    • Ruby 1994 (linguagem)Ruby on Rails 2004 (framework web)
    • 1.8.7 Ruby 1.9.2 1.9.3-dev 2.3.11Ruby on Rails 3.0.7 3.1-RC1
    • 1.8.7 Ruby 1.9.2 1.9.3-dev 2.3.11Ruby on Rails 3.0.7 3.1-RC1
    • 1.8.7 Ruby 1.9.2 1.9.3-dev 2.3.11Ruby on Rails 3.0.7 3.1-RC1
    • Orientação a Objetos
    • UMLDiagrama de Classes
    • !? UMLDiagrama de Classes
    • !? UMLDiagrama de Classes POO?
    • !? UMLDiagrama de Classes POC!
    • Alan Kay“A melhor maneirade prever o futuro é inventá-lo”
    • Alan Kay“Eu inventei o termoOrientação a Objetos e posso dizer que eu não tinha C++ em mente”
    • Alan Kay“Eu inventei o termoOrientação a Objetos e posso dizer que eu não tinha C++ em mente”
    • Hello World
    • Hello World
    • #include <stdio.h>int main(){ printf("Hello worldn"); return 0;}
    • class HelloWorldApp { public static void main(String[] args) { System.out.println("Hello World!"); }}
    • Transcript show: Hello, world!.
    • puts Hello World
    • Procedures??
    • Procedures??
    • puts Hello World=> Hello World
    • puts Hello World=> Hello WorldKernel.puts Hello World=> Hello World
    • puts Hello World=> Hello WorldKernel.puts Hello World=> Hello Worldputs self.class
    • puts Hello World=> Hello WorldKernel.puts Hello World=> Hello World thisputs self.class
    • puts Hello World=> Hello WorldKernel.puts Hello World=> Hello World thisputs self.class => Object
    • puts Hello World=> Hello WorldKernel.puts Hello World=> Hello World thisputs self.class => ObjectObject.ancestors => [Object, Kernel, BasicObject]
    • puts Hello World=> Hello WorldKernel.puts Hello World=> Hello World thisputs self.class => ObjectObject.ancestors => [Object, Kernel, BasicObject]
    • "teste".class => String
    • "teste".class => String1.class
    • "teste".class => String1.class => Fixnum
    • "teste".class => String1.class => Fixnumtrue.class => TrueClass
    • "teste".class => String1.class => Fixnumtrue.class => TrueClassnil
    • "teste".class => String1.class => Fixnumtrue.class => TrueClassnil.class => NilClass
    • "teste".class => String1.class => Fixnumtrue.class => TrueClass NullPointerException!?nil.class => NilClass
    • "teste".class => String1.class => Fixnumtrue.class => TrueClassnil.class => NilClass
    • 1 + 2
    • 1 + 21.+(2)
    • def hello(name) return "Hello, " + nameendputs hello("Fabio") => "Hello, Fabio"
    • def hello(name) return "Hello, " + nameendputs hello "Fabio" => "Hello, Fabio"
    • def hello(name) return "Hello, " + nameendputs hello "Fabio" => "Hello, Fabio" Parênteses Opcionais
    • def hello(name) "Hello, " + nameendputs hello "Fabio" => "Hello, Fabio"
    • def hello(name) "Hello, " + nameendputs hello "Fabio" return => "Hello, Fabio" automático
    • def hello(name) "Hello, #{name}"endputs hello "Fabio" => "Hello, Fabio"
    • def hello(name) "Hello, #{name}"endputs hello "Fabio" => "Hello, Fabio" Interpolação
    • class String def hello(name) "#{self}, #{name}" endend
    • class String def hello(name) "#{self}, #{name}" endend"Hello".hello "Fabio" => "Hello, Fabio"
    • class String def hello(name) "#{self}, #{name}" endend"Hello".hello "Fabio" Classes => "Hello, Fabio" Abertas!
    • module Legal def bu! "Buuu!" endendclass String include Legalendclass Fixnum include Legalend"foo".bu! => "Buuu!"10.bu! => "Buuu!"
    • module Legal def bu! "Buuu!" endendclass String include Legalendclass Fixnum include Legalend"foo".bu! => "Buuu!"10.bu! => "Buuu!"
    • module Legal def bu! "Buuu!" endendclass String include Legalendclass Fixnum Module include Legalend Mixin"foo".bu! => "Buuu!"10.bu! => "Buuu!"
    • module Legal def bu! "Buuu!" endendclass String include Legalendclass Fixnum Module include Legalend Mixin"foo".bu! => "Buuu!"10.bu! => "Buuu!"
    • module Legal def bu! "Buuu!" endendclass String include Legalendclass Fixnum Module include Legalend Mixin"foo".bu! => "Buuu!"10.bu! => "Buuu!"
    • require rubygemsrequire active_supportTime.now + 1.day => 2011-05-18 11:44:20 -0300Time.now + 1.week => 2011-05-24 11:44:24 -0300(1.gigabyte - 100.megabytes) / 1.megabyte => 924
    • require rubygemsrequire active_supportTime.now + 1.day => 2011-05-18 11:44:20 -0300Time.now + 1.week => 2011-05-24 11:44:24 -0300(1.gigabyte - 100.megabytes) / 1.megabyte => 924
    • require rubygemsrequire active_supportTime.now + 1.day => 2011-05-18 11:44:20 -0300Time.now + 1.week => 2011-05-24 11:44:24 -0300(1.gigabyte - 100.megabytes) / 1.megabyte => 924
    • require rubygemsrequire active_supportTime.now + 1.day => 2011-05-18 11:44:20 -0300Time.now + 1.week => 2011-05-24 11:44:24 -0300(1.gigabyte - 100.megabytes) / 1.megabyte => 924
    • list = [1,2,3,4,5]soma = 0for i in list soma += iendputs soma => 15
    • list = [1,2,3,4,5]soma = 0for i in list soma += iendputs soma => 15
    • list = [1,2,3,4,5]soma = 0for i in list soma += iendputs soma => 15
    • list = [1,2,3,4,5]soma = list.inject(0) { |total, i| total += i }puts soma => 15
    • list = [1,2,3,4,5]soma = list.inject(0) { |total, i| total += i }puts soma => 15
    • list = [1,2,3,4,5]soma = list.inject(0) { |total, i| total += i }puts soma => 15
    • list = [1,2,3,4,5]soma = list.inject(0) { |total, i| total += i }puts soma => 15
    • list = [1,2,3,4,5]soma = list.inject(0) { |total, i| total += i }puts soma => 15
    • list = [1,2,3,4,5]soma = list.inject(0) do |total, i| total += iendputs soma => 15
    • list = [1,2,3,4,5]soma = list.inject(0) do |total, i| total += iendputs soma Anonymous => 15 Inner Class?
    • list = [1,2,3,4,5]soma = list.inject(0) do |total, i| total += iendputs soma => 15
    • list = [1,2,3,4,5]soma = list.inject(0) do |total, i| total += iendputs soma => 15 CLOSURE!
    • class Foo def method_missing(method) print "#{method} called" endendFoo.new.bar => "bar called"Foo.new.send(:bar) => "bar called"
    • class Foo def method_missing(method) print "#{method} called" endendFoo.new.bar => "bar called"Foo.new.send(:bar) => "bar called"
    • class Foo def method_missing(method) print "#{method} called" endendFoo.new.bar => "bar called"Foo.new.send(:bar) => "bar called" Messages!
    • <?xml version="1.1" encoding="US-ASCII"?><Hello>World!</Hello><date> <year>2006</year> <month>01</month> <day>01</day></date>
    • require builderxml = Builder::XmlMarkup.newxml.instruct! :xml <?xml version="1.1" encoding="US-ASCII"?>xml.Hello "World!" <Hello>World!</Hello>xml.date do <date> xml.year "2006" <year>2006</year> xml.month "01" <month>01</month> xml.day "01" <day>01</day>end </date>
    • require builderxml = Builder::XmlMarkup.newxml.instruct! :xml <?xml version="1.1" encoding="US-ASCII"?>xml.Hello "World!" <Hello>World!</Hello>xml.date do <date> xml.year "2006" <year>2006</year> xml.month "01" <month>01</month> xml.day "01" <day>01</day>end </date>
    • require builderxml = Builder::XmlMarkup.newxml.instruct! :xml <?xml version="1.1" encoding="US-ASCII"?>xml.Hello "World!" <Hello>World!</Hello>xml.date do <date> xml.year "2006" <year>2006</year> xml.month "01" <month>01</month> xml.day "01" <day>01</day>end </date>
    • require builderxml = Builder::XmlMarkup.newxml.instruct! :xml <?xml version="1.1" encoding="US-ASCII"?>xml.Hello "World!" <Hello>World!</Hello>xml.date do <date> xml.year "2006" <year>2006</year> xml.month "01" <month>01</month> xml.day "01" <day>01</day>end </date>
    • require builderxml = Builder::XmlMarkup.newxml.instruct! :xml <?xml version="1.1" encoding="US-ASCII"?>xml.Hello "World!" <Hello>World!</Hello>xml.date do <date> xml.year "2006" <year>2006</year> xml.month "01" <month>01</month> xml.day "01" <day>01</day>end </date>
    • require rubygemsrequire mechanizea = Mechanize.new do |agent| agent.user_agent_alias = Mac Safarienda.get(http://google.com/) do |page| search_result = page.form_with(:name => f) do |search| search.q = Hello world end.submit search_result.links.each do |link| puts link.text endend
    • require rubygemsrequire mechanizea = Mechanize.new do |agent| agent.user_agent_alias = Mac Safarienda.get(http://google.com/) do |page| search_result = page.form_with(:name => f) do |search| search.q = Hello world end.submit search_result.links.each do |link| puts link.text endend
    • require rubygemsrequire mechanizea = Mechanize.new do |agent| agent.user_agent_alias = Mac Safarienda.get(http://google.com/) do |page| search_result = page.form_with(:name => f) do |search| search.q = Hello world end.submit search_result.links.each do |link| puts link.text endend
    • require rubygemsrequire mechanizea = Mechanize.new do |agent| agent.user_agent_alias = Mac Safarienda.get(http://google.com/) do |page| search_result = page.form_with(:name => f) do |search| search.q = Hello world end.submit search_result.links.each do |link| puts link.text endend
    • class Twitter include HTTParty base_uri twitter.com basic_auth username, passwordendTwitter.post(/statuses/update.json, :query => { :status => "Its an HTTParty and everyone is invited!" })
    • class Twitter include HTTParty base_uri twitter.com basic_auth username, passwordendTwitter.post(/statuses/update.json, :query => { :status => "Its an HTTParty and everyone is invited!" })
    • 1990 1995 PostScript level 2 PostScript level 3 1992 september 11, 1996 OO Forth Forth 1987986ect Logo Tcl Tcl/Tk1986 mid 1988 end 1988 Fortran 90 ISO 1991 A A+ 1988 1992 J KMPS (FIPS) 1990 MUMPS ISO 1996 M M ANSI Open M 1986 1992 1994 dec 8, 1995 dec 11, 1995 Modula 3 Delphi 1988 march 2, 1995 APL96 1996 ABC 1987 Python Borland 1991 Object Pascal 1985 Turbo Pascal ANSI Rexx f Oberon Oberon-2 1987 1991 Modula-2 ISO Ada 95 june 1, 1996 Ada ISO 1987 1995 NetRexx 1991 ANSI C ISO C ISO C (C89) (C90) (C95) 1989 december 15, 1990 april 1, 1996 JScrip may 19 Cmm LiveScript JavaScript 1992 1995 december 1995 ARM C++ 1989 Oak Java 1 june 1991 may 23, 1995 Ruby february 24, 1993 Ruby 0.95 december 1995 Self Self 4.0 Eiffel Eiffel 2 Eiffel 3 july 10, 1995 Eiffel 4 1986 1988 1993 december 11, 1996 PHP/FI 1995 Sather 0.1 Sather 1.0 Sather 1.1 june 1991 mid-1994 september 1995 Perl 1.000 Perl 2.000 Perl 3.000 Perl 4.000 Perl 5.000ecember 18, 1987 january 5, 1988 october 18, 1989 march 21, 1991 october 18, 1994 Objective Caml 1996sic 1.0 QuickBasic 4.5 MS Basic PDS 7.0 MS PDS 7.1 Visual Basic 3.0 Visual Basic 4.0 1989 Visual Basic 1.0 Visual Basic 2.05 1988 1990 may 20, 1991 march 1992 june 93 september 1995 Clos 1989 Common Lisp ANSI december 8, 1994 Scheme IEEE 1990 Haskell 1.0 Haskell 1.1 Haskell 1.2 Haskell 1.3 1987 april 1, 1990 march 1992 may 1996 SML ‘90 1990ml Caml 2-6.1 Caml 3.187 1991 1993
    • 1990 1995 PostScript level 2 PostScript level 3 1992 september 11, 1996 OO Forth Forth 1987986ect Logo Tcl Tcl/Tk1986 mid 1988 end 1988 Fortran 90 ISO 1991 A A+ 1988 1992 J KMPS (FIPS) 1990 MUMPS ISO 1996 M M ANSI Open M 1986 1992 1994 dec 8, 1995 dec 11, 1995 Modula 3 Delphi 1988 march 2, 1995 APL96 1996 ABC 1987 Python Borland 1991 Object Pascal 1985 Turbo Pascal ANSI Rexx f Oberon Oberon-2 1987 1991 Modula-2 ISO Ada 95 june 1, 1996 Ada ISO 1987 1995 NetRexx 1991 ANSI C ISO C ISO C (C89) (C90) (C95) 1989 december 15, 1990 april 1, 1996 JScrip may 19 Cmm LiveScript JavaScript 1992 1995 december 1995 ARM C++ 1989 Oak Java 1 june 1991 may 23, 1995 Ruby february 24, 1993 Ruby 0.95 december 1995 Self Self 4.0 Eiffel Eiffel 2 Eiffel 3 july 10, 1995 Eiffel 4 1986 1988 1993 december 11, 1996 PHP/FI 1995 Sather 0.1 Sather 1.0 Sather 1.1 june 1991 mid-1994 september 1995 Perl 1.000 Perl 2.000 Perl 3.000 Perl 4.000 Perl 5.000ecember 18, 1987 january 5, 1988 october 18, 1989 march 21, 1991 october 18, 1994 Objective Caml 1996sic 1.0 QuickBasic 4.5 MS Basic PDS 7.0 MS PDS 7.1 Visual Basic 3.0 Visual Basic 4.0 1989 Visual Basic 1.0 Visual Basic 2.05 1988 1990 may 20, 1991 march 1992 june 93 september 1995 Clos 1989 Common Lisp ANSI december 8, 1994 Scheme IEEE 1990 Haskell 1.0 Haskell 1.1 Haskell 1.2 Haskell 1.3 1987 april 1, 1990 march 1992 may 1996 SML ‘90 1990ml Caml 2-6.1 Caml 3.187 1991 1993
    • 1954 1957 1960 1965 1970 1975 1980 1985 PostScript 1982 Forth FIG-Forth Forth-83 ANS Forth 1968 1978 1983 1986 Logo Object L 1968 1986 FORTRAN I FORTRAN II FORTRAN III FORTRAN IV FORTRAN IV FORTRAN V FORTRAN (Fortran 66 ANS) (Fortran 77 ANSI) november 1954 october 1956 1957 end-1958 1962 1966 april 1978 Prolog Prolog II Prolog III 1970 october 1982 1984 Sharp APL JOSS TELCOMP MUMPS MUMPS (ANSI) MUMPS ( 1964 1965 1966 september 15, 1977 1986 APL APL 2 1960 august 1984 B 1981 Obj B-O Flow-Matic COBOL COBOL 61 COBOL 61 COBOL COBOL 68 ANS COBOL 74 ANSI COBOL 85 ISO/ANSI 1957 1958 1959 1961 Extended 1965 1968 1974 1985 1962 Rex 1.00 Rex 2.00 Rex 3.00 Rexx 3.20 may 1979 1980 1982 1984 Pascal Pascal AFNOR 1970 1983 PL/M Modula Modula 2 1972 1975 1979 Ada Ada 83 ANSI 1979 january 1983 PL/I PL/1 ANS 1964 1976 Concurrent C 1984 CPL BCPL B C C (K&R) july 1967 1978 Classic C 1963 1969 1971 JOVIAL JOVIAL I JOVIAL II JOVIAL 3 Objective-C 1959 1960 1961 1965 1983 CORAL 64 CORAL 66 C with Classes 1964 1966 C++ april 1980 july 1983 CLU Simula 67 1974 Simula I 1964 1967 ALGOL W Mesa ALGOL 58 ALGOL 60 1966 ALGOL 68 1977 IAL Cedar 1958 1958 1960 december 1983 1968 GOGOL GOGOL III Smalltalk Smalltalk-72 Smalltalk-74 Smalltalk-76 Smalltalk-78 Smalltalk-80 1964 1967 1971 1972 1974 1976 1978 1980 sed Sail 1973 Mainsail 1968 1975 ISWIM awk nawk 1966 1978 1985 KRC 1981 csh SASL october 1978 Per 1976 Miranda decemb 1982 sh 1969 BASIC MS Basic 2.0 BASICA GW-Basic QuickBasic 1.0 may 1, 1964 july 1975 1981 1983 1985 Lisp Lisp 1 Lisp 1.5 Common Lisp 1958 1959 1962 1984 Scheme Scheme MIT Scheme 84 1975 1978 1984 ML SML 1973 1984 SL5 Icon Languages SNOBOL SNOBOL 2 SNOBOL 3 SNOBOL 4 1976 1977 february 27, 2011 Caml 1962 april 1964 1965 1967 1987 ! Éric Lévénez 1999-2011<http://www.levenez.com/lang/> 1 2 3 4
    • 1985 1990 1995 2000 PostScript PostScript level 2 PostScript level 3 1982 1992 september 11, 1996 OO Forth Forth-83 ANS Forth 1987 ISO Forth 1983 1986 1997 Object Logo Tcl Tcl/Tk Tcl/Tk 8.1 Tcl/Tk 8.2.3 1986 mid 1988 end 1988 april 1999 dec. 16, 1999 Fortran 90 ISO Fortran 95 ISO 1991 december 15, 1997 A A+ Prolog II Prolog III 1988 1992 Prolog IV october 1982 1984 1997 J K Sharp APL 1990 1996 MUMPS (FIPS) MUMPS ISO M M ANSI Open M M ISO 1986 1992 1994 dec 8, 1995 dec 11, 1995 1999 Modula 3 Delphi Delphi 5 1988 march 2, 1995 august, 1999 APL 2 APL96 august 1984 1996 B ABC 1981 1987 Python Python 1.5.2 Python 1.6 Python 2.0 Borland 1991 april 13, 1999 september 5, 2000 october 16, 2000 a Object Pascal 1985 Turbo Pascal COBOL 85 ISO/ANSI OO COBOL 1985 1997 x 2.00 Rex 3.00 Rexx 3.20 ANSI Rexx Object Rexx1980 1982 1984 february 25, 1997 Pascal AFNOR 1983 Oberon Oberon-2 1987 1991 Modula-2 ISO Modula-2 ISO june 1, 1996 Generic Extension Ada 83 ANSI Ada ISO Ada 95 december 19, 1998 january 1983 1987 1995 NetRexx NetRexx 1.150 1991 C# Concurrent C july 23, 1999 june 26, 2000 1984 ANSI C ISO C ISO C ISO C (C99) (C89) (C90) (C95) december 1, 1999 1989 december 15, 1990 april 1, 1996 JScript JScript Objective-C may 1996 1983 JavaScript 2.0 Cmm LiveScript JavaScript 1995 JavaScript 1.5 (draft 1) C with Classes ARM C++ 1992 december 1995 C++98 ANSI/ISO february 18, 1999 C++ april 1980 july 1983 1989 1998 ECMAScript ECMAScript ed3 june 1997 december 1999 Oak Java 1 Java 2 (v1.2) Java 2 (v1.3) june 1991 may 23, 1995 december 8, 1998 may 8, 2000 Ruby Ruby 1.1 alpha 0 Cedar february 24, 1993 Ruby 0.95 Ruby 1.3.2 Ruby 1.6.1 1983 december 1995 august 13, 1997 april 2, 1999 september 27, 2000malltalk-80 ANSI Smalltalk 1980 may 19, 1998 Self Self 4.0 Eiffel Eiffel 2 Eiffel 3 july 10, 1995 Eiffel 4 Eiffel 4.2 I 1986 1988 1993 december 11, 1996 february 6, 1998 nawk PHP/FI PHP 2.0 PHP 3.0 PHP 4.0 1985 1995 nov. 13, 1997 june 6, 1998 may 22, 2000 KRC Sather 0.1 Sather 1.0 Sather 1.1 Sather 1.2.1 1981 june 1991 mid-1994 september 1995 november 4, 1999 Perl 2.000 Perl 3.000 Perl 4.000 Perl 5.000 Perl 5.005_50 Perl 5.6.0 Perl 5.7,0 Perl 1.000 july 26, 1998 Miranda december 18, 1987 january 5, 1988 october 18, 1989 march 21, 1991 october 18, 1994 march 28, 2000 september 2, 2000 1982 Objective Caml O’Caml 1.0.7 O’Caml 2 O’Caml 3.00 1996 1998 june 2000 december 11, 1997 BASICA GW-Basic QuickBasic 1.0 QuickBasic 4.5 MS Basic PDS 7.0 MS PDS 7.1 Visual Basic 3.0 Visual Basic 4.0 Visual Basic 5.0 Visual Basic 6.0 VB.N 1989 Visual Basic 1.0 Visual Basic 2.0 1981 1983 1985 1988 1990 may 20, 1991 march 1992 june 93 september 1995 april 1997 june 16, 1998 (Visual B Clos 20 Common Lisp 1989 Common Lisp ANSI 1984 december 8, 1994 Scheme 84 Scheme IEEE Scheme R5RS 1984 1990 1998 Haskell 1.0 Haskell 1.1 Haskell 1.2 Haskell 1.3 Haskell 1.4 Haskell 98 1987 april 1, 1990 march 1992 may 1996 april 1997 SML ‘97 february 1999 SML SML ‘90 1984 1990 1997 Caml Caml 2-6.1 Caml 3.1 1987 1991 1993 1 2 3 4
    • 2002 2003 2004 2005 PostScript level 3 PostScript level 3 v 3016 v 3017 2003 september 11, 2005 Tcl/Tk 8.3 Tcl/Tk 8.4 Tcl/Tk 8.4.1 Tcl/Tk 8.4.2 Tcl/Tk 8.4.3 Tcl/Tk 8.4.4 Tcl/Tk 8.4.5 Tcl/Tk 8.4.6 Tcl/Tk 8.4.7 Tcl/Tk 8.4.8 Tcl/Tk 8.4.9 Tcl/Tk 8.4.11 Tcl/Tk 8.4.12 october 22, 2001 september 10, 2002 october 22, 2002 march 3, 2003 may 20, 2003 july 22, 2003 november 24, 2003 march 1, 2004 july 25, 2004 nov. 22, 2004 december 7, 2004 june 28, 2005 december 6, 2005 Fortran 2000 (draft) Fortran 2003 september 30, 2002 november 30, 2004 M ISO Delphi 6 january 6, 2005 Delphi 2006 Delphi 7 Delphi 8 Delphi 2005 may 1, 2001 august 6, 2002 november 2003 november 2004 october 30, 2005 Python 2.1 Python 2.2 Python 2.2.1 Python 2.2.2 Python 2.3a2 Python 2.2.3 Python 2.3 Python 2.3.1 Python 2.3.2 Python 2.3.3 Python 2.3.4 Python 2.4 Python 2.4.1 Python 2.4.20 april 17, 2001 december 21, 2001 april 10, 2002 october 14, 2002 february 19, 2003 may 30, 2003 july 29, 2003 september 23, 2003 october 3, 2003 december 19, 2003 may 27, 2004 november 30, 2004 march 30, 2005 september 28, 2005 COBOL 2002 ISO/ANSI december 2002 Active Oberon 2001 Ada 2006 (draft) 2005 C# C# C# 2.0 (ECMA) (beta) C# 2.0 (ISO) november 2005 december 13, 2001 march 28, 2003 july 2003 C# 3.0 (beta) september 2005 JavaScript 2.0 Java 2 (v6.0 beta) (draft 4) december 2004 april 26, 2002 C++03 ISO/IEC 2003 ECMAScript ed4 (draft) 2002 Java 2 Java 2 (v1.5.0) Java 2 (v5.0 update 3) Java 2 (v1.4) Java 2 (v1.4.1_03) (beta 1) Java 2 (v5.0) (beta 2) Java 2 (v5.0) early access Java 2 (v1.4.0_01) Java 2 (v1.4.1) (v1.4.1_02) april 28, 2005 june 4, 2002 june 11, 2003 february 5, 2004 june 28, 2004 september 30, 2004 february 6, 2002 september 2002 february 27, 2003 Java 2 (v1.4.2) Java 2 (v1.4.2_01) Java 2 (v1.4.2_02) Java 2 (v1.4.2_03) april 29, 2003 Java 2 (v1.4.2_04) Java 2 (v1.4.2_05) Java 2 (v1.4.2_06) august 26, 2003 october 22, 2003 december 13, 2003 november 23, 2004 Ruby 1.6.5 Ruby 1.6.7 Ruby 1.6.8 march 8, 2004 june 30, 2004 Ruby 1.8.2 Ruby 1.8.3 Ruby 1.8.4 Ruby 1.8 Ruby 1.8.1 september 19, 2001 march 1, 2002 december 24, 2002 august 4, 2003 december 25, 2003 december 25, 2004 september 21, 2005 december 24, 200 Self 4.1 Self 4.1.6 Self 4.2.1 august 7, 2001 september 2002 april 3, 2004 ECMA Eiffel ISE Eiffel 5 2001 june 2005 PHP 4.1.0 PHP 4.2.0 PHP 4.2.2 PHP 4.2.3 PHP 4.3.0 PHP 4.3.1 PHP 4.3.2 PHP 4.3.3 PHP 4.3.4 PHP 4.3.5 PHP 4.3.6 PHP 4.3.7 PHP 4.3.8 PHP 4.3.10 PHP 4.4.1 december 8, 2001 april 22, 2002 july 22, 2002 september 6, 2002 december 27, 2002 feb. 17, 2003 may 29, 2003 august 25, 2003 november 3, 2003 march 26, april 15, june 3, july 13, 2004 december 15, 2004 october 31, 2005 2004 2004 2004 PHP 5.0.0 PHP 5.0.3 PHP 5.0.4 PHP 5.0.5 july 13, 2004 PHP 5.1.0 december 15, 2004 april 3, 2005 september 6, 2005 november 24, 2005 Perl 5.8.0 Perl 5.8.1 Perl 5.8.2 Perl 5.8.3 Perl 5.8.4 Perl 5.8.5 Perl 5.8.6 Perl 5.8.7 july 18, 2002 september 26, 2003 november 5, 2003 january 1, 2004 april 23, 2004 july 21, 2004 november 30, 2004 june 3, 2005 O’Caml 3.02 O’Caml 3.03 O’Caml 3.04 O’Caml 3.05 O’Caml 3.06 O’Caml 3.07 O’Caml 3.08.0 O’Caml 3.08.2 july 30, 2001 dec 10, 2001 dec 12, 2001 july 29, 2002 august 20, 2002 september 29, 2003 july 13, 2004 november 2004 VB.NET (Visual Basic 7.0) 2001 Haskell 98 (revised) december 2002 Unicon 2001 1 2 3 4
    • 2005 2006 2007 2008 2009 2010 2011 PostScript level 3 v 3017 september 11, 2005 Tcl/Tk 8.4.11 Tcl/Tk 8.4.12 Tcl/Tk 8.4.13 Tcl/Tk 8.4.14 Tcl/Tk 8.4.15 Tcl/Tk 8.5 Tcl/Tk 8.5.5 Tcl/Tk 8.5.6 Tcl/Tk 8.5.7 Tcl/Tk 8.5.9 june 28, 2005 december 6, 2005 april 19, 2006 october 19, 2006 may 25, 2007 december 20, 2007 october 15, 2008 january 2009 april 15, 2009 september 8, 2010 Fortran 2008 september 201005 Delphi 2006 Delphi 2007 Delphi 2009 Delphi 2010 october 30, 2005 march 2007 august 2008 august 2009 Python 3.0a2 Python 3.0.1 Python 3.1 Python 3.2 december 7, 2007 Python 3.0 june 27, 2009 december 3, 2008 february 13, 2009 february 20, 2011 Python 2.4.1 Python 2.4.2 Python 2.5 Python 2.5.1 Python 2.6 Python 2.6.1 Python 2.6.2 Python 2.6.3 Python 2.7 Python 2.7.1march 30, 2005 september 28, 2005 september 19, 2006 april 19, 2007 october 1, 2008 december 4, 2008 april 14, 2009 october 2, 2009 july 4, 2010 november 27, 2010raft) Ada 2005 march 9, 2007 C# 2.0 november 2005 C# 3.0 (beta) C# 3.0 C# 3.5 C# 4.0 september 2005 november 6, 2006 november 19, 2007 april 12, 2010 Objective-C 2.0 Objective-C 2.1 august 7, 2006 august 28, 2009 Java 6 update 2 Java 6 update 7 Java 6 update 11 Java 6 update 14 Java 6 update 24 Java 6 july 11, 2008 december 11, 2006 july 5, 2007 december 2, 2008 june 10, 2009 february 15, 2011 C++0x draft C++1x draft 2008 july 22, 2009 Java 2 (v5.0 update 3) Java 2 (v5.0 update 8) Java 2 (v5.0 update 12) Java 2 (v5.0 update 16) Java 2 (v5.0 update 17) Java 2 (v5.0 update 18) Java 2 (v5.0 update 21) april 28, 2005 august 11, 2006 may 31, 2007 july 11, 2008 december 2, 2008 march 24, 2009 september 11, 2009 Java 2 (v1.4.2_18) Java 2 (v1.4.2_19) Ruby 1.8.3 Ruby 1.8.4 Ruby 1.8.5 Ruby 1.8.6 Ruby 1.8.7 july 11, 2008 december 2, 2008 Ruby 1.9.1 Ruby 1.9.2 preview 1 Ruby 1.9.2 september 21, 2005 august 25, 2006 march 13, 2007 may 31, 2008 january 30, 2009 july 18, 2009 august 18, 2010 december 24, 2005 Self 4.3 ECMA Eiffel june 30, 2006 june 2005 PHP 4.4.1 PHP 4.4.2 PHP 4.4.4 PHP 4.4.7 PHP 4.4.8 PHP 4.4.9 october 31, 2005 january 13, 2006 august 17, 2006 may 3, 2007 january 3, 2008 august 7, 2008PHP 5.0.4 PHP 5.0.5 PHP 5.1.6 PHP 5.2.0 PHP 5.2.3 PHP 5.2.5 PHP 5.2.6 PHP 5.2.7 PHP 5.2.8 PHP 5.3 PHP 5.3.5 PHP 5.1.0 PHP 5.2.4 PHP 5.2.9 january 6, 2011pril 3, 2005 september 6, 2005 november 24, 2005 august 24, 2006 november 2, 2006 may 31, 2007 august 30, 2007 november 9, 2007 may 1, 2008 december 4, 2008 december 8, 2008 february 26, 2009 june 30, 2009 Perl 5.8.7 Perl 5.8.8 Perl 5.10 Perl 5.11.0 Perl 5.12.0 Perl 5.12.3 june 3, 2005 february 2, 2006 december 18, 2007 october 2, 2009 april 12, 2010 january 21, 2011 O’Caml 3.09.2 O’Caml 3.10.0 O’Caml 3.10.2 O’Caml 3.11.0 O’Caml 3.11.1 O’Caml 3.12.0 april 14, 2006 may 16, 2007 february 29, 2008 december 4, 2008 june 12, 2009 august 2, 2010 Scheme R6RS (draft) Scheme R6RS september 14, 2006 august 28, 2007 Haskell 2010 Haskell HP 2010.2.0.0 (announced) july 2010 november 2009 1 2 3 4
    • 1954 1957 FORTRAN FORTRAN I FORTRAN II FORTRAN III november 1954 october 1956 1957 end-1958 B-O Flow-Matic COBOL 1957 1958 1959 JOVIAL 1959 IAL ALGOL 58 1958 1958 Lisp Lisp 1 1958 1959 Languages february 27, 2011 ! Éric Lévénez 1999-2011<http://www.levenez.com/lang/>
    • 1954 1957 FORTRAN FORTRAN I FORTRAN II FORTRAN III november 1954 october 1956 1957 end-1958FORTRAN B-O Flow-Matic COBOL 1957 1958 1959 JOVIAL 1959 IAL ALGOL 58 1958 1958 Lisp Lisp 1 1958 1959 Languages february 27, 2011 ! Éric Lévénez 1999-2011 <http://www.levenez.com/lang/>
    • 1954 1957 FORTRAN FORTRAN I FORTRAN II FORTRAN III november 1954 october 1956 1957 end-1958FORTRAN B-O Flow-Matic COBOL 1957 1958 1959 JOVIAL 1959 IAL ALGOL 58 1958 1958 LISP Lisp Lisp 1 1958 1959 Languages february 27, 2011 ! Éric Lévénez 1999-2011 <http://www.levenez.com/lang/>
    • $(:checkbox).map(function() { return this.id;}).get().join(,);
    • em 2004 ...
    • gem install railsrails new nome_do_projeto
    • Request Web Server Rack Middlewares Routes ControllerView Model
    • Request Web Server Rack Middlewares Routes ControllerView Model
    • Request Web Server Rack Middlewares Routes ControllerView Model
    • Request Web Server Rack Middlewares Routes ControllerView Model
    • Request Web Server Rack Middlewares Routes ControllerView Model
    • Request Web Server Rack Middlewares Routes ControllerView Model
    • Request Web Server Rack Middlewares Routes ControllerView Model
    • Request Web Server Rack Middlewares Routes ControllerView Model
    • Request Web Server Rack Middlewares Routes ControllerView Model
    • Request Web Server Rack Middlewares Routes ControllerView Model
    • Response Request Web Server Rack Middlewares Routes Controller View Model
    • ~30 mil gems ~15 GB
    • bundle install
    • RubyGem “Jar” Rake Ant, MakeBundler* Maven * não baixa toda a internet
    • > bundle listGems included by the bundle: * mail (2.2.19) * abstract (1.0.0) * mime-types (1.16) * actionmailer (3.0.7) * polyglot (0.3.1) * actionpack (3.0.7) * rack (1.2.2) * activemodel (3.0.7) * rack-mount (0.6.14) * activerecord (3.0.7) * rack-test (0.5.7) * activeresource (3.0.7) * rails (3.0.7) * activesupport (3.0.7) * railties (3.0.7) * arel (2.0.9) * rake (0.8.7) * builder (2.1.2) * sqlite3 (1.3.3) * bundler (1.0.13) * thor (0.14.6) * erubis (2.6.6) * treetop (1.4.9) * i18n (0.5.0) * tzinfo (0.3.27)
    • > bundle listGems included by the bundle: * mail (2.2.19) * abstract (1.0.0) * mime-types (1.16) * actionmailer (3.0.7) * polyglot (0.3.1) * actionpack (3.0.7) * rack (1.2.2) * activemodel (3.0.7) * rack-mount (0.6.14) * activerecord (3.0.7) * rack-test (0.5.7) * activeresource (3.0.7) * rails (3.0.7) * activesupport (3.0.7) * railties (3.0.7) * arel (2.0.9) * rake (0.8.7) * builder (2.1.2) * sqlite3 (1.3.3) * bundler (1.0.13) * thor (0.14.6) * erubis (2.6.6) * treetop (1.4.9) * i18n (0.5.0) * tzinfo (0.3.27)
    • > rake -T rake log:clearrake about rake middlewarerake db:create rake notesrake db:drop rake notes:customrake db:fixtures:load rake rails:templaterake db:migrate rake rails:updaterake db:migrate:status rake routesrake db:rollback rake secretrake db:schema:dump rake statsrake db:schema:load rake testrake db:seed rake test:recentrake db:setup rake test:uncommittedrake db:structure:dump rake time:zones:allrake db:version rake tmp:clearrake doc:app rake tmp:create
    • > rails generateUsage: rails generate GENERATOR [args] [options]General options: -h, [--help] # Print generators options and usage -p, [--pretend] # Run but do not make any changes -f, [--force] # Overwrite files that already exist -s, [--skip] # Skip files that already exist -q, [--quiet] # Suppress status outputPlease choose a generator below.Rails: observer controller performance_test generator plugin helper resource integration_test scaffold mailer scaffold_controller migration session_migration model stylesheets
    • > rake middleware Rack Middlewaresuse ActionDispatch::Staticuse Rack::Lockuse ActiveSupport::Cache::Strategy::LocalCacheuse Rack::Runtimeuse Rails::Rack::Loggeruse ActionDispatch::ShowExceptionsuse ActionDispatch::RemoteIpuse Rack::Sendfileuse ActionDispatch::Callbacksuse ActiveRecord::ConnectionAdapters::ConnectionManagementuse ActiveRecord::QueryCacheuse ActionDispatch::Cookiesuse ActionDispatch::Session::CookieStoreuse ActionDispatch::Flashuse ActionDispatch::ParamsParseruse Rack::MethodOverrideuse ActionDispatch::Headuse ActionDispatch::BestStandardsSupportrun Demo::Application.routes
    • Response Request Web Server Rack Middlewares Routes Controller View Model
    • Response Request Web Server Rack Middlewares Routes Controller View Model
    • Response Request Web Server Application Rack Middlewares Server Rack: Mongrel, Routes Thin, Passenger, Controller Unicorn View Model
    • Web Server: NginXResponse Request Apache Web Server Application Rack Middlewares Server Rack: Mongrel, Routes Thin, Passenger, Controller Unicorn View Model
    • Opinionated Software™
    • ... e chegamos em 2011!
    • Tom Mornini CTO
    • Patrocinadores Rubinius JRuby RailsInstaller RVM Bundler JQuery RubySpec
    • +200 mil sites
    • ~1 milhãode desenvolvedores 4M até 2013 (Gartner)
    • Taxa/hora
    • Taxa/hora
    • Taxa/hora
    • Taxa/hora
    • Taxa/hora
    • Taxa/hora
    • Commodity!
    • A maioria trabalha com tecnologia “X”,portanto também vou
    • “Commodity”
    • Um commodity é um bem ou serviço parao qual há demanda, mas que é ofertadosem diferenciação qualitativa notável portodo o mercado.Commoditização acontece à medida queo mercado de bens e serviços perdediferenciação por toda sua base defornecimento - normalmente porquetodos estão fazendo a mesma coisa. Wikipedia
    • Um commodity é um bem ou serviço parao qual há demanda, mas que é ofertadosem diferenciação qualitativa notável portodo o mercado.Commoditização acontece à medida queo mercado de bens e serviços perdediferenciação por toda sua base defornecimento - normalmente porquetodos estão fazendo a mesma coisa. Wikipedia
    • Um commodity é um bem ou serviço parao qual há demanda, mas que é ofertadosem diferenciação qualitativa notável portodo o mercado.Commoditização acontece à medida queo mercado de bens e serviços perdediferenciação por toda sua base defornecimento - normalmente porquetodos estão fazendo a mesma coisa. Wikipedia
    • 2x
    • 100xZOMG!
    • Jack of All Trades master of none
    • Renaissance Man Polymath
    • SchedulerFactory sf = new StdSchedulerFactory();Scheduler sched = sf.getScheduler();job = new JobDetail("job2", "group1", SimpleJob.class);trigger = new CronTrigger("trigger2", "group1", "job2", "group1", "15 0/2 * * * ?");sched.addJob(job, true);
    • SchedulerFactory sf = new StdSchedulerFactory();Scheduler sched = sf.getScheduler();JobDetail job = newJob(SimpleJob.class) .withIdentity("job1", "group1") .build();CronTrigger trigger = newTrigger() .withIdentity("trigger1", "group1") .withSchedule(cronSchedule("0/20 * * * * ?")) .build();sched.scheduleJob(job, trigger);
    • Domain Speci cLanguage (DSL)
    • describe Account do it "has a balance of zero when first created" do Account.new.balance.should eq(Money.new(0)) endend
    • Perl
    • Python
    • PHP
    • Ruby
    • OMG!
    • Core Team
    • Core Team
    • Core Team
    • Core Team
    • Core Team
    • Core Team
    • Core Team
    • Core Team
    • Core Team
    • Core Team
    • +30 mil gems +15 GB
    • • Mais Fácil de aprender?• Mais Produtivo?• Mais Qualidade?
    • Depende doDesenvolvedor!
    • 500 mercados 44 países
    • 38.5M assinantes (EUA)
    • 2 meses(tempo desenv. 50% menor)
    • Variáveis$blue: #3bbfce;$margin: 16px; /* CSS */.content-navigation { .content-navigation { border-color: $blue; border-color: #3bbfce; color: color: #2b9eab; darken($blue, 9%); }} .border {.border { padding: 8px; padding: $margin / 2; margin: 8px; margin: $margin / 2; border-color: #3bbfce; border-color: $blue; }}
    • Nestingtable.hl { /* CSS */ margin: 2em 0; td.ln { table.hl { text-align: right; margin: 2em 0; } }} table.hl td.ln { text-align: right;li { } font: { family: serif; li { weight: bold; font-family: serif; size: 1.2em; font-weight: bold; } font-size: 1.2em;} }
    • Mixins@mixin table-base { th { /* CSS */ text-align: center; font-weight: bold; #data { } td, th {padding: 2px} float: left;} margin-left: 10px; }@mixin left($dist) { #data th { float: left; text-align: center; margin-left: $dist; font-weight: bold;} } #data td, #data th {#data { @include left(10px); padding: 2px; @include table-base; }}
    • Selector Inheritance /* CSS */.error { .error, .badError { border: 1px #f00; border: 1px #f00; background: #fdd; background: #fdd;} }.error.intrusion { font-size: 1.3em; .error.intrusion, font-weight: bold; .badError.intrusion {} font-size: 1.3em; font-weight: bold;.badError { } @extend .error; border-width: 3px; .badError {} border-width: 3px; }
    • var Animal, Horse, Snake, sam, tom; var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor;class Animal child.__super__ = parent.prototype; constructor: (@name) -> return child; }; Animal = (function() { move: (meters) -> function Animal(name) { this.name = name; alert @name + " moved " + meters + "m." } Animal.prototype.move = function(meters) { return alert(this.name + " moved " + meters + "m.");class Snake extends Animal }; return Animal; move: -> })(); alert "Slithering..." Snake = (function() { __extends(Snake, Animal); super 5 function Snake() { Snake.__super__.constructor.apply(this, arguments); }class Horse extends Animal Snake.prototype.move = function() { alert("Slithering..."); move: -> return Snake.__super__.move.call(this, 5); alert "Galloping..." }; return Snake; super 45 })(); Horse = (function() { __extends(Horse, Animal);sam = new Snake "Sammy the Python" function Horse() {tom = new Horse "Tommy the Palomino" Horse.__super__.constructor.apply(this, arguments); } Horse.prototype.move = function() { alert("Galloping...");sam.move() return Horse.__super__.move.call(this, 45);tom.move() }; return Horse; })(); sam = new Snake("Sammy the Python"); tom = new Horse("Tommy the Palomino"); sam.move(); tom.move(); loadrun
    • 102
    • Rails 3.1:Release CandidateTHIS WEEK! (may 2011)
    • Material
    • RubyConf Brasil3 e 4 de Novembro
    • Pedro Franceschi @pedroh96
    • 15 anosPedro Franceschi @pedroh96
    • 9 anosPedro Franceschi @pedroh96
    • 6 anosPedro Franceschi @pedroh96
    • Pedro Franceschi @pedroh96
    • Obrigado! www.akitaonrails.com www.gonow.com.br u.akita.ws/semac2011
    • One more thing ...
    • Sorteio de Bolsas de Estudo Online (3)
    • Curso de Ruby on Rails 3 do básico ao avançado com o Daniel V. Lopes (http://egenial.com.br/cursorails)Curso de Node.js com Emerson Leite da Globo.com (http://egenial.com.br/nodejs) Curso de HTML5+CSS3 com o Cleiton Francisco da Jus Navegandi (http://egenial.pro/pt/html5)
    • Curso de Ruby on Rails 3 do básico ao avançado com o Daniel V. Lopes (http://egenial.com.br/cursorails)Curso de Node.js com Emerson Leite da Globo.com (http://egenial.com.br/nodejs) Curso de HTML5+CSS3 com o Cleiton Francisco da Jus Navegandi (http://egenial.pro/pt/html5)
    • Curso de Ruby on Rails 3 do básico ao avançado com o Daniel V. Lopes (http://egenial.com.br/cursorails)Curso de Node.js com Emerson Leite da Globo.com (http://egenial.com.br/nodejs) Curso de HTML5+CSS3 com o Cleiton Francisco da Jus Navegandi (http://egenial.pro/pt/html5)
    • Obrigado! www.akitaonrails.com www.gonow.com.br u.akita.ws/semac2011