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
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
95
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
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
650
Kiroで創り、AgentCoreで繋ぐ!AWSで実践する「AI-DLC」から「AIエージェント統合」までの最新地図
licux
3
440
XP祭りでしか伝わらないフリップネタ #xpjug
murabayashi
0
120
WebMCP Challenge に星空観察アプリで参加した話
okajun35
0
120
Hono + Inertia + React で LP を構築した話
oukayuka
2
220
高専キャリア LT 発表内容
crysta1221
6
5.6k
Press start. Python's next generation.
willingc
PRO
3
330
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
700
LoopHub - ローカルで動く GitHub で、AI と共同開発
jugyo
1
490
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
280
XHTMLが残したもの
yosuke_furukawa
PRO
2
620
Security issues being discussed on Web Platforms
petamoriken
0
490
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
400
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
680
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
590
Optimizing for Happiness
mojombo
378
71k
30 Presentation Tips
portentint
PRO
1
390
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
230
The Pragmatic Product Professional
lauravandoore
37
7.4k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
420
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
340
Utilizing Notion as your number one productivity tool
mfonobong
4
580
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
490
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