prazer,ruby on rails
DESCRIPTION
Palestra apresentada no dia 19/12/2008.TRANSCRIPT
![Page 1: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/1.jpg)
Prazer, Ruby on Rails
![Page 2: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/2.jpg)
Quem?
•Alberto Leal
•BLOG: http://www.albertoleal.eti.br
•GITHUB: http://www.github.com/albertoleal
![Page 3: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/3.jpg)
O que?
•Apresentação da Linguagem RUBY
•Apresentação do Framework RAILS
•Testes Automatizados
•Hands-on
•Ferramentas
•RAILS e o Mercado
![Page 4: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/4.jpg)
Antes de mais nada ....
![Page 5: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/5.jpg)
Linguagem Programação
Framework
on
![Page 6: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/6.jpg)
![Page 7: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/7.jpg)
Yukihiro “Matz” Matsumoto
- Lançada em 1995- Linguagem de script- Código aberto e sem restrições- Simples e elegante
O Criador
![Page 8: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/8.jpg)
“Para mim o propósito da vida é parcialmente em ter prazer. Programadores as vezes sentem prazer quando podem se concentrar na parte criativa da programação. Então Ruby foi projetado para fazer programadores
felizes.”Matz
![Page 9: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/9.jpg)
Linguagens que influenciaram
•Perl - Linguagem Prática
•Smalltalk - Orientada a Objetos
•Lisp - Metaprogramação
•Smalltalk, Eifell - Sintaxe
•Java, Pyton - Tratamento de exceção
![Page 10: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/10.jpg)
Características• Interpretada
• Expressiva
• Herança Simples
• Dinâmica (monkeypatching)
• Multi-paradigma
• Clousures
• Mixins
• Duck Typing
• TUDO é OBJETO
![Page 11: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/11.jpg)
TUDO é OBJETO
![Page 12: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/12.jpg)
array[x]=y
array.[]=(x,y)
x+y
x.+(y)
![Page 13: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/13.jpg)
Duck Typing“Se anda como um pato e
fala como um pato, então é um pato!”
![Page 14: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/14.jpg)
Classes não são tipos! Tipos são definidos com base no
que um objeto pode fazer.
![Page 15: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/15.jpg)
Gems
![Page 16: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/16.jpg)
RubyGems
![Page 17: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/17.jpg)
Implementações
•MRI
•JRuby
•IronRuby
•Rubinius
![Page 18: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/18.jpg)
![Page 19: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/19.jpg)
Extraído a partir de um problema real!
![Page 20: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/20.jpg)
MVC
![Page 21: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/21.jpg)
ActiveRecordActionPackActionMailerActiveSupport
Meta-Framework
![Page 22: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/22.jpg)
Convenção ao invés de
Configuração
O que torna Rails ágil?
![Page 23: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/23.jpg)
class Post < ActiveRecord::Base has_many :comments belongs_to :author end
class Comment < ActiveRecord::Base belongs_to :post end
class Author < ActiveRecord::Base has_many :posts end
![Page 24: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/24.jpg)
Testes Automatizados
![Page 25: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/25.jpg)
BEHAVIOR DRIVEN DEVELOPMENT
TEST DRIVEN DEVELOPMENT
TDD
BDD
X
![Page 26: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/26.jpg)
Testes
Unitário
Funcional
Integração
![Page 27: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/27.jpg)
Construindo um e-commerce
Hands-on
![Page 28: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/28.jpg)
História 1
![Page 29: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/29.jpg)
História 2
![Page 30: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/30.jpg)
História 3
![Page 31: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/31.jpg)
Ferramentas
Mac OS X WindowsLinux
TextMate
emacs
emacs
RadRails + Aptana
NetbeansNetbeans
Netbeans
e outras ....
![Page 32: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/32.jpg)
Rails e o Mercado
![Page 33: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/33.jpg)
Empresas utilizando
![Page 34: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/34.jpg)
Empresas utilizando
![Page 35: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/35.jpg)
Sem Brigas, por favor
Java Ruby
Rails
.NETC
C++ C#
PerlPyton
Django
Merb
JSF
Struts...
![Page 36: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/36.jpg)
Dúvidas?
![Page 37: Prazer,Ruby On Rails](https://reader036.vdocuments.net/reader036/viewer/2022062418/55666874d8b42a3d3f8b4d75/html5/thumbnails/37.jpg)
Obrigado!