Ruby On Rails Presentation


Published on

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

Published in: Education, Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Ruby On Rails Presentation

  1. 1. Ruby on Rails 06/04/09 Building Web Applications Is Fun Again! Presented by Hy Chan Han
  2. 2. <ul><li>Web Developer </li></ul><ul><ul><li>Ruby on Rails </li></ul></ul><ul><li>PHP before then </li></ul><ul><li>Free and Open Source (FOSS) Enthusiast </li></ul>Ruby on Rails 06/04/09
  3. 3. A collection of good libraries, less works but achieve better results and faster. There are lots of nice tools, classes and methods to make development easier. Ruby on Rails 06/04/09
  4. 4. <ul><li>Ruby is : </li></ul><ul><ul><li>A High Level Programming Language </li></ul></ul><ul><ul><li>Originated in Japan and Rapidly Gaining Mindshare in US and Europe. </li></ul></ul>Ruby on Rails 06/04/09
  5. 5. <ul><li>Why Ruby ? </li></ul><ul><ul><li>Easy to learn </li></ul></ul><ul><ul><li>Open source </li></ul></ul><ul><ul><li>Very easy to extend </li></ul></ul><ul><ul><li>Truly Object-Oriented </li></ul></ul><ul><ul><li>Less Coding with fewer bugs </li></ul></ul>Ruby on Rails 06/04/09
  6. 6. <ul><li>Rails is </li></ul><ul><ul><li>A web-application framework written in Ruby by David Heinemeier Hansson . </li></ul></ul><ul><ul><li>Model-View-Controller </li></ul></ul>Ruby on Rails 06/04/09
  7. 7. Model (ActiveRecord ) : Maintains the relationship between Object and Database and handles validation, association, transactions, and more. Ruby on Rails 06/04/09
  8. 8. View ( ActionView ) A presentation of data in a particular format, triggered by a controller's decision to present the data. Ruby on Rails 06/04/09
  9. 9. Controller ( ActionController ): is the logical center of your application. It coordinates the interaction between the user, the views, and the model. Ruby on Rails 06/04/09
  10. 10. A Pictorial Diagram of Ruby on Rails Framework: Ruby on Rails 06/04/09
  11. 11. <ul><li>This can be created by using sample helper command </li></ul><ul><li>C:InstantRails ails_apps>rails demo </li></ul><ul><li>Then you will find a directory structure as follow: </li></ul>Ruby on Rails 06/04/09
  12. 12. <ul><ul><ul><ul><ul><li>demo/ </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>..../app </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>......../controller </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>......../helpers </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>......../models </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>......../views </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>............../layouts </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>..../components </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>..../config </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>..../db </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>..../doc </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>..../lib </li></ul></ul></ul></ul></ul>Ruby on Rails 06/04/09
  13. 13. Ruby on Rails 06/04/09 <ul><li>Go to </li></ul><ul><ul><ul><li>Instant Rails 2.0 </li></ul></ul></ul><ul><ul><ul><li>Instant Rails 1.7 </li></ul></ul></ul><ul><ul><ul><li>Instant Rails 1.5 </li></ul></ul></ul><ul><ul><ul><li>Instant Rails 1.4 </li></ul></ul></ul><ul><ul><ul><li>Instant Rails 1.3a </li></ul></ul></ul>
  14. 14. Ruby on Rails 06/04/09 <ul><li>Unzip Instant Rails on any hard drive </li></ul><ul><li>Start server Apache and MySQL </li></ul>
  15. 15. Ruby on Rails 06/04/09
  16. 16. Ruby on Rails 06/04/09 Go to command prompt by using helper command as follow: C:InstantRails>use_ruby
  17. 17. Ruby on Rails 06/04/09 Rails will try to use Mongrel and lighttpd if they are installed, otherwise Rails will use WEBBrick, the webserver that ships with ruby.
  18. 18. Ruby on Rails 06/04/09 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.
  19. 19. Ruby on Rails 06/04/09 <ul><li>Mysql </li></ul><ul><li>Oracle </li></ul><ul><li>Postgre Sql </li></ul><ul><li>SqlLite </li></ul><ul><li>And more… </li></ul>
  20. 20. Ruby on Rails 06/04/09
  21. 21. Ruby on Rails 06/04/09 E-mail: [email_address]