Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Nos trilhos do Ruby
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Daniel Cavalcante
February 03, 2016
Programming
63
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Nos trilhos do Ruby
Palestra ministrada na XIV semana da computação da UFPB.
Daniel Cavalcante
February 03, 2016
More Decks by Daniel Cavalcante
See All by Daniel Cavalcante
Arquiteturas modulares com Node.JS
danielcdesouza
1
81
React Native e GraphQL na construção de mobile apps
danielcdesouza
0
65
Nest Framework
danielcdesouza
0
130
"Go" da Alemanha! Sete passos para começar a desenvolver em Go
danielcdesouza
0
96
Novidades do Ruby on Rails 5
danielcdesouza
0
65
Minerando jóias: como extrair o melhor do Ruby
danielcdesouza
0
61
Conhecendo o AngularJS
danielcdesouza
1
91
Começando com Ruby on Rails
danielcdesouza
0
100
Apresentação sobre Framework VRaptor
danielcdesouza
0
140
Other Decks in Programming
See All in Programming
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
390
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
230
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
1k
sbt 2.0: takeoff
eed3si9n
0
160
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
710
TechTown - Creating Composable Callables in Contemporary C++
rollbear
0
130
AI主導のプログラミング学習アプリを作ってみた
econanringo
0
180
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
180
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
220
golang-bob.pdf
iwatsukayura
0
130
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
210
Featured
See All Featured
Optimizing for Happiness
mojombo
378
71k
WENDY [Excerpt]
tessaabrams
14
40k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
59k
Making the Leap to Tech Lead
cromwellryan
135
10k
Darren the Foodie - Storyboard
khoart
PRO
4
4k
Color Theory Basics | Prateek | Gurzu
gurzu
1
490
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
540
Exploring anti-patterns in Rails
aemeredith
4
540
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
280
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
620
The Cult of Friendly URLs
andyhume
79
7k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Transcript
Nos trilhos do Ruby @danielcdesouza
Daniel Cavalcante
None
None
Rails?
! Framework Web Criado em 2003
David Heinemeier Hansson
" Ruby Linguagem de programação
# MVC Arquitetura
$ Don’t Repeat Yourself Não se repita (DRY)
% REST Organizar sua aplicação com recursos e verbos HTTP
& Convention over Configuration Framework baseado em convenções
Componentes
' Action Controller
/my_app ../app ../controllers ../books_controllers.rb controllers
class BooksController < ApplicationController def index @books = Book.all end
def show @book = Book.find(params[:id]) end end books_controller.rb
# Action View
/my_app ../app ../controllers ../books_controllers.rb ../views ../books ../index.html.erb ../show.html.erb views
<h2>My books</h2> <% @books.each do |book| %> <%= book.title %>
<%= book.author %> <% end %> index.html.erb
Active Record
class Book < ActiveRecord::Base validates_presence_of :title, :author, :user end book.rb
class BooksController < ApplicationController def index @books = Book.all end
def show @book = Book.find(params[:id]) end end books_controller.rb
# Active Resource
routes Rails.application.routes.draw do get ‘/books’ => ‘books#index’ get ‘/book’ =>
‘books#show’ end
routes Rails.application.routes.draw do resources :books end
•Action Controller •Action View •Active Record •Active Resource •Action Mailer
•Railties •Active Support outros componentes …
instalação Instale o Ruby on Rails $ gem install rails
criando o app Criando seu primeiro projeto $ rails new
my_app
arquivos gerados pelo Rails
gemfile source ‘https://rubygems.org' gem 'rails', '4.2.3' gem 'pg' gem 'sass-rails',
'~> 5.0' gem 'uglifier', '>= 1.3.0' gem 'coffee-rails', '~> 4.1.0' gem 'jquery-rails' gem 'turbolinks' gem 'jbuilder', '~> 2.0’ gem 'sdoc', '~> 0.4.0', group: :doc group :development, :test do gem 'byebug' gem 'web-console', '~> 2.0' end
gems Baixar gems $ bundle install
servidor Inicie o servidor $ rails server
acesse localmente Acesse a página da aplicação http://localhost:3000
Outros diferenciais
Jampa Ruby
) Obrigado *@danielcdesouza