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
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
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
2.8k
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
7.3k
FreeBSDでZabbixを動かす
kenkino
0
300
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
290
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
390
setup-vp GitLab対応の裏側
naokihaba
0
110
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
150
AI活用は、個人から組織へ|マルチプレイヤーエージェントハーネス「QM」の社内活用事例 / AI use is moving from individuals to orgs
rkaga
1
110
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
180
すこし踏み込む CancellationToken
htkym
1
480
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
720
SONY CISC-NEWS NWS-1750 + NWB-225 フレームバッファの NetBSD/news68k ドライバ実装 / OSC2026Hiroshima
tsutsui
0
120
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Mobile First: as difficult as doing things right
swwweet
225
10k
Between Models and Reality
mayunak
4
460
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
230
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
260
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
300
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
420
How to Think Like a Performance Engineer
csswizardry
28
2.8k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
610
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
A designer walks into a library…
pauljervisheath
211
25k
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