Workshop de Ruby e Rails na USP Leste 2012
Upcoming SlideShare
Loading in...5
×
 

Workshop de Ruby e Rails na USP Leste 2012

on

  • 1,796 views

Workshop apresentado na 3a Semana de Sistemas de Informação da USP Leste em 2012

Workshop apresentado na 3a Semana de Sistemas de Informação da USP Leste em 2012

Statistics

Views

Total Views
1,796
Views on SlideShare
1,596
Embed Views
200

Actions

Likes
7
Downloads
43
Comments
0

6 Embeds 200

http://www.each.usp.br 187
http://coderwall.com 6
https://twitter.com 3
https://si0.twimg.com 2
http://www.hanrss.com 1
http://www.linkedin.com 1

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

Workshop de Ruby e Rails na USP Leste 2012 Workshop de Ruby e Rails na USP Leste 2012 Presentation Transcript

  • WorkshopRuby on Rails Aprendendo na Prática (versão 2012) Fabio Akita
  • anos 80 anos 90 século XXI
  • anos 80 anos 90 século XXI Clipper .NETdBase III C/Pascal Java RubyBasic Delphi ASP Visual Basic ABAP ObjC Perl Python PHP Javascript
  • anos 80 anos 90 século XXI
  • anos 80 anos 90 século XXI
  • anos 80 anos 90 século XXI
  • anos 80 anos 90 século XXI
  • anos 80 anos 90 século XXI
  • anos 80 anos 90 século XXI
  • http:/ /slideshare.net/akitaonrails
  • ~1 milhãode desenvolvedores 4M até 2013 (Gartner)
  • ComoAprender? Dica: depois pesquisem todos os links mostrados
  • BIGSUCCESS!
  • Ruby 1994 (linguagem)Ruby on Rails 2004 (framework web)
  • 1.8.7 Ruby 1.9.2 1.9.3 2.3.14 3.0.17Ruby on Rails 3.1.8 3.2.8
  • 1.8.7 Ruby 1.9.2 1.9.3 2.3.14 3.0.17Ruby on Rails 3.1.8 3.2.8
  • 1.8.7 Ruby 1.9.2 1.9.3 2.3.14 3.0.17Ruby on Rails 3.1.8 3.2.8
  • 1.8.7 Ruby 1.9.2 1.9.3 2.3.14 3.0.17Ruby on Rails 3.1.8 3.2.8
  • 1.8.7 Ruby 1.9.2 1.9.3 2.3.14 3.0.17Ruby on Rails 3.1.8 3.2.8
  • 1.8.7 Ruby 1.9.2 1.9.3 2.3.14 3.0.17Ruby on Rails 3.1.8 3.2.8
  • Para que serve?
  • git clone git://github.com/qwertyreddy/rubystein.gitcd rubysteingem install gosuruby wolf3d.rb
  • Instalando
  • curl -L https://get.rvm.io | bash -s stable rvm install 1.9.3
  • O.O.P.
  • UMLDiagrama de Classes
  • “Eu inventei o termoOrientação a Objetos e posso dizer que eu não tinha C++ em mente” Alan Kay
  • Assemblerhardware x86
  • Assembler Assemblerhardware hardware x86 PowerPC
  • Assembler Assembler Assemblerhardware hardware hardware x86 PowerPC ARM
  • C/C++/PascalAssembler Assembler Assemblerhardware hardware hardware x86 PowerPC ARM
  • PHPPerl Python C/C++/Pascal Assembler Assembler Assembler hardware hardware hardware x86 PowerPC ARM
  • PHP .NET Virtual Java Virtual MachinePerl Python Machine C/C++/Pascal Assembler Assembler Assembler hardware hardware hardware x86 PowerPC ARM
  • Java (bytecode) CIL PHP .NET Virtual Java Virtual MachinePerl Python Machine C/C++/Pascal Assembler Assembler Assembler hardware hardware hardware x86 PowerPC ARM
  • Java (linguagem) C# VB Java (bytecode) CIL PHP .NET Virtual Java Virtual MachinePerl Python Machine C/C++/Pascal Assembler Assembler Assembler hardware hardware hardware x86 PowerPC ARM
  • Scala Clojure Java (linguagem) C# VB Java (bytecode) CIL PHP .NET Virtual Java Virtual MachinePerl Python Machine C/C++/Pascal Assembler Assembler Assembler hardware hardware hardware x86 PowerPC ARM
  • JRuby Scala Clojure Java (linguagem) C# VB Java (bytecode) CILRuby PHP .NET Virtual Java Virtual MachinePerl Python Machine C/C++/Pascal Assembler Assembler Assembler hardware hardware hardware x86 PowerPC ARM
  • 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(,);
  • (map (lambda (x) (+ x x)) mylist)
  • (map (lambda (x) (+ x x)) mylist)
  • “Hello World”
  • C#include <stdio.h>int main(){ printf("Hello worldn"); return 0;}
  • Javaclass HelloWorldApp { static void main(String[] args) { System.out.println( "Hello World!"); }}
  • SmalltalkTranscript show: Hello, world!.
  • Rubyputs 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=> Object
  • 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 => 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)
  • Opcionais
  • 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"
  • return automáticodef hello(name) "Hello, " + nameendputs hello "Fabio" => "Hello, Fabio"
  • def hello(name) "Hello, #{name}"endputs hello "Fabio" => "Hello, Fabio"
  • def hello(name) "Hello, #{name}"end Interpolaçãoputs hello "Fabio" => "Hello, Fabio"
  • class String def hello(name) "#{self}, #{name}" endend
  • class String def hello(name) "#{self}, #{name}" endend
  • class String def hello(name) "#{self}, #{name}" endend"Hello".hello "Fabio" => "Hello, Fabio"
  • Classes Abertas!class String def hello(name) "#{self}, #{name}" endend"Hello".hello "Fabio" => "Hello, Fabio"
  • module Legal def bu! "Buuu!" endend
  • class Stringmodule Legal include Legal def bu! end "Buuu!" end class Fixnumend include Legal end
  • class Stringmodule Legal include Legal def bu! end "Buuu!" end class Fixnumend include Legal end "foo".bu! => "Buuu!"
  • class Stringmodule Legal include Legal def bu! end "Buuu!" end class Fixnumend include Legal end "foo".bu! 10.bu! => "Buuu!" => "Buuu!"
  • require rubygemsrequire active_support/all
  • require rubygemsrequire active_support/allTime.now + 1.day => 2012-08-22 02:15:35 -0300
  • require rubygemsrequire active_support/allTime.now + 1.day => 2012-08-22 02:15:35 -0300Time.now + 1.week => 2012-08-28 02:15:35 -0300
  • require rubygemsrequire active_support/allTime.now + 1.day => 2012-08-22 02:15:35 -0300Time.now + 1.week => 2012-08-28 02:15:35 -0300(1.gigabyte - 100.megabytes) /1.megabyte => 924
  • Mensagens
  • class Fooend
  • class FooendFoo.new.bar => NoMethodError: undefinedmethod `bar for #<Foo:0x007f8f62038330> from (irb):8 from /Users/akitaonrails/.rvm/rubies/ruby-1.9.3-head/bin/irb:16:in `<main>
  • class Foo def method_missing(method) print "#{method} called" endend
  • class Foo def method_missing(method) print "#{method} called" endendFoo.new.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 Messages! => "bar called"Foo.new.send(:bar) => "bar called"
  • require builderxml = Builder::XmlMarkup.newxml.instruct! :xmlxml.Hello "World!"xml.date do xml.year "2006" xml.month "01" xml.day "01"end
  • require builderxml = Builder::XmlMarkup.newxml.instruct! :xmlxml.Hello "World!"xml.date do xml.year "2006" xml.month "01" xml.day "01"end
  • <?xml version="1.1" encoding="US-ASCII"?><Hello>World!</Hello><date> <year>2006</year> <month>01</month> <day>01</day></date>
  • <?xml version="1.1" encoding="US-ASCII"?><Hello>World!</Hello><date> <year>2006</year> <month>01</month> <day>01</day></date>
  • TipagemDinâmica
  • class Gato def falar "miau" endend
  • class Gato class Pato def falar def falar "miau" "qua qua" end endend end
  • class Gato class Pato def falar def falar "miau" "qua qua" end end end enddef ouvir(animal) animal.falarend
  • class Gato class Pato def falar def falar "miau" "qua qua" end end end end ouvir(Gato.new)def ouvir(animal) => "miau" animal.falarend
  • class Gato class Pato def falar def falar "miau" "qua qua" end end end end ouvir(Gato.new)def ouvir(animal) => "miau" animal.falarend ouvir(Pato.new) => "qua qua"
  • Protocol > Interface
  • +40 mil gems ~20 GB
  • bundle install
  • RubyGem “Jar” Rake Ant, MakeBundler Maven
  • Web e Rails
  • Framework paraAplicações Web
  • gem install rails
  • rails new projeto
  • Request servidor web Rack Middlewares Routes ControllerView Model
  • Request servidor web Rack Middlewares Routes ControllerView Model
  • Request servidor web Rack Middlewares Routes ControllerView Model
  • Request servidor web Rack Middlewares Routes ControllerView Model
  • Request servidor web Rack Middlewares Routes ControllerView Model
  • Request servidor web Rack Middlewares Routes ControllerView Model
  • Request servidor web Rack Middlewares Routes ControllerView Model
  • Request servidor web Rack Middlewares Routes ControllerView Model
  • Request servidor web Rack Middlewares Routes ControllerView Model
  • Request servidor web Rack Middlewares Routes ControllerView Model
  • Response Request servidor web Rack Middlewares Routes Controller View Model
  • +40 mil gems ~20 GB
  • bundle install
  • 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
  • Request Web Server Rails App/public/stylesheets
  • Request Web ServerArquivosEstáticos Rails App /public/stylesheets
  • Variáveis$blue: #3bbfce; /* CSS */$margin: 16px;
  • Variáveis$blue: #3bbfce; /* CSS */$margin: 16px;.content-navigation { border-color: $blue; color: darken($blue, 9%);}
  • Variáveis$blue: #3bbfce; /* CSS */$margin: 16px;.content-navigation { .content-navigation { border-color: $blue; border-color: #3bbfce; color: color: #2b9eab; darken($blue, 9%); }}
  • Variáveis$blue: #3bbfce; /* CSS */$margin: 16px;.content-navigation { .content-navigation { border-color: $blue; border-color: #3bbfce; color: color: #2b9eab; darken($blue, 9%); }}.border { padding: $margin / 2; margin: $margin / 2; border-color: $blue;}
  • Variáveis$blue: #3bbfce; /* CSS */$margin: 16px;.content-navigation { .content-navigation { border-color: $blue; border-color: #3bbfce; color: color: #2b9eab; darken($blue, 9%); }}.border { .border { padding: $margin / 2; padding: 8px; margin: $margin / 2; margin: 8px; border-color: $blue; border-color: #3bbfce;} }
  • Nesting /* CSS */table.hl { margin: 2em 0; td.ln { text-align: right; }}
  • Nesting /* CSS */table.hl { table.hl { margin: 2em 0; margin: 2em 0; td.ln { } text-align: right; table.hl td.ln { } text-align: right;} }
  • Nesting /* CSS */table.hl { table.hl { margin: 2em 0; margin: 2em 0; td.ln { } text-align: right; table.hl td.ln { } text-align: right;} }li { font: { family: serif; weight: bold; size: 1.2em; }}
  • Nesting /* CSS */table.hl { table.hl { margin: 2em 0; margin: 2em 0; td.ln { } text-align: right; table.hl td.ln { } text-align: right;} }li { font: { li { family: serif; font-family: serif; weight: bold; font-weight: bold; size: 1.2em; font-size: 1.2em; } }}
  • class Animal constructor: (@name) -> move: (meters) -> alert @name + " moved " + meters + "m."class Snake extends Animal move: -> alert "Slithering..." super 5class Horse extends Animal move: -> alert "Galloping..." super 45sam = new Snake "Sammy the Python"tom = new Horse "Tommy the Palomino"sam.move()tom.move()
  • 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; child.__super__ = parent.prototype; return child;};Animal = (function() { function Animal(name) { this.name = name; } Animal.prototype.move = function(meters) { return alert(this.name + " moved " + meters + "m."); }; return Animal;})();Snake = (function() { __extends(Snake, Animal); function Snake() { Snake.__super__.constructor.apply(this, arguments); } Snake.prototype.move = function() { alert("Slithering..."); return Snake.__super__.move.call(this, 5); }; return Snake;})();Horse = (function() { __extends(Horse, Animal); function Horse() { Horse.__super__.constructor.apply(this, arguments); } Horse.prototype.move = function() { alert("Galloping..."); return Horse.__super__.move.call(this, 45); }; return Horse;})();sam = new Snake("Sammy the Python");tom = new Horse("Tommy the Palomino");sam.move();tom.move();loadrun
  • 102
  • Request Request Web Server Web Server(Desenvolvimento) (Produção) Rails App /app/assets /public
  • Request Request Web Server Web Server(Desenvolvimento) (Produção) Rails Sprockets App /app/assets /public
  • Request Request Web Server Web Server(Desenvolvimento) (Produção) Rails Sprockets App Tilt /app/assets /public
  • Request Request Web Server Web Server(Desenvolvimento) (Produção) Rails Sprockets App Tilt Uglifier /app/assets /public
  • ENGINE FILE EXTENSIONS REQUIRED LIBRARIESERB .erb, .rhtml noneInterpolated String .strErubis .erb, .rhtml, .erubis erubisHaml .haml hamlSass .sass sassScss .scssLess CSS .less lessBuilder .builder builderLiquid .liquid liquidRDiscount rdiscountRedcarpet redcarpetBlueCloth .markdown, .mkd, .md blueclothKramdown kramdownMaruku marukuRedCloth .textile redclothRDoc .rdoc rdocRadius .radius radiusMarkaby .mab markabyNokogiri .nokogiri nokogiriCoffeeScript .coffee coffee-scriptCreole (Wiki markup) .creole creole
  • jQuery Tamanho Tempo Original Size 621kbGoogle Closure 234kb 6.5sYUI Compressor 240kb 2.7s UglifyJS 235kb 1.3s
  • jQuery Tamanho Tempo Original Size 621kbGoogle Closure 234kb 6.5sYUI Compressor 240kb 2.7s UglifyJS 235kb 1.3s
  • jQuery Tamanho Tempo Original Size 621kbGoogle Closure 234kb 6.5sYUI Compressor 240kb 2.7s UglifyJS 235kb 1.3s
  • jQuery Tamanho Tempo Original Size 621kbGoogle Closure 234kb 6.5sYUI Compressor 240kb 2.7s UglifyJS 235kb 1.3s
  • jQuery Tamanho Tempo Original Size 621kbGoogle Closure 234kb 6.5sYUI Compressor 240kb 2.7s UglifyJS 235kb 1.3s
  • RedmineGerenciador de Projetos
  • git clone git://github.com/redmine/ redmine.git (edit) config/database.yml bundle installbundle exec rake generate_session_store bundle exec rake db:create bundle exec rake db:migrate bundle exec rails server
  • ContentManagement Systems
  • gem install refinerycmsrefinerycms demo_refinery_site cd demo_refinery_site bundle exec rails server
  • Nanoc3Gerador de Sites
  • gem install kramdown gem install adsf gem install nanoc
  • nanoc create_site nanoc_demo nanoc compile nanoc view (não é Rails!)
  • Material
  • RubyConf Brasil30 e 31 de Agosto
  • Obrigado! www.akitaonrails.com www.codeminer42.com u.akita.ws/uspleste2012