File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ruby and the fly likes Java with Ruby Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Languages » Ruby
Bookmark "Java with Ruby" Watch "Java with Ruby" New topic
Author

Java with Ruby

Himalay Majumdar
Ranch Hand

Joined: Sep 28, 2008
Posts: 324
Hi David,

I am a java programmer willing to learn Ruby following just one book.

Does TWGR provide a working example to develop a standalone web application (I dunno if its possible) using only Ruby.

I know that Ruby and Java can work together using JRuby. In your book, do you explain us how and why we use them together with a working example. Or is it entirely Ruby oriented.

Thank you,
-Himalay


SCJP 1.6, SCWCD 5.0, SCBCD 5.0 [loading..]
David Black
author
Greenhorn

Joined: Aug 16, 2009
Posts: 13
Hi Himalay --

There's no Web development material in the book, and no Ruby/Java examples; it's all focused on the Ruby language itself. You can certainly develop standalone Web apps with Ruby, either with some of the basic tools like the CGI library or by rolling your own. There's also the Rack library, which implements a very simple spec for Web apps that make it almost trivial to write one.


David


Ruby training coming up in September! David A. Black and Erik Kastner team up for fast-paced, four-day Ruby intro, in New Jersey, September 14-17. See http://rubyurl.com/vmzN or contact David.
Himalay Majumdar
Ranch Hand

Joined: Sep 28, 2008
Posts: 324
David:

Being a J2EE programmer (still have to learn many other technologies in it), I am hesitating to dive completely in Ruby.

I dont think Ruby is going to replace Java/.Net, but I sense its going to take away some market share. I am planning to learn Ruby first using it with Java, so that when Java market is down I can go for Ruby. Your suggestions will be really helpful.

Thank you.
Michael Sullivan
Ranch Hand

Joined: Dec 26, 2003
Posts: 235
Himalay, you may be interested in this article by Martin Fowler where he talks about Ruby as compared to Java and .net. Some quotes:

"When I ask the question "do you think you're significantly more productive in Ruby rather than Java/C#", each time I've got a strong 'yes'"

"But overall these experiences, from trusted colleagues mean I'm increasingly positive about using Ruby for serious work where speed, responsiveness, and productivity are important."


And keep in mind, that Fowler wrote this in 2006. He did a followup this year reflecting on Thoughtworks use of Ruby (and RoR). Thoughtworks is a Java, .net, and Ruby shop - and they aggregated 3-4 years worth of data on how Ruby and Rails fit into their organization.

Working within web-development means using many languages and frameworks. One of the best things I did was open the book on Ruby (and Rails), which exposed me to many new (and very useful) paradigms. Even if Ruby isn't your preference, you simply cannot afford to not explore new languages ongoing.

As spoken at a No Fluff Just Stuff (NFJS) conference in Denver: "If you aren't learning an alternative language that runs on the JVM (Ruby, Groovy, Scala, Clojure, etc), your already behind."
Himalay Majumdar
Ranch Hand

Joined: Sep 28, 2008
Posts: 324
Articles like one by Martin Fowler and quotes such as "If you aren't learning an alternative language that runs on the JVM (Ruby, Groovy, Scala, Clojure, etc), your already behind." motivate me to learn Ruby as my secondary language in programming to begin with.

Can you please suggest me good beginners book on Ruby, which fills the need of ppl coming from java background, if there is none yet, which book would you suggest me.

Thank you.
-Himalay
Michael Sullivan
Ranch Hand

Joined: Dec 26, 2003
Posts: 235
I've found more resources that transition Java developers to Rails, but not many specifically for Ruby. Still, here are some good texts to have a look at:

10 Things every Java Developer should know about Ruby
The Humble Little Ruby Book (Free to read online)
Programming Ruby (Pickaxe)
The Ruby Way
Beginning Ruby
Rails for Java Developers


Many of these can be had for $10 or less on Amazon (used). Happy book-hunting!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

Himalay Majumdar wrote:which fills the need of ppl coming from ...

Please use real words when posting to the forums. Abbreviations such as "ppl" in place of "people" only serve to make your posts more difficult to read and less likely to generate useful responses.

Please read this for more information.

thanks,
bear
JavaRanch sheriff

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Trilochan Bharadwaj
Ranch Hand

Joined: Feb 02, 2009
Posts: 100
Being marketable is a good reason to learn a language, personally, I feel that every Java programmer (especially java programmers) should learn some functional programming paradigm based languages, like Haskell / ML / Scheme / Scala.

Then off course they should also check out the range of dynamic languages like Ruby, Erlang (to name a few). Lot of people ask, oh well what does that buy me? In reality it doesn't get you much; but the truth is that once you start broadening your horizons in languages, you tend to know that there are "different" approaches and ways of solving software puzzles and some of them dare I say are more efficient than others; (It also helps you in the long run, because of your depth, you can make informed software decisions if you are in that position and guide others as well.)

So yes, learning Ruby is good, but my personal suggestion would be to learn a language to appreciate the beauty of a language itself and not JUST because of the marketable skills it provides...

Some thoughts, BTW Ruby is a beautiful language! you definitely should check it out!

Trilochan.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java with Ruby