SlideShare uma empresa Scribd logo
1 de 14
Ruby




Elegância e expressividade
Ruby
●   Tipo de linguagem
●   Interpretadores
●   Sintaxe
●   Objetos & Mensagens
●   Features
●   Tools
●   Rack
●   Rails
●   Sinatra
Ruby - Interpretadores
●   MRI - Matz's Ruby Interpreter
●   YARV - Yet Another Ruby VirtualMachine
●   Jruby - JVM
●   Rubinius – Ruby em Ruby
●   IronRuby - .NET
●   MacRuby – Objective C
Ruby – Tipo de linguagem
●   Tipagem Dinâmica
●   OO
●   Fortemente tipada
●   Garbage collection
Ruby - Sintaxe
●   Constante
●   ::EscopoGlobal
●   variavel_local
●   @variavel_de_objeto
●   @@variavel_de_class
●   2
●   2.3
●   “string #{interpolada}”
Ruby - Sintaxe
●   :symbol
●   [1, 2]
●   { :ola => 'voce' } ou { ola: 'voce' }
●   raise HelpError unless world.is_safe?
●   drink while ! beer.nil?
●   for nerd in @dj_house; nerd.eat(meat); end
●   case; when; default; end
●   3.times { puts 'Hurra!' }
Ruby - Sintaxe
●   3.times do; puts 'Hurra!'; end
●   1..10



●   Imprimir ímpares de 1 a 20 em ordem inversa
Ruby – Objetos e Mensagens
●   (Quase) Tudo são objetos.
●   (Quase) Todas as interações são feitas com
    troca de mensagens

●   1+1
●   1.+(1)
●   1.send('+', 1)
Ruby – Objetos e Mensagens
Ruby - features
●   Suporte a introspecção (respond_to)
●   Redefinição de métodos
●   Classes abertas
●   method_missing
●   Sem overload de métodos
●   Herança múltipla com mixins
●   const_missing
Ruby - Tools
●   Gems
●   bundle
●   Webservers
    ●   Thin
    ●   Passenger
    ●   Unicorn
    ●   JVM
●   RVM e rbenv
Ruby - Rack
●   Ruby Webserver Interface
●   API minimalista para os frameworks web
●   config.ru
Ruby - Rails
●   MVC
●   Routing
●   Middleware
●   Migrations
●   Helpers
Ruby - Sinatra
●   DSL para aplicações web
●   Views
    ●   haml :index
●   Helpers
    ●   enable :sessions

Mais conteúdo relacionado

Mais procurados

Ruby + Rails no Mundo Real 2010 - Voodoo é pra Jacu - Entendendo metaprograma...
Ruby + Rails no Mundo Real 2010 - Voodoo é pra Jacu - Entendendo metaprograma...Ruby + Rails no Mundo Real 2010 - Voodoo é pra Jacu - Entendendo metaprograma...
Ruby + Rails no Mundo Real 2010 - Voodoo é pra Jacu - Entendendo metaprograma...David Paniz
 
Ruby com Objetos e classes
Ruby com Objetos e classesRuby com Objetos e classes
Ruby com Objetos e classesWende Mendes
 
Rails - EXATEC2009
Rails - EXATEC2009Rails - EXATEC2009
Rails - EXATEC2009Caue Guerra
 
Ruby com Singleton class, Metaprogramação e muito mais
Ruby com Singleton class, Metaprogramação e muito maisRuby com Singleton class, Metaprogramação e muito mais
Ruby com Singleton class, Metaprogramação e muito maisWende Mendes
 
Repaint/Reflow/Dom/RenderTree - Renderizando uma página web
Repaint/Reflow/Dom/RenderTree - Renderizando uma página webRepaint/Reflow/Dom/RenderTree - Renderizando uma página web
Repaint/Reflow/Dom/RenderTree - Renderizando uma página webtdc-globalcode
 

Mais procurados (6)

Ruby + Rails no Mundo Real 2010 - Voodoo é pra Jacu - Entendendo metaprograma...
Ruby + Rails no Mundo Real 2010 - Voodoo é pra Jacu - Entendendo metaprograma...Ruby + Rails no Mundo Real 2010 - Voodoo é pra Jacu - Entendendo metaprograma...
Ruby + Rails no Mundo Real 2010 - Voodoo é pra Jacu - Entendendo metaprograma...
 
ISEPonRails
ISEPonRailsISEPonRails
ISEPonRails
 
Ruby com Objetos e classes
Ruby com Objetos e classesRuby com Objetos e classes
Ruby com Objetos e classes
 
Rails - EXATEC2009
Rails - EXATEC2009Rails - EXATEC2009
Rails - EXATEC2009
 
Ruby com Singleton class, Metaprogramação e muito mais
Ruby com Singleton class, Metaprogramação e muito maisRuby com Singleton class, Metaprogramação e muito mais
Ruby com Singleton class, Metaprogramação e muito mais
 
Repaint/Reflow/Dom/RenderTree - Renderizando uma página web
Repaint/Reflow/Dom/RenderTree - Renderizando uma página webRepaint/Reflow/Dom/RenderTree - Renderizando uma página web
Repaint/Reflow/Dom/RenderTree - Renderizando uma página web
 

Destaque

ご購入の流れ
ご購入の流れご購入の流れ
ご購入の流れhivelocity
 
Metal rcm biz plan
Metal rcm biz planMetal rcm biz plan
Metal rcm biz planSpectrum2011
 
STATA - Summary Statistics
STATA - Summary StatisticsSTATA - Summary Statistics
STATA - Summary Statisticsstata_org_uk
 
STATA - Merge or Drop Data
STATA - Merge or Drop DataSTATA - Merge or Drop Data
STATA - Merge or Drop Datastata_org_uk
 
STATA - Linear Regressions
STATA - Linear RegressionsSTATA - Linear Regressions
STATA - Linear Regressionsstata_org_uk
 
STATA - Graphing Data
STATA - Graphing DataSTATA - Graphing Data
STATA - Graphing Datastata_org_uk
 
STATA - Probit Analysis
STATA - Probit AnalysisSTATA - Probit Analysis
STATA - Probit Analysisstata_org_uk
 
STATA - Presenting Output
STATA - Presenting OutputSTATA - Presenting Output
STATA - Presenting Outputstata_org_uk
 
STATA - Download Examples
STATA - Download ExamplesSTATA - Download Examples
STATA - Download Examplesstata_org_uk
 
STATA - Instrumental Variables
STATA - Instrumental VariablesSTATA - Instrumental Variables
STATA - Instrumental Variablesstata_org_uk
 
STATA - Panel Regressions
STATA - Panel RegressionsSTATA - Panel Regressions
STATA - Panel Regressionsstata_org_uk
 
STATA - Time Series Analysis
STATA - Time Series AnalysisSTATA - Time Series Analysis
STATA - Time Series Analysisstata_org_uk
 

Destaque (18)

ご購入の流れ
ご購入の流れご購入の流れ
ご購入の流れ
 
Backbone.js
Backbone.jsBackbone.js
Backbone.js
 
Italia
ItaliaItalia
Italia
 
Biz plan fcr2
Biz plan fcr2Biz plan fcr2
Biz plan fcr2
 
Ingles
InglesIngles
Ingles
 
Vision statement
Vision statementVision statement
Vision statement
 
Metal rcm biz plan
Metal rcm biz planMetal rcm biz plan
Metal rcm biz plan
 
Bazaar
BazaarBazaar
Bazaar
 
STATA - Summary Statistics
STATA - Summary StatisticsSTATA - Summary Statistics
STATA - Summary Statistics
 
STATA - Merge or Drop Data
STATA - Merge or Drop DataSTATA - Merge or Drop Data
STATA - Merge or Drop Data
 
STATA - Linear Regressions
STATA - Linear RegressionsSTATA - Linear Regressions
STATA - Linear Regressions
 
STATA - Graphing Data
STATA - Graphing DataSTATA - Graphing Data
STATA - Graphing Data
 
STATA - Probit Analysis
STATA - Probit AnalysisSTATA - Probit Analysis
STATA - Probit Analysis
 
STATA - Presenting Output
STATA - Presenting OutputSTATA - Presenting Output
STATA - Presenting Output
 
STATA - Download Examples
STATA - Download ExamplesSTATA - Download Examples
STATA - Download Examples
 
STATA - Instrumental Variables
STATA - Instrumental VariablesSTATA - Instrumental Variables
STATA - Instrumental Variables
 
STATA - Panel Regressions
STATA - Panel RegressionsSTATA - Panel Regressions
STATA - Panel Regressions
 
STATA - Time Series Analysis
STATA - Time Series AnalysisSTATA - Time Series Analysis
STATA - Time Series Analysis
 

Semelhante a Ruby

Palestra Desenvolvimento Ágil para Web com ROR UVA
Palestra Desenvolvimento Ágil para Web com ROR UVAPalestra Desenvolvimento Ágil para Web com ROR UVA
Palestra Desenvolvimento Ágil para Web com ROR UVAThiago Cifani
 
Ruby On Rails : Produtividade, Agilidade, Apenas uma Ferramenta?
Ruby On Rails :  Produtividade, Agilidade, Apenas uma Ferramenta?Ruby On Rails :  Produtividade, Agilidade, Apenas uma Ferramenta?
Ruby On Rails : Produtividade, Agilidade, Apenas uma Ferramenta?Rodrigo Urubatan
 
[Ruby Summit Brasil 2020] Ruby 3 e Análise estática - O que esperar e o que s...
[Ruby Summit Brasil 2020] Ruby 3 e Análise estática - O que esperar e o que s...[Ruby Summit Brasil 2020] Ruby 3 e Análise estática - O que esperar e o que s...
[Ruby Summit Brasil 2020] Ruby 3 e Análise estática - O que esperar e o que s...Weverton Timoteo
 
Apresentação ruby + rails 2014
Apresentação ruby + rails 2014Apresentação ruby + rails 2014
Apresentação ruby + rails 2014Marcelo Bohn
 
Prazer,Ruby On Rails
Prazer,Ruby On RailsPrazer,Ruby On Rails
Prazer,Ruby On RailsAlberto Leal
 
Ruby 3 e Análise estática - O que esperar e o que significa para o nosso código
Ruby 3 e Análise estática - O que esperar e o que significa para o nosso códigoRuby 3 e Análise estática - O que esperar e o que significa para o nosso código
Ruby 3 e Análise estática - O que esperar e o que significa para o nosso códigoWeverton Timoteo
 
OpenLAP Multimaster
OpenLAP MultimasterOpenLAP Multimaster
OpenLAP Multimastercioban
 
café_com_java__06-11-2015
café_com_java__06-11-2015café_com_java__06-11-2015
café_com_java__06-11-2015Wilton Silva
 
Quick introduction to Ruby on Rails
Quick introduction to Ruby on RailsQuick introduction to Ruby on Rails
Quick introduction to Ruby on RailsWhitesmith
 
Ruby and Rails intro
Ruby and Rails introRuby and Rails intro
Ruby and Rails introNuno Silva
 
Esta começando a programar para a web? Então começe com Rails
Esta começando a programar para a web? Então começe com RailsEsta começando a programar para a web? Então começe com Rails
Esta começando a programar para a web? Então começe com Railsismaelstahelin
 

Semelhante a Ruby (20)

Introdução ao Ruby on Rails
Introdução ao Ruby on RailsIntrodução ao Ruby on Rails
Introdução ao Ruby on Rails
 
Palestra Desenvolvimento Ágil para Web com ROR UVA
Palestra Desenvolvimento Ágil para Web com ROR UVAPalestra Desenvolvimento Ágil para Web com ROR UVA
Palestra Desenvolvimento Ágil para Web com ROR UVA
 
Ruby On Rails : Produtividade, Agilidade, Apenas uma Ferramenta?
Ruby On Rails :  Produtividade, Agilidade, Apenas uma Ferramenta?Ruby On Rails :  Produtividade, Agilidade, Apenas uma Ferramenta?
Ruby On Rails : Produtividade, Agilidade, Apenas uma Ferramenta?
 
[Ruby Summit Brasil 2020] Ruby 3 e Análise estática - O que esperar e o que s...
[Ruby Summit Brasil 2020] Ruby 3 e Análise estática - O que esperar e o que s...[Ruby Summit Brasil 2020] Ruby 3 e Análise estática - O que esperar e o que s...
[Ruby Summit Brasil 2020] Ruby 3 e Análise estática - O que esperar e o que s...
 
Apresentação ruby + rails 2014
Apresentação ruby + rails 2014Apresentação ruby + rails 2014
Apresentação ruby + rails 2014
 
Prazer,Ruby On Rails
Prazer,Ruby On RailsPrazer,Ruby On Rails
Prazer,Ruby On Rails
 
Ruby on rails
Ruby on railsRuby on rails
Ruby on rails
 
RoR na prática
RoR na práticaRoR na prática
RoR na prática
 
SEA Rails na pratica
SEA Rails na praticaSEA Rails na pratica
SEA Rails na pratica
 
Typescript
TypescriptTypescript
Typescript
 
Ruby 3 e Análise estática - O que esperar e o que significa para o nosso código
Ruby 3 e Análise estática - O que esperar e o que significa para o nosso códigoRuby 3 e Análise estática - O que esperar e o que significa para o nosso código
Ruby 3 e Análise estática - O que esperar e o que significa para o nosso código
 
Postgres nuvens
Postgres nuvensPostgres nuvens
Postgres nuvens
 
Ruby FTW
Ruby FTWRuby FTW
Ruby FTW
 
OpenLAP Multimaster
OpenLAP MultimasterOpenLAP Multimaster
OpenLAP Multimaster
 
café_com_java__06-11-2015
café_com_java__06-11-2015café_com_java__06-11-2015
café_com_java__06-11-2015
 
Quick introduction to Ruby on Rails
Quick introduction to Ruby on RailsQuick introduction to Ruby on Rails
Quick introduction to Ruby on Rails
 
Ruby and Rails intro
Ruby and Rails introRuby and Rails intro
Ruby and Rails intro
 
Esta começando a programar para a web? Então começe com Rails
Esta começando a programar para a web? Então começe com RailsEsta começando a programar para a web? Então começe com Rails
Esta começando a programar para a web? Então começe com Rails
 
Seja DinâMico Com Python
Seja DinâMico Com PythonSeja DinâMico Com Python
Seja DinâMico Com Python
 
Ruby
RubyRuby
Ruby
 

Ruby

  • 2. Ruby ● Tipo de linguagem ● Interpretadores ● Sintaxe ● Objetos & Mensagens ● Features ● Tools ● Rack ● Rails ● Sinatra
  • 3. Ruby - Interpretadores ● MRI - Matz's Ruby Interpreter ● YARV - Yet Another Ruby VirtualMachine ● Jruby - JVM ● Rubinius – Ruby em Ruby ● IronRuby - .NET ● MacRuby – Objective C
  • 4. Ruby – Tipo de linguagem ● Tipagem Dinâmica ● OO ● Fortemente tipada ● Garbage collection
  • 5. Ruby - Sintaxe ● Constante ● ::EscopoGlobal ● variavel_local ● @variavel_de_objeto ● @@variavel_de_class ● 2 ● 2.3 ● “string #{interpolada}”
  • 6. Ruby - Sintaxe ● :symbol ● [1, 2] ● { :ola => 'voce' } ou { ola: 'voce' } ● raise HelpError unless world.is_safe? ● drink while ! beer.nil? ● for nerd in @dj_house; nerd.eat(meat); end ● case; when; default; end ● 3.times { puts 'Hurra!' }
  • 7. Ruby - Sintaxe ● 3.times do; puts 'Hurra!'; end ● 1..10 ● Imprimir ímpares de 1 a 20 em ordem inversa
  • 8. Ruby – Objetos e Mensagens ● (Quase) Tudo são objetos. ● (Quase) Todas as interações são feitas com troca de mensagens ● 1+1 ● 1.+(1) ● 1.send('+', 1)
  • 9. Ruby – Objetos e Mensagens
  • 10. Ruby - features ● Suporte a introspecção (respond_to) ● Redefinição de métodos ● Classes abertas ● method_missing ● Sem overload de métodos ● Herança múltipla com mixins ● const_missing
  • 11. Ruby - Tools ● Gems ● bundle ● Webservers ● Thin ● Passenger ● Unicorn ● JVM ● RVM e rbenv
  • 12. Ruby - Rack ● Ruby Webserver Interface ● API minimalista para os frameworks web ● config.ru
  • 13. Ruby - Rails ● MVC ● Routing ● Middleware ● Migrations ● Helpers
  • 14. Ruby - Sinatra ● DSL para aplicações web ● Views ● haml :index ● Helpers ● enable :sessions