Upload
fabio-akita
View
897
Download
3
Embed Size (px)
DESCRIPTION
Mini curso ministrado no Semcomp 15 da USP São Carlos. Parte do curso foi descrito em quadro branco. Os slides são referências somente para quem fez o curso ao vivo.
Citation preview
WorkshopRuby on Rails
Aprendendo na Prática (versão 2012)
anos 80 anos 90 século XXI
anos 80 anos 90 século XXI
Basic
dBase III
Clipper
C/Pascal
Delphi
Visual Basic
Java
.NET
Perl
PHP
Python
ABAP
Ruby
ObjC
ASP
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
~1 milhãode desenvolvedores
4M até 2013 (Gartner)
Como Aprender?
Dica: depois pesquisem todos os links mostrados
BIG SUCCESS!
2004
David Heinemeir Hansson@dhh
2004
David Heinemeir Hansson@dhh
1993
“Matz”
Ruby(linguagem)
1993
Ruby on Rails(framework web)
2004
Ruby
1.8.7
Ruby 1.9.2Ruby
1.9.3
Ruby on Rails
2.3.14
Ruby on Rails3.0.17
Ruby on Rails3.1.8
Ruby on Rails
3.2.8
Ruby
1.8.7
Ruby 1.9.2Ruby
1.9.3
Ruby on Rails
2.3.14
Ruby on Rails3.0.17
Ruby on Rails3.1.8
Ruby on Rails
3.2.8
Ruby
1.8.7
Ruby 1.9.2Ruby
1.9.3
Ruby on Rails
2.3.14
Ruby on Rails3.0.17
Ruby on Rails3.1.8
Ruby on Rails
3.2.8
Ruby
1.8.7
Ruby 1.9.2Ruby
1.9.3
Ruby on Rails
2.3.14
Ruby on Rails3.0.17
Ruby on Rails3.1.8
Ruby on Rails
3.2.8
Ruby
1.8.7
Ruby 1.9.2Ruby
1.9.3
Ruby on Rails
2.3.14
Ruby on Rails3.0.17
Ruby on Rails3.1.8
Ruby on Rails
3.2.8
Ruby
1.8.7
Ruby 1.9.2Ruby
1.9.3
Ruby on Rails
2.3.14
Ruby on Rails3.0.17
Ruby on Rails3.1.8
Ruby on Rails
3.2.8
Pequeno Exemplo
git clone git://github.com/qwertyreddy/rubystein.git
cd rubystein
gem install gosu
ruby wolf3d.rb
Instalando
curl -L https://get.rvm.io | bash -s stable
rvm help install
rvm install 1.9.3
http://www.akitaonrails.com/Screencasts
http://u.akita.ws/ubuntu1204
O.O.P.
UMLDiagrama de Classes
“Eu inventei o termo
Orientação a Objetos
e posso dizer que
eu não tinha
C++ em mente”
Alan Kay
hardwarex86
Assembler
hardwarex86
hardwarePowerPC
Assembler Assembler
hardwarex86
hardwarePowerPC
hardwareARM
Assembler Assembler Assembler
hardwarex86
hardwarePowerPC
hardwareARM
Assembler Assembler Assembler
C/C++/Pascal
hardwarex86
hardwarePowerPC
hardwareARM
Assembler Assembler Assembler
C/C++/Pascal
Perl Python
PHP
hardwarex86
hardwarePowerPC
hardwareARM
Assembler Assembler Assembler
C/C++/Pascal
Perl PythonJava Virtual Machine .NET Virtual
Machine
PHP
hardwarex86
hardwarePowerPC
hardwareARM
Assembler Assembler Assembler
C/C++/Pascal
Perl PythonJava Virtual Machine .NET Virtual
Machine
Java (bytecode) CILPHP
hardwarex86
hardwarePowerPC
hardwareARM
Assembler Assembler Assembler
C/C++/Pascal
Perl PythonJava Virtual Machine .NET Virtual
Machine
Java (bytecode) CIL
Java (linguagem) C# VB
PHP
hardwarex86
hardwarePowerPC
hardwareARM
Assembler Assembler Assembler
C/C++/Pascal
Perl PythonJava Virtual Machine .NET Virtual
Machine
Java (bytecode) CIL
Java (linguagem) C# VB
Scala Clojure
PHP
hardwarex86
hardwarePowerPC
hardwareARM
Assembler Assembler Assembler
C/C++/Pascal
Perl Python
Ruby
Java Virtual Machine .NET Virtual Machine
Java (bytecode) CIL
Java (linguagem) C# VB
JRuby Scala Clojure
PHP
Fortran 90 ISO1991
SML ‘901990
Oakjune 1991
Perl 4.000march 21, 1991
PostScript level 21992
Perl 5.000october 18, 1994
Common Lisp ANSIdecember 8, 1994
Scheme IEEE1990
Python1991
NetRexx1991
ISO C(C90)
december 15, 1990
Caml 2-6.11991
Caml 3.11993
Visual Basic 1.0may 20, 1991
Oberon-21991
Sather 0.1june 1991
Sather 1.0mid-1994
Rubyfebruary 24, 1993
Haskell 1.1april 1, 1990
Haskell 1.2march 1992
Cmm1992
1990
MUMPS ISO1992
M1994
A+1992
J1990
Visual Basic 2.0march 1992
Visual Basic 3.0june 93
Eiffel 31993
MS PDS 7.11990
SML ‘971997
Java 2 (v1.2)december 8, 1998
PostScript level 3september 11, 1996
C++98 ANSI/ISO1998
APL961996
OO COBOL1997
Scheme R5RS1998
Ada 951995
Java 1may 23, 1995
Delphimarch 2, 1995
Delphi 5august, 1999
Modula-2 ISOjune 1, 1996
Tcl/Tk 8.1april 1999
Python 1.5.2april 13, 1999
Perl 5.005_50july 26, 1998
NetRexx 1.150july 23, 1999
Object Rexxfebruary 25, 1997
Prolog IV1997
ISO C(C95)
april 1, 1996
ISO C (C99)december 1, 1999
Objective Caml1996 O’Caml 2
1998
Visual Basic 6.0june 16, 1998
Sather 1.1september 1995
Sather 1.2.1november 4, 1999
Ruby 0.95december 1995
Ruby 1.1 alpha 0august 13, 1997 Ruby 1.3.2
april 2, 1999
Haskell 1.3may 1996
Haskell 1.4april 1997
Haskell 98february 1999
Fortran 95 ISOdecember 15, 1997
LiveScript1995
JavaScriptdecember 1995
JavaScript 1.5
ECMAScriptjune 1997
ECMAScript ed3december 1999
JScriptmay 1996
Self 4.0july 10, 1995
PHP/FI1995 PHP 2.0
nov. 13, 1997PHP 3.0
june 6, 1998
O’Caml 1.0.7december 11, 1997
Tcl/Tk 8.2.3dec. 16, 1999
Eiffel 4december 11, 1996
Eiffel 4.2february 6, 1998
1995
M ANSIdec 8, 1995
Open Mdec 11, 1995
M ISO1999
K1996
Visual Basic 4.0september 1995
Visual Basic 5.0april 1997
ANSI Rexx
ISO Forth1997
ANSI Smalltalkmay 19, 1998
Modula-2 ISOGeneric Extensiondecember 19, 1998
JavaScript 2.0(draft 1)
february 18, 1999
Pascal AFNOR1983
Object Pascal1985
PostScript1982
Smalltalk-801980
ANSI C(C89)1989
Objective-C1983
C with Classesapril 1980 C++
july 1983
Concurrent C1984
Eiffel1986
nawk1985
COBOL 85 ISO/ANSI1985
Common Lisp1984
Scheme 841984
Ada 83 ANSIjanuary 1983
Ada ISO1987
Oberon1987
Prolog IIoctober 1982
OO Forth1987
Clos1989
Object Logo1986
Prolog III1984
APL 2august 1984
SML1984
Modula 31988
Perl 3.000october 18, 1989
Perl 2.000january 5, 1988
Perl 1.000december 18, 1987
Tclmid 1988
Tcl/Tkend 1988
Rex 2.001980
Rex 3.001982
Rexx 3.201984
Caml1987
Eiffel 21988
ABC1987
B1981
Haskell 1.01987
Self
BorlandTurbo Pascal
Cedar1983
1980 1985
MUMPS (FIPS)1986
Sharp APL
A1988
Miranda1982
KRC1981
Forth-831983
ANS Forth1986
ARM C++1989
BASICA1981
GW-Basic1983
MS Basic PDS 7.01989
QuickBasic 1.01985
QuickBasic 4.51988
Fortran 90 ISO1991
SML ‘901990
Oakjune 1991
Perl 4.000march 21, 1991
PostScript level 21992
Perl 5.000october 18, 1994
Common Lisp ANSIdecember 8, 1994
Scheme IEEE1990
Python1991
NetRexx1991
ISO C(C90)
december 15, 1990
Caml 2-6.11991
Caml 3.11993
Visual Basic 1.0may 20, 1991
Oberon-21991
Sather 0.1june 1991
Sather 1.0mid-1994
Rubyfebruary 24, 1993
Haskell 1.1april 1, 1990
Haskell 1.2march 1992
Cmm1992
1990
MUMPS ISO1992
M1994
A+1992
J1990
Visual Basic 2.0march 1992
Visual Basic 3.0june 93
Eiffel 31993
MS PDS 7.11990
SML ‘971997
Java 2 (v1.2)december 8, 1998
PostScript level 3september 11, 1996
C++98 ANSI/ISO1998
APL961996
OO COBOL1997
Scheme R5RS1998
Ada 951995
Java 1may 23, 1995
Delphimarch 2, 1995
Delphi 5august, 1999
Modula-2 ISOjune 1, 1996
Tcl/Tk 8.1april 1999
Python 1.5.2april 13, 1999
Perl 5.005_50july 26, 1998
NetRexx 1.150july 23, 1999
Object Rexxfebruary 25, 1997
Prolog IV1997
ISO C(C95)
april 1, 1996
ISO C (C99)december 1, 1999
Objective Caml1996 O’Caml 2
1998
Visual Basic 6.0june 16, 1998
Sather 1.1september 1995
Sather 1.2.1november 4, 1999
Ruby 0.95december 1995
Ruby 1.1 alpha 0august 13, 1997 Ruby 1.3.2
april 2, 1999
Haskell 1.3may 1996
Haskell 1.4april 1997
Haskell 98february 1999
Fortran 95 ISOdecember 15, 1997
LiveScript1995
JavaScriptdecember 1995
JavaScript 1.5
ECMAScriptjune 1997
ECMAScript ed3december 1999
JScriptmay 1996
Self 4.0july 10, 1995
PHP/FI1995 PHP 2.0
nov. 13, 1997PHP 3.0
june 6, 1998
O’Caml 1.0.7december 11, 1997
Tcl/Tk 8.2.3dec. 16, 1999
Eiffel 4december 11, 1996
Eiffel 4.2february 6, 1998
1995
M ANSIdec 8, 1995
Open Mdec 11, 1995
M ISO1999
K1996
Visual Basic 4.0september 1995
Visual Basic 5.0april 1997
ANSI Rexx
ISO Forth1997
ANSI Smalltalkmay 19, 1998
Modula-2 ISOGeneric Extensiondecember 19, 1998
JavaScript 2.0(draft 1)
february 18, 1999
Pascal AFNOR1983
Object Pascal1985
PostScript1982
Smalltalk-801980
ANSI C(C89)1989
Objective-C1983
C with Classesapril 1980 C++
july 1983
Concurrent C1984
Eiffel1986
nawk1985
COBOL 85 ISO/ANSI1985
Common Lisp1984
Scheme 841984
Ada 83 ANSIjanuary 1983
Ada ISO1987
Oberon1987
Prolog IIoctober 1982
OO Forth1987
Clos1989
Object Logo1986
Prolog III1984
APL 2august 1984
SML1984
Modula 31988
Perl 3.000october 18, 1989
Perl 2.000january 5, 1988
Perl 1.000december 18, 1987
Tclmid 1988
Tcl/Tkend 1988
Rex 2.001980
Rex 3.001982
Rexx 3.201984
Caml1987
Eiffel 21988
ABC1987
B1981
Haskell 1.01987
Self
BorlandTurbo Pascal
Cedar1983
1980 1985
MUMPS (FIPS)1986
Sharp APL
A1988
Miranda1982
KRC1981
Forth-831983
ANS Forth1986
ARM C++1989
BASICA1981
GW-Basic1983
MS Basic PDS 7.01989
QuickBasic 1.01985
QuickBasic 4.51988
Languagesfebruary 27, 2011
© Éric Lévénez 1999-2011<http://www.levenez.com/lang/>
FORTRAN II1957
FORTRANnovember 1954
FORTRAN Ioctober 1956
FORTRAN IIIend-1958
Flow-Matic1958
ALGOL 581958
Lisp1958
Lisp 11959
COBOL1959
B-O1957
1954 1957
IAL1958
JOVIAL1959
Forth1968
BASICmay 1, 1964
COBOL 611961
COBOL1965
FORTRAN IV(Fortran 66 ANS)
1966FORTRAN IV
1962
BCPLjuly 1967
ALGOL 68december
1968
PL/I1964
B1969
Simula 671967
COBOL 68 ANS1968
APL1960
ALGOL 601960
SNOBOL1962
Simula I1964
Lisp 1.51962
SNOBOL 2april 1964
SNOBOL 31965
SNOBOL 41967
Logo1968
COBOL 61 Extended
1962
CPL1963
1960 1965
MUMPS1966
ISWIM1966
JOVIAL I1960
JOVIAL II1961
JOVIAL 31965
CORAL 641964
CORAL 661966
TELCOMP1965
JOSS1964
GOGOL1964
GOGOL III1967
Sail1968
sh1969
ALGOL W1966
Ada1979
FORTRAN V(Fortran 77 ANSI)
april 1978
CLU1974
COBOL 74 ANSI1974
Modula1975
Modula 21979
C (K&R)1978
C1971
awk1978
cshoctober 1978
Scheme MIT1978
Scheme1975
Prolog1970
Icon1977
Smalltalk-721972
PL/1 ANS1976
PL/M1972
Smalltalk-761976
Smalltalk-741974
Smalltalk-781978
Rex 1.00may 1979
MS Basic 2.0july 1975
Pascal1970
ML1973
Mesa1977
1970 1975
MUMPS (ANSI)september 15, 1977
SASL1976
sed1973
FIG-Forth1978
Mainsail1975
SL51976
Smalltalk1971
Classic C
Pascal AFNOR1983
Object Pascal1985
PostScript1982
Smalltalk-801980
ANSI C(C89)1989
Objective-C1983
C with Classesapril 1980 C++
july 1983
Concurrent C1984
Eiffel1986
nawk1985
COBOL 85 ISO/ANSI1985
Common Lisp1984
Scheme 841984
Ada 83 ANSIjanuary 1983
Ada ISO1987
Oberon1987
Prolog IIoctober 1982
OO Forth1987
Clos1989
Object Logo1986
Prolog III1984
APL 2august 1984
SML1984
Modula 31988
Perl 3.000october 18, 1989
Perl 2.000january 5, 1988
Perl 1.000december 18, 1987
Tclmid 1988
Tcl/Tkend 1988
Rex 2.001980
Rex 3.001982
Rexx 3.201984
Caml1987
Eiffel 21988
ABC1987
B1981
Haskell 1.01987
Self
BorlandTurbo Pascal
Cedar1983
1980 1985
MUMPS (FIPS)1986
Sharp APL
A1988
Miranda1982
KRC1981
Forth-831983
ANS Forth1986
ARM C++1989
BASICA1981
GW-Basic1983
MS Basic PDS 7.01989
QuickBasic 1.01985
QuickBasic 4.51988
1 2 3 4
Pascal AFNOR1983
Object Pascal1985
PostScript1982
Smalltalk-801980
ANSI C(C89)1989
Objective-C1983
C with Classesapril 1980 C++
july 1983
Concurrent C1984
Eiffel1986
nawk1985
COBOL 85 ISO/ANSI1985
Common Lisp1984
Scheme 841984
Ada 83 ANSIjanuary 1983
Ada ISO1987
Oberon1987
Prolog IIoctober 1982
OO Forth1987
Clos1989
Object Logo1986
Prolog III1984
APL 2august 1984
SML1984
Modula 31988
Perl 3.000october 18, 1989
Perl 2.000january 5, 1988
Perl 1.000december 18, 1987
Tclmid 1988
Tcl/Tkend 1988
Rex 2.001980
Rex 3.001982
Rexx 3.201984
Caml1987
Eiffel 21988
ABC1987
B1981
Haskell 1.01987
Self
BorlandTurbo Pascal
Cedar1983
1980 1985
MUMPS (FIPS)1986
Sharp APL
A1988
Miranda1982
KRC1981
Forth-831983
ANS Forth1986
ARM C++1989
BASICA1981
GW-Basic1983
MS Basic PDS 7.01989
QuickBasic 1.01985
QuickBasic 4.51988
Fortran 90 ISO1991
SML ‘901990
Oakjune 1991
Perl 4.000march 21, 1991
PostScript level 21992
Perl 5.000october 18, 1994
Common Lisp ANSIdecember 8, 1994
Scheme IEEE1990
Python1991
NetRexx1991
ISO C(C90)
december 15, 1990
Caml 2-6.11991
Caml 3.11993
Visual Basic 1.0may 20, 1991
Oberon-21991
Sather 0.1june 1991
Sather 1.0mid-1994
Rubyfebruary 24, 1993
Haskell 1.1april 1, 1990
Haskell 1.2march 1992
Cmm1992
1990
MUMPS ISO1992
M1994
A+1992
J1990
Visual Basic 2.0march 1992
Visual Basic 3.0june 93
Eiffel 31993
MS PDS 7.11990
SML ‘971997
Java 2 (v1.2)december 8, 1998
PostScript level 3september 11, 1996
C++98 ANSI/ISO1998
APL961996
OO COBOL1997
Scheme R5RS1998
Ada 951995
Java 1may 23, 1995
Delphimarch 2, 1995
Delphi 5august, 1999
Modula-2 ISOjune 1, 1996
Tcl/Tk 8.1april 1999
Python 1.5.2april 13, 1999
Perl 5.005_50july 26, 1998
NetRexx 1.150july 23, 1999
Object Rexxfebruary 25, 1997
Prolog IV1997
ISO C(C95)
april 1, 1996
ISO C (C99)december 1, 1999
Objective Caml1996 O’Caml 2
1998
Visual Basic 6.0june 16, 1998
Sather 1.1september 1995
Sather 1.2.1november 4, 1999
Ruby 0.95december 1995
Ruby 1.1 alpha 0august 13, 1997 Ruby 1.3.2
april 2, 1999
Haskell 1.3may 1996
Haskell 1.4april 1997
Haskell 98february 1999
Fortran 95 ISOdecember 15, 1997
LiveScript1995
JavaScriptdecember 1995
JavaScript 1.5
ECMAScriptjune 1997
ECMAScript ed3december 1999
JScriptmay 1996
Self 4.0july 10, 1995
PHP/FI1995 PHP 2.0
nov. 13, 1997PHP 3.0
june 6, 1998
O’Caml 1.0.7december 11, 1997
Tcl/Tk 8.2.3dec. 16, 1999
Eiffel 4december 11, 1996
Eiffel 4.2february 6, 1998
1995
M ANSIdec 8, 1995
Open Mdec 11, 1995
M ISO1999
K1996
Visual Basic 4.0september 1995
Visual Basic 5.0april 1997
ANSI Rexx
ISO Forth1997
ANSI Smalltalkmay 19, 1998
Modula-2 ISOGeneric Extensiondecember 19, 1998
JavaScript 2.0(draft 1)
february 18, 1999
Perl 5.6.0march 28, 2000
Java 2 (v1.3)may 8, 2000
O’Caml 3.00june 2000
C#june 26, 2000
Python 1.6september 5, 2000
Python 2.0october 16, 2000
Ruby 1.6.1september 27, 2000
Perl 5.7,0september 2, 2000
Ruby 1.6.5september 19, 2001
Python 2.2december 21, 2001
Python 2.1april 17, 2001
C#(ECMA)
december 13, 2001
Java 2 (v1.4)early access
february 6, 2002
JScript
Self 4.1august 7, 2001
O’Caml 3.02july 30, 2001
O’Caml 3.03dec 10, 2001
PHP 4.0may 22, 2000
PHP 4.1.0december 8, 2001
O’Caml 3.04dec 12, 2001
Tcl/Tk 8.3october 22, 2001
Delphi 6may 1, 2001
2000
VB.NET(Visual Basic 7.0)
2001
ISE Eiffel 52001
Unicon2001
Active Oberon2001
1 2 3 4
Perl 5.6.0march 28, 2000
Java 2 (v1.3)may 8, 2000
O’Caml 3.00june 2000
C#june 26, 2000
Python 1.6september 5, 2000
Python 2.0october 16, 2000
Ruby 1.6.1september 27, 2000
Perl 5.7,0september 2, 2000
Ruby 1.6.5september 19, 2001
Python 2.2december 21, 2001
Python 2.1april 17, 2001
C#(ECMA)
december 13, 2001
Java 2 (v1.4)early access
february 6, 2002
JScript
Self 4.1august 7, 2001
O’Caml 3.02july 30, 2001
O’Caml 3.03dec 10, 2001
PHP 4.0may 22, 2000
PHP 4.1.0december 8, 2001
O’Caml 3.04dec 12, 2001
Tcl/Tk 8.3october 22, 2001
Delphi 6may 1, 2001
2000
VB.NET(Visual Basic 7.0)
2001
ISE Eiffel 52001
Unicon2001
Active Oberon2001
Ruby 1.6.7march 1, 2002
Python 2.2.1april 10, 2002
Perl 5.8.0july 18, 2002
PHP 4.2.0april 22, 2002
PHP 4.2.2july 22, 2002
Java 2 (v1.4.0_01)june 4, 2002
O’Caml 3.05july 29, 2002
O’Caml 3.06august 20, 2002
Java 2 (v1.4.1)september 2002
PHP 4.2.3september 6, 2002
Fortran 2000(draft)
september 30, 2002
Tcl/Tk 8.4september 10, 2002
Delphi 7august 6, 2002
Self 4.1.6september 2002
Python 2.2.2october 14, 2002
PHP 4.3.0december 27, 2002
2002
PHP 4.3.1feb. 17, 2003
Ruby 1.6.8december 24, 2002
Java 2(v1.4.1_02)
february 27, 2003
Python 2.3a2february 19, 2003
Tcl/Tk 8.4.1october 22, 2002
C#(ISO)
march 28, 2003
Tcl/Tk 8.4.2march 3, 2003
Tcl/Tk 8.4.3may 20, 2003
PHP 4.3.2may 29, 2003
Python 2.2.3may 30, 2003
Java 2 (v1.4.2)april 29, 2003
COBOL 2002 ISO/ANSIdecember 2002
JavaScript 2.0(draft 4)
april 26, 2002ECMAScript ed4 (draft)
2002
Haskell 98(revised)
december 2002
Python 2.3july 29, 2003
Java 2 (v1.4.1_03)june 11, 2003
2003
PHP 4.3.3august 25, 2003
Java 2 (v1.4.2_01)august 26, 2003
Ruby 1.8august 4, 2003
Python 2.3.1september 23, 2003
Perl 5.8.1september 26, 2003
Java 2 (v1.4.2_02)october 22, 2003
C# 2.0(beta)
july 2003
Delphi 8november 2003
PHP 4.3.4november 3, 2003
Java 2 (v1.4.2_03)december 13, 2003
Python 2.3.2october 3, 2003
Python 2.3.3december 19, 2003
Ruby 1.8.1december 25, 2003
Java 2 (v1.5.0)(beta 1)
february 5, 2004
O’Caml 3.07september 29, 2003
Tcl/Tk 8.4.6march 1, 2004
Self 4.2.1april 3, 2004
PHP 4.3.5march 26,
2004
Perl 5.8.2november 5, 2003
Perl 5.8.3january 1, 2004
Tcl/Tk 8.4.5november 24, 2003
Tcl/Tk 8.4.4july 22, 2003
PHP 4.3.6april 15,
2004
Java 2 (v5.0) (beta 2)june 28, 2004
Java 2 (v1.4.2_04)march 8, 2004
Java 2 (v1.4.2_05)june 30, 2004
PHP 4.3.7june 3,2004
Python 2.3.4may 27, 2004
Perl 5.8.4april 23, 2004
2004PostScript level 3
v 30162003
C++03 ISO/IEC2003
PHP 4.3.8july 13, 2004
PHP 5.0.0july 13, 2004
O’Caml 3.08.0july 13, 2004
Java 2 (v5.0)september 30, 2004
Python 2.4november 30, 2004
PHP 4.3.10december 15, 2004
PHP 5.0.3december 15, 2004
Java 2 (v6.0 beta)december 2004
Tcl/Tk 8.4.7july 25, 2004
Tcl/Tk 8.4.8nov. 22, 2004
Tcl/Tk 8.4.9december 7, 2004
Ruby 1.8.2december 25, 2004
Perl 5.8.5july 21, 2004
Perl 5.8.6november 30, 2004
Java 2 (v1.4.2_06)november 23, 2004
Delphi 2005november 2004
Fortran 2003november 30, 2004
Java 2 (v5.0 update 3)april 28, 2005
Ada 2006 (draft)2005
2005
ECMA Eiffeljune 2005
Python 2.4.1march 30, 2005
O’Caml 3.08.2november 2004
Perl 5.8.7june 3, 2005
PHP 5.0.4april 3, 2005
PHP 5.0.5september 6, 2005
PHP 4.4.1october 31, 2005
Ruby 1.8.3september 21, 2005
Python 2.4.2september 28, 2005
Tcl/Tk 8.4.11june 28, 2005
PostScript level 3v 3017
september 11, 2005
C# 3.0(beta)
september 2005
C# 2.0november 2005
Tcl/Tk 8.4.12december 6, 2005
Delphi 2006october 30, 2005
Ruby 1.8.4december 24, 2005
PHP 5.1.0november 24, 2005
M ISOjanuary 6, 2005
1 2 3 4
PHP 4.3.8july 13, 2004
PHP 5.0.0july 13, 2004
O’Caml 3.08.0july 13, 2004
Java 2 (v5.0)september 30, 2004
Python 2.4november 30, 2004
PHP 4.3.10december 15, 2004
PHP 5.0.3december 15, 2004
Java 2 (v6.0 beta)december 2004
Tcl/Tk 8.4.7july 25, 2004
Tcl/Tk 8.4.8nov. 22, 2004
Tcl/Tk 8.4.9december 7, 2004
Ruby 1.8.2december 25, 2004
Perl 5.8.5july 21, 2004
Perl 5.8.6november 30, 2004
Java 2 (v1.4.2_06)november 23, 2004
Delphi 2005november 2004
Fortran 2003november 30, 2004
Java 2 (v5.0 update 3)april 28, 2005
Ada 2006 (draft)2005
2005
ECMA Eiffeljune 2005
Python 2.4.1march 30, 2005
O’Caml 3.08.2november 2004
Perl 5.8.7june 3, 2005
PHP 5.0.4april 3, 2005
PHP 5.0.5september 6, 2005
PHP 4.4.1october 31, 2005
Ruby 1.8.3september 21, 2005
Python 2.4.2september 28, 2005
Tcl/Tk 8.4.11june 28, 2005
PostScript level 3v 3017
september 11, 2005
C# 3.0(beta)
september 2005
C# 2.0november 2005
Tcl/Tk 8.4.12december 6, 2005
Delphi 2006october 30, 2005
Ruby 1.8.4december 24, 2005
PHP 5.1.0november 24, 2005
M ISOjanuary 6, 2005
Objective-C 2.0august 7, 2006
2006
Tcl/Tk 8.4.13april 19, 2006
Python 2.5september 19, 2006
Java 2 (v5.0 update 8)august 11, 2006
Ruby 1.8.5august 25, 2006
Perl 5.8.8february 2, 2006
PHP 5.1.6august 24, 2006
PHP 4.4.2january 13, 2006
PHP 4.4.4august 17, 2006
O’Caml 3.09.2april 14, 2006
Self 4.3june 30, 2006
Scheme R6RS (draft)september 14, 2006
Tcl/Tk 8.4.14october 19, 2006
PHP 5.2.0november 2, 2006
Java 6december 11, 2006
Tcl/Tk 8.4.15may 25, 2007
Python 2.5.1april 19, 2007
Ruby 1.8.6march 13, 2007
PHP 4.4.7may 3, 2007
PHP 5.2.3may 31, 2007
Java 2 (v5.0 update 12)may 31, 2007
2007
Tcl/Tk 8.5december 20, 2007
Java 6 update 2july 5, 2007
O’Caml 3.10.0may 16, 2007
Perl 5.10december 18, 2007
Ada 2005march 9, 2007
Python 3.0a2december 7, 2007
PHP 5.2.4august 30, 2007
PHP 5.2.5november 9, 2007
Scheme R6RSaugust 28, 2007
C# 3.5november 19, 2007
Delphi 2007march 2007
C# 3.0november 6, 2006
2008
Java 6 update 7july 11, 2008
Java 2 (v5.0 update 16)july 11, 2008
Java 2 (v1.4.2_18)july 11, 2008Ruby 1.8.7
may 31, 2008
PHP 4.4.8january 3, 2008
PHP 5.2.6may 1, 2008
Tcl/Tk 8.5.5october 15, 2008
Python 2.6october 1, 2008
Python 3.0december 3, 2008
PHP 4.4.9august 7, 2008
O’Caml 3.10.2february 29, 2008
Java 6 update 11december 2, 2008
Java 2 (v1.4.2_19)december 2, 2008
Java 2 (v5.0 update 17)december 2, 2008
C++0x draft2008
Ruby 1.9.1january 30, 2009
PHP 5.2.7december 4, 2008
PHP 5.2.8december 8, 2008
Python 3.0.1february 13, 2009
Python 2.6.1december 4, 2008
2009
Tcl/Tk 8.5.6january 2009
Tcl/Tk 8.5.7april 15, 2009
Python 2.6.2april 14, 2009
Java 6 update 14june 10, 2009
Java 2 (v5.0 update 18)march 24, 2009
PHP 5.2.9february 26, 2009
O’Caml 3.11.0december 4, 2008
PHP 5.3june 30, 2009
Python 3.1june 27, 2009
O’Caml 3.11.1june 12, 2009
Delphi 2009august 2008
Ruby 1.9.2 preview 1july 18, 2009
C++1x draftjuly 22, 2009
Objective-C 2.1august 28, 2009
Perl 5.11.0october 2, 2009
Python 2.6.3october 2, 2009
Java 6 update 24february 15, 2011
Java 2 (v5.0 update 21)september 11, 2009
Delphi 2010august 2009
Haskell 2010(announced)
november 2009
Python 2.7july 4, 2010
Tcl/Tk 8.5.9september 8, 2010
Ruby 1.9.2august 18, 2010
Perl 5.12.0april 12, 2010
PHP 5.3.5january 6, 2011
Haskell HP 2010.2.0.0july 2010
O’Caml 3.12.0august 2, 2010
Fortran 2008september 2010
2010
C# 4.0april 12, 2010
2011
Python 3.2february 20, 2011
Python 2.7.1november 27, 2010
Perl 5.12.3january 21, 2011
1 2 3 4
Languagesfebruary 27, 2011
© Éric Lévénez 1999-2011<http://www.levenez.com/lang/>
FORTRAN II1957
FORTRANnovember 1954
FORTRAN Ioctober 1956
FORTRAN IIIend-1958
Flow-Matic1958
ALGOL 581958
Lisp1958
Lisp 11959
COBOL1959
B-O1957
1954 1957
IAL1958
JOVIAL1959
Languagesfebruary 27, 2011
© Éric Lévénez 1999-2011<http://www.levenez.com/lang/>
FORTRAN II1957
FORTRANnovember 1954
FORTRAN Ioctober 1956
FORTRAN IIIend-1958
Flow-Matic1958
ALGOL 581958
Lisp1958
Lisp 11959
COBOL1959
B-O1957
1954 1957
IAL1958
JOVIAL1959
FORTRAN
Languagesfebruary 27, 2011
© Éric Lévénez 1999-2011<http://www.levenez.com/lang/>
FORTRAN II1957
FORTRANnovember 1954
FORTRAN Ioctober 1956
FORTRAN IIIend-1958
Flow-Matic1958
ALGOL 581958
Lisp1958
Lisp 11959
COBOL1959
B-O1957
1954 1957
IAL1958
JOVIAL1959
FORTRAN
LISP
$(':checkbox').map(function() { return this.id;}).get().join(',');
(map (lambda (x) (+ x x)) mylist)
(map (lambda (x) (+ x x)) mylist)
“Hello World”
#include <stdio.h>
int main(){ printf("Hello world\n"); return 0;}
C
Java
class HelloWorldApp { static void main(String[] args) { System.out.println( "Hello World!"); }}
Transcript show: 'Hello, world!'.
Smalltalk
puts 'Hello World'
Ruby
“Procedures??”
“Procedures??”
puts 'Hello World'=> Hello World
puts 'Hello World'=> Hello World
Kernel.puts 'Hello World'=> Hello World
puts 'Hello World'=> Hello World
Kernel.puts 'Hello World'=> Hello World
puts self.class=> Object
puts 'Hello World'=> Hello World
Kernel.puts 'Hello World'=> Hello World
puts self.class=> Object
this
puts 'Hello World'=> Hello World
Kernel.puts 'Hello World'=> Hello World
puts self.class=> Object
Object.ancestors => [Object, Kernel, BasicObject]
this
puts 'Hello World'=> Hello World
Kernel.puts 'Hello World'=> Hello World
puts self.class=> Object
Object.ancestors => [Object, Kernel, BasicObject]
this
"teste".class => String
"teste".class => String
1.class => Fixnum
"teste".class => String
1.class => Fixnum
true.class => TrueClass
"teste".class => String
1.class => Fixnum
true.class => TrueClass
nil
"teste".class => String
1.class => Fixnum
true.class => TrueClass
nil .class => NilClass
"teste".class => String
1.class => Fixnum
true.class => TrueClass
nil .class => NilClass
NullPointerException!?
"teste".class => String
1.class => Fixnum
true.class => TrueClass
nil .class => NilClass
1 + 2
1 + 2
1.+(2)
Opcionais
def hello(name) return "Hello, " + nameend
puts hello("Fabio") => "Hello, Fabio"
def hello(name) return "Hello, " + nameend
puts hello "Fabio" => "Hello, Fabio"
def hello(name) return "Hello, " + nameend
puts hello "Fabio" => "Hello, Fabio"
ParêntesesOpcionais
def hello(name) "Hello, " + nameend
puts hello "Fabio" => "Hello, Fabio"
def hello(name) "Hello, " + nameend
puts hello "Fabio" => "Hello, Fabio"
returnautomático
def hello(name) "Hello, #{name}"end
puts hello "Fabio" => "Hello, Fabio"
def hello(name) "Hello, #{name}"end
puts hello "Fabio" => "Hello, Fabio"
Interpolação
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"
class String def hello(name) "#{self}, #{name}" endend"Hello".hello "Fabio" => "Hello, Fabio"
ClassesAbertas!
module Legal def bu! "Buuu!" endend
module Legal def bu! "Buuu!" endend
class String include Legalend
class Fixnum include Legalend
module Legal def bu! "Buuu!" endend
class String include Legalend
class Fixnum include Legalend
"foo".bu! => "Buuu!"
module Legal def bu! "Buuu!" endend
class String include Legalend
class Fixnum include Legalend
"foo".bu! => "Buuu!"
10.bu! => "Buuu!"
require 'rubygems'require 'active_support/all'
require 'rubygems'require 'active_support/all'
Time.now + 1.day => 2012-08-22 02:15:35 -0300
require 'rubygems'require 'active_support/all'
Time.now + 1.day => 2012-08-22 02:15:35 -0300
Time.now + 1.week => 2012-08-28 02:15:35 -0300
require 'rubygems'require 'active_support/all'
Time.now + 1.day => 2012-08-22 02:15:35 -0300
Time.now + 1.week => 2012-08-28 02:15:35 -0300
(1.gigabyte - 100.megabytes) / 1.megabyte => 924
Mensagens
class Fooend
class Fooend
Foo.new.bar => NoMethodError: undefined method `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" endend
Foo.new.bar => "bar called"
class Foo def method_missing(method) print "#{method} called" endend
Foo.new.bar => "bar called"
Foo.new.send(:bar) => "bar called"
class Foo def method_missing(method) print "#{method} called" endend
Foo.new.bar => "bar called"
Foo.new.send(:bar) => "bar called"
Messages!
require 'builder'xml = Builder::XmlMarkup.new
xml.instruct! :xml
xml.Hello "World!"xml.date do xml.year "2006" xml.month "01" xml.day "01"end
require 'builder'xml = Builder::XmlMarkup.new
xml.instruct! :xml
xml.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>
Tipagem Dinâmica
class Gato def falar "miau" endend
class Gato def falar "miau" endend
class Pato def falar "qua qua" endend
class Gato def falar "miau" endend
class Pato def falar "qua qua" endend
def ouvir(animal) animal.falarend
class Gato def falar "miau" endend
ouvir(Gato.new)=> "miau"
class Pato def falar "qua qua" endend
def ouvir(animal) animal.falarend
class Gato def falar "miau" endend
ouvir(Gato.new)=> "miau"
class Pato def falar "qua qua" endend
def ouvir(animal) animal.falarend ouvir(Pato.new)
=> "qua qua"
Protocol > Interface
+40 mil gems
~20 GB
bundle install
RubyGem “Jar”
Rake Ant, Make
Bundler Maven
Web e Rails
Framework para Aplicações Web
gem install rails
rails new projeto
servidor web
Rack Middlewares
Routes
Controller
ModelView
Request
servidor web
Rack Middlewares
Routes
Controller
ModelView
Request
servidor web
Rack Middlewares
Routes
Controller
ModelView
Request
servidor web
Rack Middlewares
Routes
Controller
ModelView
Request
servidor web
Rack Middlewares
Routes
Controller
ModelView
Request
servidor web
Rack Middlewares
Routes
Controller
ModelView
Request
servidor web
Rack Middlewares
Routes
Controller
ModelView
Request
servidor web
Rack Middlewares
Routes
Controller
ModelView
Request
servidor web
Rack Middlewares
Routes
Controller
ModelView
Request
servidor web
Rack Middlewares
Routes
Controller
ModelView
Request
servidor web
Rack Middlewares
Routes
Controller
ModelView
Response Request
+40 mil gems
~20 GB
bundle install
Web Server
Rack Middlewares
Routes
Controller
ModelView
Response Request
Web Server
Rack Middlewares
Routes
Controller
ModelView
Response Request
Web Server
Rack Middlewares
Routes
Controller
ModelView
Response Request
Application Server Rack:
Mongrel,Thin,
Passenger,Unicorn
Web Server
Rack Middlewares
Routes
Controller
ModelView
Response Request
Web Server:NginX
Apache
Application Server Rack:
Mongrel,Thin,
Passenger,Unicorn
Web Server
Request
RailsApp
/public/stylesheets
Web Server
Request
RailsApp
ArquivosEstáticos
/public/stylesheets
Variáveis
/* CSS */$blue: #3bbfce;$margin: 16px;
Variáveis
/* CSS */$blue: #3bbfce;$margin: 16px;
.content-navigation { border-color: $blue; color: darken($blue, 9%);}
Variáveis
/* CSS */$blue: #3bbfce;$margin: 16px;
.content-navigation { border-color: $blue; color: darken($blue, 9%);}
.content-navigation { border-color: #3bbfce; color: #2b9eab;}
Variáveis
/* CSS */$blue: #3bbfce;$margin: 16px;
.border { padding: $margin / 2; margin: $margin / 2; border-color: $blue;}
.content-navigation { border-color: $blue; color: darken($blue, 9%);}
.content-navigation { border-color: #3bbfce; color: #2b9eab;}
Variáveis
/* CSS */$blue: #3bbfce;$margin: 16px;
.border { padding: $margin / 2; margin: $margin / 2; border-color: $blue;}
.content-navigation { border-color: $blue; color: darken($blue, 9%);}
.content-navigation { border-color: #3bbfce; color: #2b9eab;}
.border { padding: 8px; margin: 8px; border-color: #3bbfce;}
Nestingtable.hl { margin: 2em 0; td.ln { text-align: right; }}
/* CSS */
Nestingtable.hl { margin: 2em 0; td.ln { text-align: right; }}
/* CSS */
table.hl { margin: 2em 0;}table.hl td.ln { text-align: right;}
Nestingtable.hl { margin: 2em 0; td.ln { text-align: right; }}
/* CSS */
li { font: { family: serif; weight: bold; size: 1.2em; }}
table.hl { margin: 2em 0;}table.hl td.ln { text-align: right;}
Nestingtable.hl { margin: 2em 0; td.ln { text-align: right; }}
/* CSS */
li { font: { family: serif; weight: bold; size: 1.2em; }}
li { font-family: serif; font-weight: bold; font-size: 1.2em;}
table.hl { margin: 2em 0;}table.hl td.ln { text-align: right;}
class Animal constructor: (@name) ->
move: (meters) -> alert @name + " moved " + meters + "m."
class Snake extends Animal move: -> alert "Slithering..." super 5
class Horse extends Animal move: -> alert "Galloping..." super 45
sam = 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
Web Server(Produção)
Request
RailsApp
/app/assets
Web Server(Desenvolvimento)
Request
/public
Web Server(Produção)
Request
RailsApp
/app/assets
Web Server(Desenvolvimento)
Request
Sprockets
/public
Web Server(Produção)
Request
RailsApp
/app/assets
Web Server(Desenvolvimento)
Request
Sprockets
Tilt
/public
Web Server(Produção)
Request
RailsApp
/app/assets
Web Server(Desenvolvimento)
Request
Sprockets
Tilt
Ugli!er
/public
ENGINE FILE EXTENSIONS REQUIRED LIBRARIES
ERB .erb, .rhtmlnone
Interpolated String .strnone
Erubis .erb, .rhtml, .erubis erubis
Haml .haml haml
Sass .sasssass
Scss .scsssass
Less CSS .less less
Builder .builder builder
Liquid .liquid liquid
RDiscount
.markdown, .mkd, .md
rdiscount
Redcarpet
.markdown, .mkd, .md
redcarpet
BlueCloth .markdown, .mkd, .md bluecloth
Kramdown
.markdown, .mkd, .md
kramdown
Maruku
.markdown, .mkd, .md
maruku
RedCloth .textile redcloth
RDoc .rdoc rdoc
Radius .radius radius
Markaby .mab markaby
Nokogiri .nokogiri nokogiri
CoffeeScript .coffee coffee-script
Creole (Wiki markup) .creole creole
jQuery Tamanho Tempo
Original Size 621kb
Google Closure 234kb 6.5s
YUI Compressor 240kb 2.7s
UglifyJS 235kb 1.3s
jQuery Tamanho Tempo
Original Size 621kb
Google Closure 234kb 6.5s
YUI Compressor 240kb 2.7s
UglifyJS 235kb 1.3s
jQuery Tamanho Tempo
Original Size 621kb
Google Closure 234kb 6.5s
YUI Compressor 240kb 2.7s
UglifyJS 235kb 1.3s
jQuery Tamanho Tempo
Original Size 621kb
Google Closure 234kb 6.5s
YUI Compressor 240kb 2.7s
UglifyJS 235kb 1.3s
jQuery Tamanho Tempo
Original Size 621kb
Google Closure 234kb 6.5s
YUI Compressor 240kb 2.7s
UglifyJS 235kb 1.3s
Material
RubyConfBrasil
30 e 31 de Agosto
Exercícios
RedmineGerenciador de
Projetos
git clone git://github.com/redmine/redmine.git
cp config/database.yml.example config/database.yml
(edit) config/database.yml
bundle install
bundle exec rake generate_session_store
bundle exec rake db:create
bundle exec rake db:migrate
bundle exec rails server
Content Management
Systems
gem install refinerycms
refinerycms 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!)
Obrigado!www.akitaonrails.com
www.codeminer42.com
u.akita.ws/semcomp15uspsaocarlos