Ruby On Rails Presentation

21
1 Ruby on Rails 06/16/22 Building Web Applications Is Fun Again! Presented by Hy Chan Han

description

This is ruby on rails presentation on BarCamp Phnom Penh's day in Cambodia on Saturday, September 20th 2008.

Transcript of Ruby On Rails Presentation

Page 1: Ruby On Rails Presentation

1Ruby on Rails04/11/23

Building Web Applications Is Fun Again!

Presented by Hy Chan Han

Page 2: Ruby On Rails Presentation

• Web Developer• Ruby on Rails

• PHP before then• Free and Open Source (FOSS) Enthusiast

2Ruby on Rails04/11/23

Page 3: Ruby On Rails Presentation

A collection of good libraries, less works but achieve better results and faster.

There are lots of nice tools, classes and methods to makedevelopment easier.

3Ruby on Rails04/11/23

Page 4: Ruby On Rails Presentation

Ruby is:• A High Level Programming Language• Originated in Japan and Rapidly Gaining Mindshare in US and Europe.

4Ruby on Rails04/11/23

Page 5: Ruby On Rails Presentation

Why Ruby ?• Easy to learn• Open source• Very easy to extend• Truly Object-Oriented• Less Coding with fewer bugs

5Ruby on Rails04/11/23

Page 6: Ruby On Rails Presentation

Rails is• A web-application framework written in Ruby by David Heinemeier Hansson.• Model-View-Controller

6Ruby on Rails04/11/23

Page 7: Ruby On Rails Presentation

Model (ActiveRecord ) :Maintains the relationship between Object and Database and handles validation, association, transactions, and more.

7Ruby on Rails04/11/23

Page 8: Ruby On Rails Presentation

View ( ActionView )A presentation of data in a particular format, triggered by a controller's decision to present the data.

8Ruby on Rails04/11/23

Page 9: Ruby On Rails Presentation

Controller ( ActionController ): is the logical center of your application. It coordinates the interaction between the user, the views, and the model.

9Ruby on Rails04/11/23

Page 10: Ruby On Rails Presentation

A Pictorial Diagram of Ruby on Rails Framework:

10Ruby on Rails04/11/23

Page 11: Ruby On Rails Presentation

This can be created by using sample helper command C:\InstantRails\rails_apps>rails demoThen you will find a directory structure as follow:

11Ruby on Rails04/11/23

Page 12: Ruby On Rails Presentation

demo/ ..../app ......../controller ......../helpers ......../models ......../views ............../layouts ..../components ..../config ..../db..../doc ..../lib

12Ruby on Rails04/11/23

Page 13: Ruby On Rails Presentation

13Ruby on Rails04/11/23

Go to http://rubyforge.org/projects/instantrails/

1. Instant Rails 2.02. Instant Rails 1.73. Instant Rails 1.54. Instant Rails 1.45. Instant Rails 1.3a

Page 14: Ruby On Rails Presentation

14Ruby on Rails04/11/23

1. Unzip Instant Rails on any hard drive2. Start server Apache and MySQL

Page 15: Ruby On Rails Presentation

15Ruby on Rails04/11/23

Page 16: Ruby On Rails Presentation

16Ruby on Rails04/11/23

Go to command prompt by using helper command as follow:C:\InstantRails>use_ruby

Page 17: Ruby On Rails Presentation

17Ruby on Rails04/11/23

Rails will try to use Mongrel and lighttpd if they are installed, otherwise Rails will use WEBBrick, the webserver that ships with ruby.

Page 18: Ruby On Rails Presentation

18Ruby on Rails04/11/23

Windows users are encouraged to Start with Mongrel because it is a Ruby-based webserver that is suitable for development and deployment of Rails applications.

Page 19: Ruby On Rails Presentation

19Ruby on Rails04/11/23

• Mysql• Oracle• Postgre Sql• SqlLite• And more…

Page 20: Ruby On Rails Presentation

20Ruby on Rails04/11/23

Page 21: Ruby On Rails Presentation

21Ruby on Rails04/11/23

E-mail: [email protected]