aspose file tools*
The moose likes Ruby and the fly likes Why learn Ruby ? what's the benefits over other languages ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Ruby
Bookmark "Why learn Ruby ? what Watch "Why learn Ruby ? what New topic
Author

Why learn Ruby ? what's the benefits over other languages ?

Shashank Agarwalg
Ranch Hand

Joined: Mar 03, 2010
Posts: 110

Hey I wanna know what's the benefits to learn the ruby language and why i switch to other language.


Trying to win the world.....................
SCJP 6.0 , SCWCD/OCPJWCD 5, BlackBerry Developer
surendran sukumaran
Greenhorn

Joined: Mar 29, 2010
Posts: 1
Ruby is an interpreted scripting language.
Its a pure object oriented language , everything is an object in ruby .
Its very easy to learn , no variable declarations ,very easy syntax.
Automatic memory management and lot of things.
Ruby programmers also have access to the powerful RubyGems.
Tell me the platform you are working so that i can explain you a bit more.
Katrina Owen
Sheriff

Joined: Nov 03, 2006
Posts: 1364
    
  17
It's not a question of Ruby or a different language. Different languages have different strengths, and some languages are well suited to solve certain types of problems. Some ways of thinking are natural in some languages, but cannot be easily expressed in others. Learning more than one language can help you think more flexibly.

Ruby has a reputation of being pleasurable to code in -- it gives the impression of being small, elegant, and powerful.

There is also a very active and vibrant community around Ruby: many resources for learning (books, webcasts, tutorials, conferences) and for developing (tools, libraries, frameworks).
Paolo Perrotta
author
Greenhorn

Joined: Mar 27, 2010
Posts: 27
From a selfish developer perspective, Ruby is fun! Give yourself a day or two to try it out, and you might find it's just your thing. A good book to begin is http://pragprog.com/titles/btlang/seven-languages-in-seven-weeks.

Ruby is also the place to be if you want to pick up new ideas before they get mainstream. From no-SQL databases, to REST and Behavior Driven Development, the Ruby community pioneered most of the current crop of "cool" ideas.


Paolo Perrotta, Europe
Author of Metaprogramming Ruby
http://www.pragprog.com/titles/ppmetr/metaprogramming-ruby
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Paolo Perrotta wrote:Ruby is also the place to be if you want to pick up new ideas before they get mainstream. From no-SQL databases, to REST and Behavior Driven Development, the Ruby community pioneered most of the current crop of "cool" ideas.

Like what?
BDD is used by Java community along time ago.
I can't discuss No-SQL systems but I don't think they relates to Ruby community.
Google BigTable, Hadoop and maybe many others have nothing to do with Ruby.
Paolo Perrotta
author
Greenhorn

Joined: Mar 27, 2010
Posts: 27
John Todd wrote:BDD is used by Java community along time ago.


I didn't imply that BDD (or no-SQL, REST, etc.) were born with Ruby. All of these techniques are being explored by many different communities. What I say is that the Ruby community is pretty much made up of pioneers that will take the latest concepts and push them further than most communities do. A few examples from my experience using many different languages:

- I found many production-ready libraries to access Mongo, Couch, and the like for Ruby, but one year ago I had trouble finding the equivalent mature Java/C# libraries.
- Cucumber, the growing standard for BDD, was born in Ruby, and has been ported to Java and C# amongst others.
- Ruby on Rails was the first popular non-specialized web framework that rejected SOAP and embraced REST.
- The "convention over configuration" principle was popularized by the Ruby community first, and then spread out to other languages.
- Simple concepts like ActiveRecord have been pushed to their limits in Ruby, just because the language is very unobtrusive.
- Distributed version control systems such as Git are popular all across the board, but in Ruby they became de-facto standards almost overnight.

So I'm not saying that Ruby is where things are invented, but Ruby is currently the place where people experiment more - just like Java was a few years ago, when Design Patterns and automated refactoring grew big. On the other hand, this doesn't mean that all those experiments are successful. Also, keeping up with the crazy pace of evolution in the Ruby world can be difficult, so you might actually prefer the more settled Java environment.

Overall, I feel that the barrier of entry to the "latest toys" is lower in Ruby. This might be a good thing or a bad thing, depending on your environment and attitude.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

surendran sukumaran wrote:very easy syntax.

Yeah? Try parsing it.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Paolo Perrotta wrote:[...] Ruby is currently the place where people experiment more [...]

That's one of my favorite things about Ruby (and similar languages): it actively encourages experimentation, makes it *easy* to experiment, and its flexibility make those experiments feel more like part of the language, rather than something bolted-on and syntax-heavy. It's also my favorite thing about Lisp (which is even better at it)--it encourages the creation of mini-DSLs, allowing clear, precise, and concise problem statements and solutions.
keeping up with the crazy pace of evolution in the Ruby world can be difficult

That's one of my least favorite things about Ruby-the-ecosystem :/ I have only a limited amount of time, and the number of toys the ecosystem throws at you can be overwhelming at times. That said, the Java ecosystem, due to its longevity and the volume of people using it, also has a vast array of choices for just about everything.
Paolo Perrotta
author
Greenhorn

Joined: Mar 27, 2010
Posts: 27
David Newton wrote:
surendran sukumaran wrote:very easy syntax.

Yeah? Try parsing it.


I feel your pain.
I would say easy syntax, but terribly complicated grammar. This is a case of trading off internal complexity for external complexity.
Anil Vupputuri
Ranch Hand

Joined: Oct 31, 2000
Posts: 527
Paolo Perrotta wrote:
- Ruby on Rails was the first popular non-specialized web framework that rejected SOAP and embraced REST.


In JEE, we deploy web archives in web/app servers. Can we deploy web archives developed in Ruby on Rails on web server such as Apache or IIS?


SCJP 1.5, SCEA, ICED (287,484,486)
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Hey Paolo,
I don't have any thing against Ruby but I hate its cocky community.
Ruby people behaves as they are leaders and the other communities are ignorants and stupids.
I met a Ruby guy who was swearing by every thing that TextMate was originated for Ruby !
Many Rails programmers aren't aware they are standing on the shoulders of the giants.
Rails didn't come from no where, it is the hard lessons taken from Java frameworks.
Ironically, Java programmers make the best Ruby programmers (IMVHO) because Java community to a large degree is very well educated regarding software development in general and enterprise applications in specific (who is the cocky now ).
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Anil Vupputuri wrote:
In JEE, we deploy web archives in web/app servers. Can we deploy web archives developed in Ruby on Rails on web server such as Apache or IIS?

I didn't complete my Rails journey yet (because I'm working on Objective-C) but I don't think Rails applications have the "archive" concept.
Any way, if your application is JRails (JRuby on Rails) you can archive your application as WAR and drop it in any JEE container.
Paolo Perrotta
author
Greenhorn

Joined: Mar 27, 2010
Posts: 27
Anil, you can deploy a Rails webapp on Apache easily (http://www.modrails.com).

You can also use an implementation of Ruby for your VM of choice (JRuby for the JVM, IronRuby for Microsoft's CLR). I never tried this, so I can't tell you how mature these technologies are - but I hear that JRuby in particular is getting good vibes. If you use JBoss, also have a look at http://torquebox.org.

Be aware that in general, webapp or not, integrating Ruby with Microsoft technology is just as easy as integrating anything else with Microsoft technology. ;) For example, while you can access a SQL Server DB from Ruby, it's still unpleasant enough that you might just give up and stick with C#. This is something that you should be aware of before considering a Ruby/Microsoft mixed environment. I hope that IronRuby will grow mature enough to fix that problem.
Paolo Perrotta
author
Greenhorn

Joined: Mar 27, 2010
Posts: 27
John Todd wrote:I don't have any thing against Ruby but I hate its cocky community.


I think that most "personalities" in the community are very pleasant, humble people - like Matz, the sorely missed _why, and the Prags. However, I share your opinion that some discussions are penalized by excess testosterone, especially when it comes to the rest of the world "not getting it". But hey, Ruby was inspired by Smalltalk and Lisp amongst others, so you weren't expecting a community of shy unassertive nuns, did you? ;)
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

John Todd wrote:Ironically, Java programmers make the best Ruby programmers (IMVHO)

I've found the exact opposite to be true: Ruby programmers make good Java programmers, but the reverse is rarely true. Most Java programmers have a very narrow view of how to solve problems. When I hire Java programmers I look specifically for experience in (what I consider to be) better languages.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Paolo Perrotta wrote:Ruby was inspired by Smalltalk and Lisp amongst others, so you weren't expecting a community of shy unassertive nuns, did you?

I've found there to be a considerable difference between the Smalltalk and Lisp communities, too; after all, they're Smug Lisp Weenies, not Smug Smalltalk Weenies.
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

David Newton wrote:
John Todd wrote:Ironically, Java programmers make the best Ruby programmers (IMVHO)

I've found the exact opposite to be true: Ruby programmers make good Java programmers, but the reverse is rarely true. Most Java programmers have a very narrow view of how to solve problems. When I hire Java programmers I look specifically for experience in (what I consider to be) better languages.

Would you please share us a story for example?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

John Todd wrote:Would you please share us a story for example?

A story about what?

Java-the-language does not provide the abstractive capabilities of languages I consider better. Because of that, many Java programmers have a limited view of how to solve abstraction-oriented problems (although it's better than it was, say, five years ago). It's been argued that big-p Patterns exist to solve language deficiencies: things that require Patterns in Java disappear into languages that allow higher-level abstractions.

People that understand metaprogramming, closures, better means of abstraction, and that have been exposed to languages that allow a wider variety of problem solutions, make better Java programmers, because they bring that experience to bear when they code Java. Their (as always, in general) code tends to be cleaner, more concise, more representative of the problem they're trying to solve (rather than looking like the high-ceremony Java language itself), and better abstracted than the average Java programmer's code.

YMMV, but I've been programming in, and hiring Java programmers for, just over ten years now, and it's been *very* consistent over that time frame. My feelings were the same when I was programming in, and hiring, C/C++ programmers. (Before that I was programming primarily in Lisp, Smalltalk, and Forth.)

While the article is marginally inflammatory, LFM and LFSP gets at the heart of what I'm saying, and have directly experienced, over the past two decades.
Anil Vupputuri
Ranch Hand

Joined: Oct 31, 2000
Posts: 527
Paolo Perrotta wrote:Anil, you can deploy a Rails webapp on Apache easily (http://www.modrails.com).

You can also use an implementation of Ruby for your VM of choice (JRuby for the JVM, IronRuby for Microsoft's CLR). I never tried this, so I can't tell you how mature these technologies are - but I hear that JRuby in particular is getting good vibes. If you use JBoss, also have a look at http://torquebox.org.

Be aware that in general, webapp or not, integrating Ruby with Microsoft technology is just as easy as integrating anything else with Microsoft technology. ;) For example, while you can access a SQL Server DB from Ruby, it's still unpleasant enough that you might just give up and stick with C#. This is something that you should be aware of before considering a Ruby/Microsoft mixed environment. I hope that IronRuby will grow mature enough to fix that problem.


If I understand correctly, with JRuby (Ruby integrated with Java technology) we can build enterprise apps. Can Ruby alone (or Rails) be used to build enterprise apps with services like transactions, security and naming.
Paolo Perrotta
author
Greenhorn

Joined: Mar 27, 2010
Posts: 27
Anil Vupputuri wrote:If I understand correctly, with JRuby (Ruby integrated with Java technology) we can build enterprise apps. Can Ruby alone (or Rails) be used to build enterprise apps with services like transactions, security and naming.


JRuby is just Ruby re-implemented on the Java Virtual Machine. That makes it easy to integrate with Java (you can call Java objects from Ruby, and so on).

Enterprise applications: it depends on what you mean by "enterprise". For example, take security: Rails' policy is to use simple security models - for example, HTTPS rather than WS-Security. Likewise, transactions are mostly done at database level, and naming relies on URLs rather than JNDI-like naming frameworks. Depending on your environment, this could be good news or bad news.
Shashank Agarwalg
Ranch Hand

Joined: Mar 03, 2010
Posts: 110

Thanks to Everyone

Hey I saw all the replies and also saw the E-book of the Ruby. I thinks that ruby is simple and Impressive language and many views which are described here diffrenciate it with other languages.

Sir, I m a student and Currently I have done SCJP and studying the J2ee further is the ruby benefecial for me.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Shashank Agarwalg wrote:I have done SCJP and studying the J2ee further is the ruby benefecial for me.

Not really, although some experimentation could be done with JRuby. In order to use JRuby effectively in the enterprise, though, you still need to understand the underlying technologies.
Shashank Agarwalg
Ranch Hand

Joined: Mar 03, 2010
Posts: 110

Can anyone Explain in which type of Application devlopement mainly We use the Ruby language. can Anyone give me the Example of the application or industry.
Michael Sullivan
Ranch Hand

Joined: Dec 26, 2003
Posts: 235
I hate to repost this Ruby & Ruby on Rails Whitepaper, but it essentially describes who uses Ruby/Rails, how, and for what. While mostly focusing on Rails, it's a great top-down document describing usage.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Shashank Agarwalg wrote:Can anyone Explain in which type of Application devlopement mainly We use the Ruby language. can Anyone give me the Example of the application or industry.

*Any* type. That's like saying "What kind of applications can we write in Java?"

That said, the *primary* use of Ruby is to write web apps (via Rails) and tools. Although those of us that starting using Ruby back in the Dr. Dobb's article days didn't know it would ever actually become popular via Rails years later.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why learn Ruby ? what's the benefits over other languages ?