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
Introduction to Ruby on Rails
Search
Angel Avgerinos
March 19, 2013
Programming
3
200
Introduction to Ruby on Rails
Presentation at University of Piraeus
Angel Avgerinos
March 19, 2013
Tweet
Share
More Decks by Angel Avgerinos
See All by Angel Avgerinos
Hacking our way to Geembo
eavgerinos
1
100
Other Decks in Programming
See All in Programming
Kotlin 2.2が切り拓く: コンテキストパラメータで書く関数型DSLと新しい依存管理のかたち
knih
0
280
AI 駆動開発におけるコミュニティと AWS CDK の価値
konokenj
5
320
Migration to Signals, Resource API, and NgRx Signal Store
manfredsteyer
PRO
0
140
AsyncSequenceとAsyncStreamのプロポーザルを全部読む!!
s_shimotori
1
230
AIと人間の共創開発!OSSで試行錯誤した開発スタイル
mae616
2
870
AIのバカさ加減に怒る前にやっておくこと
blueeventhorizon
0
140
CSC509 Lecture 10
javiergs
PRO
0
160
Software Architecture
hschwentner
6
2.4k
EMこそClaude Codeでコード調査しよう
shibayu36
0
570
퇴근 후 1억이 거래되는 서비스 만들기 | 내가 AI를 사용하는 방법
maryang
2
400
Register is more than clipboard
satorunooshie
1
370
自動テストのアーキテクチャとその理由ー大規模ゲーム開発の場合ー
segadevtech
0
330
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Context Engineering - Making Every Token Count
addyosmani
8
330
Done Done
chrislema
186
16k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
34
2.3k
It's Worth the Effort
3n
187
28k
Balancing Empowerment & Direction
lara
5
710
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Stop Working from a Prison Cell
hatefulcrawdad
272
21k
Unsuck your backbone
ammeep
671
58k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Designing Experiences People Love
moore
142
24k
Transcript
INTRODUCTION - to -
Angel Avgerinos Ruby on Rails & Java developer
RUBY A multi-paradigm general purpose language
Yukihiro Matsumoto (Matz) Creator of Ruby programming language (1995)
What Ruby is
OBJECT - ORIENTED Everything in Ruby is an object (instance
of a Class)
FUNCTIONAL Supports Lambdas and Procs
REFLECTIVE Ruby can modify the structure of an object at
runtime
IMPERATIVE Modules and Blocks
Why Ruby rocks
OPEN SOURCE https://github.com/ruby/ruby
READABLE AND SEXY No semicolons, no mandatory parentheses, method chaining.
TREND RIGHT NOW 2nd most popular language at Github.com
CHECK THIS OUT
class Calc # Creates getters and setters for
num1 and num2 attr_accessor :num1, :num2 def initialize(num1, num2) @num1 = num1 @num2 = num2 end def add #string interpolation puts "#{@num1 + @num2}" end end c = Calc.new(1,2) c.add
WHAT ABOUT LIBRARIES ?
Gem A package format for Ruby programs and libraries
The structure of a Gem
INSTALLING GEMS from RubyGems.org gem install gem_name
Let’s take it to the next level Just type...
gem install rails Now you have superpower
Ruby on Rails MVC framework to get you on the
Web
David Heinemeier Hansson (DHH) Creator of Ruby on Rails (2004)
and partner at 37signals
What Rails is
GEM Just a Gem with reusable code! No fancy installs!
OPEN SOURCE https://github.com/rails/rails
FRAMEWORK A Web application framework.
MVC Awesome pattern.
What Rails is NOT
What Rails is NOT A Programming language
AWESOMENESS MVC
MODEL VIEW CONTROLLER View Controller Model Database
MODEL
CONTROLLER
VIEW
STARTING A NEW RAILS PROJECT
rails new app_name TYPE...
RAILS APP STRUCTURE
/APP
/CONFIG
GEMFILE Where your life becomes easier
source 'https://rubygems.org' gem 'rails', '3.2.12' group :development, :test do
gem 'sqlite3' end group :assets do gem 'sass-‐rails', '~> 3.2.3' gem 'coffee-‐rails', '~> 3.2.1' gem 'uglifier', '>= 1.0.3' gem 'compass-‐rails' gem 'sassy-‐buttons' gem 'bootstrap-‐sass', '~> 2.3.0.1' gem 'font-‐awesome-‐sass-‐rails' end gem 'jquery-‐rails' gem 'omniauth-‐facebook' gem 'devise', '2.2.3' gem 'geocoder'
A GLIMPSE OF RAILS
SCAFFOLDING rails g scaffold User email:string
MIGRATION rake db:migrate
RAILS SERVER rails s
DONE!
HOW TO GET STARTED
tryruby.org codeschool.com codecademy.com railstutorial.org/book railscasts.com github.com RESOURCES
THANKS @eavgerinos
[email protected]