100%(1)1 out of 1 people found this document helpful
This preview shows page 1 - 12 out of 33 pages.
Ruby (on Rails)CSE 190M, Spring 2009Week 1
The Players•Kelly "Everyday I'm Hustlin' " Dunn•Kim "Mouse" Todd•Ryan "Papa T" Tucker
About the Section•Introduce the Ruby programming language•Use Ruby to template web pages•Learn about Ruby on Rails and its benefits
What is Ruby?•Programming Language•Object-oriented•Interpreted
Interpreted Languages•Not compiled like Java•Code is written and then directly executed by an interpreter•Type commands into interpreter and see immediate resultsComputerRuntimeEnvironmentCompilerCodeJava:ComputerInterpreterCodeRuby:
What is Ruby on Rails (RoR)•Development framework for web applications written in Ruby•Used by some of your favorite sites!
Advantages of a framework•Standard features/functionality are built-in•Predictable application organization–Easier to maintain–Easier to get things going
Installation•Windows–Navigate to: –Scroll down to "Ruby on Windows"–Download the "One-click Installer"–Follow the install instructions•Include RubyGems if possible (this will be necessary for Rails installation later)•Mac/Linux–Probably already on your computer–OS X 10.4 ships with broken Ruby! Go here…•
hello_world.rbputs "hello world!"
puts vs. print•"puts" adds a new line after it is done –analogous System.out.println()•"print" does not add a new line–analogous to System.out.print()