introdução ao rails (linguagil)

49

Upload: daniel-lopes

Post on 18-May-2015

919 views

Category:

Technology


4 download

DESCRIPTION

Palestra de introdução ao Rails

TRANSCRIPT

Page 1: Introdução ao Rails (Linguagil)
Page 2: Introdução ao Rails (Linguagil)
Page 3: Introdução ao Rails (Linguagil)
Page 4: Introdução ao Rails (Linguagil)

E-Genial

2009 - Ruby on Rails

2008 - Adobe Flex 3

MAIS DE 200 ALUNOS

Page 5: Introdução ao Rails (Linguagil)

COMUNIDADE

Page 6: Introdução ao Rails (Linguagil)
Page 7: Introdução ao Rails (Linguagil)

Quem adora programar ?

Page 8: Introdução ao Rails (Linguagil)

1995

Page 9: Introdução ao Rails (Linguagil)
Page 10: Introdução ao Rails (Linguagil)

Melhor amigo

Page 11: Introdução ao Rails (Linguagil)

Melhor Amigo

Class Circle

private Coordinate center, float radius;

public void setCenter(Coordinate center)

{

this.center = center;

}

public Coordinate getCenter()

{

return center;

}

end;

Page 12: Introdução ao Rails (Linguagil)

Melhor Amigo

class Circle

attr_accessor :center

end

Page 13: Introdução ao Rails (Linguagil)

Legível e Humana

take_photo if @camera.on? and @camera.have_space?

1.day.ago

5.times { print "ruby " }

Page 14: Introdução ao Rails (Linguagil)

Orientada a ObjetosJava == OC

Tudo é um objeto

Não existem funções, apenas métodos

Page 15: Introdução ao Rails (Linguagil)

OOP de verdade

>> 1.class=> Fixnum>> 2.class=> Fixnum>> 2.class.class=> Class

Page 16: Introdução ao Rails (Linguagil)

1990 - Oriente

2000 - Ocidente

Page 17: Introdução ao Rails (Linguagil)

Instalando

• Mac OS - já vem instalado

• Linux - apt, yum e etc

• Win - Ruby one Click Instaler, EasyRails, etc

Page 18: Introdução ao Rails (Linguagil)

Conhecendo o IRB

Page 19: Introdução ao Rails (Linguagil)
Page 20: Introdução ao Rails (Linguagil)
Page 21: Introdução ao Rails (Linguagil)
Page 22: Introdução ao Rails (Linguagil)
Page 23: Introdução ao Rails (Linguagil)
Page 24: Introdução ao Rails (Linguagil)

• Open source

• Free

• Comunidade robusta

• Documentado

Page 25: Introdução ao Rails (Linguagil)

Don’t Repeat your self

Convention over configuration

Produtividade Sustentável

Diversão

Software de opinião

Page 26: Introdução ao Rails (Linguagil)

! Nomes de arquivos! Nomes de tabelas do DB! Mapeamentos! Chaves do DB! Nomes de Classes! Ambientes! ...

Convention over Conf.

Page 27: Introdução ao Rails (Linguagil)

Don’t Repeat Your Self

GEMS Plugins

generators, templates, engines, partials, etc

Page 28: Introdução ao Rails (Linguagil)

Não se repita

Convenção sobre config.+

Produtividade Sustentável (Diversão e Qualidade)

=

Page 29: Introdução ao Rails (Linguagil)

Mas e na prática ?

Page 30: Introdução ao Rails (Linguagil)

arranhão superficial

Page 31: Introdução ao Rails (Linguagil)

mais a fundo

Page 32: Introdução ao Rails (Linguagil)

BOM RAILER=

BOM DESENVOLVEDOR

Page 33: Introdução ao Rails (Linguagil)

DIA A DIA

pouco código e repetição=

manutenção e qualidade

Page 34: Introdução ao Rails (Linguagil)

DIA A DIA

Código no local corretoMVC done right

Page 35: Introdução ao Rails (Linguagil)

DIA A DIA

Divisão de ambientes

•DEVELOPMENT•PRODUCTION•TESTS

Page 36: Introdução ao Rails (Linguagil)

DIA A DIA

URL bangunçadas?

NÃO!!! Rotas!

Page 37: Introdução ao Rails (Linguagil)

DIA A DIAINTERNACIONALIZAÇÃO

Page 38: Introdução ao Rails (Linguagil)

DIA A DIA

• Independência de DB• Fácil de alterar tabelas, etc.• Alterações versionadas

Page 39: Introdução ao Rails (Linguagil)

DIA A DIA

Logs de forma automática

Page 40: Introdução ao Rails (Linguagil)

DIA A DIA

AJAX de forma simples

•RJS (Javascript em Ruby)•Prototype e Scriptaculous•Jquery ...

Page 41: Introdução ao Rails (Linguagil)

DIA A DIA

TESTES AUTOMATIZADOS(todo list)

Page 42: Introdução ao Rails (Linguagil)

DIA A DIA

Template é XHTMLDesigners são bem vindos

Page 43: Introdução ao Rails (Linguagil)

Ruby on Rails

• Pouco Código e legível• Graças ao Ruby• E sempre Inovador

Page 44: Introdução ao Rails (Linguagil)

Cópias on Rails

Page 45: Introdução ao Rails (Linguagil)

Rails existe pelo Ruby

Page 46: Introdução ao Rails (Linguagil)

Rails e Rubysão inovadores

Page 47: Introdução ao Rails (Linguagil)

O inovadornão pode ser

replicado

Page 48: Introdução ao Rails (Linguagil)

F I M

Page 49: Introdução ao Rails (Linguagil)

CURSO DE RAILSegenial.com.br/cursorails

CONTATOSblog.areacriacoes.com.brtwitter @[email protected]