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
400
Apollo & GraphQL: What we learned building a multi-platform chat app
nedomas
1
310
Best kept secrets for 2019: GraphQL + Prisma
nedomas
1
75
Tensorflow.js ir web ateitis
nedomas
1
160
Hack the Open Source Growth
nedomas
1
120
Market your Open Source or kill it
nedomas
1
970
Ruby on Rails is dead
nedomas
2
1.2k
Why does Ruby own the startup world?
nedomas
0
680
Rockstars and Productivity
nedomas
1
970
Other Decks in Programming
See All in Programming
ドメインモデリングにおける抽象の役割、tagless-finalによるDSL構築、そして型安全な最適化
knih
11
1.9k
GoのGenericsによるslice操作との付き合い方
syumai
2
670
地方に住むエンジニアの残酷な現実とキャリア論
ichimichi
2
630
カクヨムAndroidアプリのリブート
numeroanddev
0
430
Webからモバイルへ Vue.js × Capacitor 活用事例
naokihaba
0
740
Go1.25からのGOMAXPROCS
kuro_kurorrr
1
780
統一感のある Go コードを生成 AI の力で手にいれる
otakakot
0
3k
生成AIコーディングとの向き合い方、AIと共創するという考え方 / How to deal with generative AI coding and the concept of co-creating with AI
seike460
PRO
1
320
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
41
28k
PHPで始める振る舞い駆動開発(Behaviour-Driven Development)
ohmori_yusuke
2
110
事業戦略を理解してソフトウェアを設計する
masuda220
PRO
22
6.2k
Spring gRPC で始める gRPC 入門 / Introduction to gRPC with Spring gRPC
mackey0225
2
520
Featured
See All Featured
How to Ace a Technical Interview
jacobian
277
23k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
16
940
Agile that works and the tools we love
rasmusluckow
329
21k
Unsuck your backbone
ammeep
671
58k
How STYLIGHT went responsive
nonsquared
100
5.6k
Thoughts on Productivity
jonyablonski
69
4.7k
Building an army of robots
kneath
306
45k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
107
19k
Six Lessons from altMBA
skipperchong
28
3.8k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
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