11.07.2015 Views

Encyclopedia of Computer Science and Technology

Encyclopedia of Computer Science and Technology

Encyclopedia of Computer Science and Technology

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

414 Rubya file, as with many scripting languages, Ruby can also beused interactively to test statements:% ruby eval.rbruby> puts “Hello, world.”Hello, world.nilruby> exitHere the Ruby interpreter is told to run eval.rb, a specialprogram that interactively evaluates statements <strong>and</strong> expressions.The puts comm<strong>and</strong> puts (outputs) the string Hello,world. The evaluator then reports that the puts methodreturned no value (nil).Although Ruby is traditionally an interpreted language,a version that will produce byte code for a virtual machine(similar to Java) is in development, <strong>and</strong> a more direct compileris certainly possible.Ruby on RailsThe most popular programming environment for Rubyis Ruby on Rails, an open-source application frameworkaimed particularly at writing programs that connect Websites to databases. The framework is based on the modelviewcontroller approach (separating data access <strong>and</strong> logicfrom the user interface) <strong>and</strong> includes “scaffolding” that canbe quickly filled in to provide data-driven Web sites withbasic functionality. Developers can also create plug-ins toextend the built-in packages.Further ReadingBaird, Kevin. Ruby by Example: Concepts <strong>and</strong> Code. San Francisco:No Starch Press, 2007.Burd, Barry. Ruby on Rails for Dummies. Hoboken, N.J.: Wiley,2007.Cooper, Peter. Beginning Ruby: From Novice to Pr<strong>of</strong>essional. Berkeley,Calif.: Apress, 2007.“Ruby: A Programmer’s Best Friend.” Available online. URL: http://www.ruby-lang.org/en/. Accessed November 13, 2007.Slagell, Mark. “Ruby User’s Guide.” Available online. URL: http://www.mentalpointer.com/ruby/index.html. Accessed November13, 2007.Stewart, Bruce. “An Interview with the Creator <strong>of</strong> Ruby.” O’ReillyLinux devcenter, November 29, 2001. Available online. URL:http://www.linuxdevcenter.com/pub/a/linux/2001/11/29/ruby.html. Accessed November 13, 2007.Thomas, Dave. Programming Ruby: The Pragmatic Programmer’sGuide. 2nd ed. Raleigh, N.C.: Pragmatic Bookshelf, 2004.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!