61
Ruby on Rails Ride on the fast track of web

Ride on the Fast Track of Web with Ruby on Rails- Part 1

Embed Size (px)

DESCRIPTION

In July 2004 David Heinemeier Hansson aka dhh, a Danish programmer came up with a web application framework while building a project management tool named Basecamp. In 2012 it is now one of the fastest growing web frameworks in world. Tens of Thousands Rails applications like Basecamp, Twitter, Github, Groupon, and our own (in Bangladesh) akhoni.com and bdipo.com are live. Ruby on Rails (RoR) claims to be a breakthrough in lowering the barriers of entry to programming. Powerful web applications that formerly took months to develop can be produced now in a days. RoR is now official platform for many startup incubators. This was presented in Basis Softexpo 2012 and arranged by Nascenia IT, the leading Ruby on Rails development company in Bangladesh. In this session presenters introduced and explored the zeal of RoR. Also they talked about how this can optimize programmer's happiness and sustainable productivity. Continuation of the slide will be found at : http://slidesha.re/ABcopT

Citation preview

Page 1: Ride on the Fast Track of Web with Ruby on Rails- Part 1

Ruby on Rails

Ride on the fast track of web

Page 2: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 3: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 4: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 5: Ride on the Fast Track of Web with Ruby on Rails- Part 1

“Accumulated knowledge of the

world to your fingertip”

Page 6: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 7: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 8: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 9: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 10: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 11: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 12: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 13: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 14: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 15: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 16: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 17: Ride on the Fast Track of Web with Ruby on Rails- Part 1

“We are the masters

They are the slaves”

Page 18: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 19: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 20: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 21: Ride on the Fast Track of Web with Ruby on Rails- Part 1

2.days.ago =>Thu, 23 Feb 2012 14:11:45 EST -05:00

‘fuad bin omar’.reverse =>ramo nib dauf

‘fuad bin omar’.capitalize =>Fuad bin omar

‘fuad bin omar’.length =>13

Page 22: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 23: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 24: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 25: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 26: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 27: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 28: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 29: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 30: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 31: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 32: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 33: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 34: Ride on the Fast Track of Web with Ruby on Rails- Part 1

+

Page 35: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 36: Ride on the Fast Track of Web with Ruby on Rails- Part 1

Convention

Configuration

Over

Page 37: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 38: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 39: Ride on the Fast Track of Web with Ruby on Rails- Part 1

One Class Per Table

Class User < ActiveRecord::Base

end

Page 40: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 41: Ride on the Fast Track of Web with Ruby on Rails- Part 1

Validations

Class User < ActiveRecord::Base

validates_presence_of :login,:name

validates_uniqueness_of :login

end

Page 42: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 43: Ride on the Fast Track of Web with Ruby on Rails- Part 1

class User < ActiveRecord::Base

has_many :posts

end

class Post< ActiveRecord::Base

belongs_to :user

end

Page 44: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 45: Ride on the Fast Track of Web with Ruby on Rails- Part 1

User.create!(:login => ‘fuad’,

:name => ‘Fuad Omar’)

user = User.new(:login =>

‘fuad’, :name => ‘Fuad Omar’)

user.save!

user = User.new

user.login = ‘fuad’

user.name = ‘Fuad Omar’

user.save!

Page 46: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 47: Ride on the Fast Track of Web with Ruby on Rails- Part 1

user = User.first

user = User.find(12)

user = User.find_by_name(‘Fuad’)

posts = user.posts

Page 48: Ride on the Fast Track of Web with Ruby on Rails- Part 1

user = User.find(12)

posts =

user.posts.where(‘created_at >’,

Date.today – 7.days.ago)

posts = posts.order(‘title‘)

Page 49: Ride on the Fast Track of Web with Ruby on Rails- Part 1

user = User.find(1)

user.name = ‘Fuad Bin Omar’

User.save

Page 50: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 51: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 52: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 53: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 54: Ride on the Fast Track of Web with Ruby on Rails- Part 1

2,35,000

Page 55: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 56: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 57: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 58: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 59: Ride on the Fast Track of Web with Ruby on Rails- Part 1
Page 60: Ride on the Fast Track of Web with Ruby on Rails- Part 1

Fuad Omar Co-Founder, Nascenia IT

www.nascenia.com

www.facebook.com/nascenia

www.linkedin.com/in/fuadomar

@fuadcse