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
Domas Bitvinskas
November 30, 2013
Programming
1
1.1k
Rubinai ant bėgių
A brief sweet intro into Ruby on Rails.
Domas Bitvinskas
November 30, 2013
Tweet
Share
More Decks by Domas Bitvinskas
See All by Domas Bitvinskas
3 cool AI things
nedomas
0
160
Apollo & GraphQL: What we learned building a multi-platform chat app
nedomas
1
200
Best kept secrets for 2019: GraphQL + Prisma
nedomas
1
69
Tensorflow.js ir web ateitis
nedomas
1
120
Hack the Open Source Growth
nedomas
1
79
Market your Open Source or kill it
nedomas
1
890
Ruby on Rails is dead
nedomas
2
1.1k
Why does Ruby own the startup world?
nedomas
0
660
Rockstars and Productivity
nedomas
1
960
Other Decks in Programming
See All in Programming
1人で挑むSwiftコンパイラ 〜型システム入門編〜
s_shimotori
0
310
iOSDC 2024 SMBファイル共有をSwiftで実装する
kishikawakatsumi
1
110
Some more adventure of Happy Eyeballs
coe401_
2
150
メモリ最適化を究める!iOSアプリ開発における5つの重要なポイント
yhirakawa333
0
380
React + TextAliveでカッコいいLyric Applicatioinを作ろう!!
tosuri13
0
320
Web技術を駆使してユーザーの画面を「録画」する
yukukotani
13
6.3k
ESLint Rule により事業, 技術ドメインに沿った制約と誓約を敷衍させるアプローチのすゝめ
shinyaigeek
1
2.8k
Amebaチョイス立ち上げの裏側 ~依存システムとの闘い~
daichi_igarashi
0
220
Hono・Prisma・AWSでGeoなAPI開発
nokonoko1203
5
620
Scala におけるコンパイラエラーとの付き合い方
chencmd
1
200
dRuby 入門者によるあなたの身近にあるdRuby 入門
makicamel
4
340
Prompt Cachingは本当に効果的なのか検証してみた.pdf
ttnyt8701
0
450
Featured
See All Featured
Creatively Recalculating Your Daily Design Routine
revolveconf
215
12k
The Mythical Team-Month
searls
218
43k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
25
1.3k
Raft: Consensus for Rubyists
vanstee
135
6.5k
Bash Introduction
62gerente
608
210k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
33
1.7k
Facilitating Awesome Meetings
lara
49
5.9k
How to Think Like a Performance Engineer
csswizardry
15
920
The Invisible Side of Design
smashingmag
295
50k
Designing with Data
zakiwarfel
98
5k
Mobile First: as difficult as doing things right
swwweet
220
8.8k
Testing 201, or: Great Expectations
jmmastey
35
6.9k
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