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
Rubinai ant bėgių
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Domas Bitvinskas
November 30, 2013
Programming
1.1k
1
Share
Rubinai ant bėgių
A brief sweet intro into Ruby on Rails.
Domas Bitvinskas
November 30, 2013
More Decks by Domas Bitvinskas
See All by Domas Bitvinskas
3 cool AI things
nedomas
0
540
Apollo & GraphQL: What we learned building a multi-platform chat app
nedomas
1
420
Best kept secrets for 2019: GraphQL + Prisma
nedomas
1
99
Tensorflow.js ir web ateitis
nedomas
1
200
Hack the Open Source Growth
nedomas
1
160
Market your Open Source or kill it
nedomas
1
1k
Ruby on Rails is dead
nedomas
2
1.2k
Why does Ruby own the startup world?
nedomas
0
710
Rockstars and Productivity
nedomas
1
1k
Other Decks in Programming
See All in Programming
AIと共にエンジニアとPMの “二刀流”を実現する
naruogram
0
120
Goの型安全性で実現する複数プロダクトの権限管理
ishikawa_pro
2
1.4k
Linux Kernelの1文字のミスで 権限昇格ができた話
rqda
0
2.2k
20260320登壇資料
pharct
0
160
The free-lunch guide to idea circularity
hollycummins
0
410
Kubernetesでセルフホストが簡単なNewSQLを求めて / Seeking a NewSQL Database That's Simple to Self-Host on Kubernetes
nnaka2992
0
200
AI活用のコスパを最大化する方法
ochtum
0
370
Everything Claude Code OSS詳細 — 5層構造の中身と導入方法
targe
0
160
PHP でエミュレータを自作して Ubuntu を動かそう
m3m0r7
PRO
2
160
PHP 7.4でもOpenTelemetryゼロコード計装がしたい! / PHPerKaigi 2026
arthur1
1
480
Symfonyの特性(設計思想)を手軽に活かす特性(trait)
ickx
0
120
SkillがSkillを生む:QA観点出しを自動化した
sontixyou
2
2k
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
230
WCS-LA-2024
lcolladotor
0
510
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
190
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
Agile that works and the tools we love
rasmusluckow
331
21k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
How to Think Like a Performance Engineer
csswizardry
28
2.5k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.8k
Between Models and Reality
mayunak
3
250
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
670
Raft: Consensus for Rubyists
vanstee
141
7.4k
Transcript
Rubinai ant bėgių
DOMAS BITVINSKAS domasbitvinskas.com @Nedomas
kodėl?
None
None
None
<HTML>
! ! ! ! ! <h1>F-18 jet fighter with Ruby</h1>
<html> <head> <title>Talks</title> </head> <body> <h1>F-18 jet fighter with Ruby</h1>
</body> </html>
! <h1>The Kids Aren’t Alright on TODAY</h1>
<h1>The Kids Aren’t Alright on TODAY</h1> ! ! ! <h1>The
Kids Aren’t Alright on 2013-11-30</h1> PROGRAMA, GENERUOJANTI HTML
<h1>The Kids Aren’t Alright on TODAY</h1> ! ! ! <h1>The
Kids Aren’t Alright on 2013-11-30</h1> SERVERIS
Ruby Rails HTML karkasas
konfigūracija
struktūra app bin config lib log public test
struktūra app bin config lib log public test
struktūra app … models views controllers bin config
struktūra app … models views controllers bin config M V
C
None
Controller View Model
http://todoapp.com /todos SERVERIS PUSLAPIS
PUSLAPIS /todos todos/index.html.erb Todo TodosController View Model Controller index Veiksmas
PUSLAPIS /todos/index todos/index.html.erb Todo TodosController View Model Controller index Veiksmas
None
None
None
None
None
rails new server
rails new server generate
rails generate scaffold Todo name:string on_date:date done:boolean
rake db:migrate
None
None
None
None
None
! <h1>Listing todos</h1> … <tr> <td>Launch the spaceship</td> <td>2015-07-24</td> …
</tr> … HTML
app/views/index.html.erb <h1>Listing todos</h1> <% @todos.each do |todo| %> <tr> <td><%=
todo.name %></td> <td><%= todo.on_date %></td> … </tr> <% end %> … RUBY/ERB
app/controllers/todos_controller.rb class TodosController … def index @todos = Todo.all end
… end RUBY
Užduotis
Sugeneruokite aplikaciją ingredientams. Ingredientas turės: • pavadinimą - name •
kainą - price • galiojimo datą - good_till • suvalgytas - eaten ! Pavyzdys: rails new todo_app cd todo_app rails server rails generate scaffold Todo name:string on_date:date done:boolean rake db:migrate TIPAI: string, float, integer, date, datetime, boolean