A
saJavadeveloper,whyshouldyoulearnRuby?BecauseRuby'sversatilityandflexibilitycomplementJavawell,andyouwillbeamoreeffectiveand effi-cient developerifyouusebothlanguages.Infact,IuseJava,Ruby,andCommonLispforallmydevelopmentandRubyhasbecomeacorepartofmyworklife.Specifically,thefollowingreasonsmakeRubycompellingforJava develop-ers:• As a scripting language,Ruby is an effective toolfor small projects. When Ineed to write utilities fordata conversion and textprocessing quickly, Ialmost always use Ruby.• Ruby is a dynamic andterse language.• Using Ruby will often offer a different perspectiveon problem solving.• JRuby is still a work-in-progress but I believe iteventually will provide an excellent Ruby deploymentplatform using the Java VM. Currently, IntelliJ,NetBeans, and Eclipse all provide excellent Rubysupport.• As the cost of software maintenance is roughly pro-portional to the number of lines of code, and Ruby pro-grams are short and concise,they tend to be easier toread, understand, and main-tain.• The Ruby on Rails Webdevelopment framework isgreat for small and medium-sized database-backed webapplications. You need toknow Ruby if you want touse Ruby on Rails.To demonstrate why Ruby isa good fit for Java develop-ers, this article introduces the language features thatwill make you more efficient (see Table 1. Ruby andJava Feature Comparison) and then shows short pro-gram examples in both languages.
2
The Road to Ruby, an Internet.com Developer eBook. Copyright 2008, Jupitermedia Corp.
The Road to Ruby
[ ]
A Java Developer’s Guide to Ruby
By Mark Watson
Jupiterimages
Because Ruby's versatility and flexibility complement Java well, and youwill be a more effective and efficient developer if you use both languages.
“”
Leave a Comment