Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Nos trilhos do Ruby
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Daniel Cavalcante
February 03, 2016
Programming
0
57
Nos trilhos do Ruby
Palestra ministrada na XIV semana da computação da UFPB.
Daniel Cavalcante
February 03, 2016
Tweet
Share
More Decks by Daniel Cavalcante
See All by Daniel Cavalcante
Arquiteturas modulares com Node.JS
danielcdesouza
1
58
React Native e GraphQL na construção de mobile apps
danielcdesouza
0
45
Nest Framework
danielcdesouza
0
110
"Go" da Alemanha! Sete passos para começar a desenvolver em Go
danielcdesouza
0
79
Novidades do Ruby on Rails 5
danielcdesouza
0
60
Minerando jóias: como extrair o melhor do Ruby
danielcdesouza
0
55
Conhecendo o AngularJS
danielcdesouza
1
87
Começando com Ruby on Rails
danielcdesouza
0
96
Apresentação sobre Framework VRaptor
danielcdesouza
0
130
Other Decks in Programming
See All in Programming
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
640
CSC307 Lecture 06
javiergs
PRO
0
680
Fragmented Architectures
denyspoltorak
0
150
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
660
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
220
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
400
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
110
Oxlintはいいぞ
yug1224
5
1.3k
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
160
AI時代の認知負荷との向き合い方
optfit
0
150
Basic Architectures
denyspoltorak
0
660
Featured
See All Featured
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
580
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
49
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.2k
Speed Design
sergeychernyshev
33
1.5k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
100
Java REST API Framework Comparison - PWX 2021
mraible
34
9.1k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
310
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
The agentic SEO stack - context over prompts
schlessera
0
630
My Coaching Mixtape
mlcsv
0
46
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
120
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
430
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