Ruby on Rails and J2EE: Room for Both? 47
Wayne writes "Ruby on Rails is a relatively new Web application framework built on the Ruby language. It is billed as an alternative to existing enterprise frameworks, and its goal, in a nutshell, is to make your life -- or at least the Web development aspects of it -- easier. This article will contrast the Rails framework against a typical J2EE implementation using common open source tools that are regularly found in enterprise applications."
I've not yet used Ruby (Score:1, Redundant)
Re:I've not yet used Ruby (Score:2, Informative)
Speaking of Python, make that room for three [djangoproject.com].
(Perhaps even 4 with Zope, I guess)
I just started it about a week ago (Score:4, Interesting)
Don't get me wrong. I love java and hibernate and all of the powerful ideas it introduces and brings to the table, but RoR just makes things so easy and fast. I don't know how easy it would be to write something huge in it, but lots of my initial reservations about it were shed when I started playing with it.
If you haven't given this a try, I'd really suggest you do it. With this giving developers such an easy time writing web apps, and having an alternative with java that's more verbose but proven and (maybe) more powerful, I don't see any room for .net anymore. Unless you like writing non-MVC apps :)
RoR? (Score:1)
On a serious note, I honestly doubt the typical programmer can go from Idea to Working Code in Ruby any faster than you can do the same thing in Java. If you can personally, then I'd suspect you just aren't very good at Java.
Not a personal attack, but there's just so many useful Java libraries that it's a s
Re:RoR? (Score:3, Insightful)
You are absolutely and utterly kidding yourself. All idea does is fix java. An IDE like this is just not required for ruby like service pack 2 is not required for linux.
Re:RoR? (Score:2, Insightful)
Hell, of course the IDE has to do the stuff that Ruby does by being dynamic. Example: For ActiveRecord you would need
This all results from the nature of Java. But, if you do the "generator"-way this results in much snappier applications. Currently (including Hibernate) everything circles around IOC and code injection (C
Agreed (Score:1)
I'll say it again: couple a modern OO language with lots of native libraries all documented clearly with a decent IDE (method completion, auto-syntax checking) and I can solve just about any problem in software in a relatively short amount of time.
Considering there's more lines of Java code in exis
Re:Agreed (Score:1)
many many job postings are for J2EE developers
If your first statement is true, then I don't think you have to worry much about the second. I confess I have some doubts, though.
Re:RoR? (Score:1)
Of course, you can forget about RoR and just go with java and assume that people who think RoR is better are just bad coders, or you can give it a shot and see that there's a l
Re:RoR? (Score:2)
I honestly doubt that you know anything about Ruby (or Python, for that matter). Java is a heavyweight language. There's a lot of boilerplate (especially in crap like J2EE. There are lots and lots of testimonials about working with Ruby being easier and faster than working in Java -
Re:I just started it about a week ago (Score:3, Insightful)
RoR makes easy things easy, but Java makes hard things possible. (You could also insert Python, Perl, or PHP in place of RoR and that statement would be equally true.) The "alternatives" to Java are all missing an O/R tool as powerful as Hibernate, an AOP/IoC framework as powerful as Spring or AspectJ (
Re:I just started it about a week ago (Score:2)
Of course, it should be mentioned that most likely the Java IDE you are using will automatically generate that Hibernate XML for you. You can hand tweak it later, but t
Re:I just started it about a week ago (Score:2)
They aren't the same dozens of options. ActiveRecord is catching up, but it's not a feature equivalent to Hibernate yet.
Of course, many real-world business apps require far more than just a CGI-based front controller and an O/R backend store. After further study, RoR indeed looks like a great tool for developing a certain breed of web apps -- the typical e-commerce, blog, cms, etc. variety. I would use it in place of
Python will kill Ruby (Score:5, Interesting)
http://www.djangoproject.com/
Django is basically RoR for Python. When you consider the Java-Python integration options available, plus the larger number of Python devs outside of Japan, I think this is a the way of the future.
Re:Python will kill Ruby (Score:4, Insightful)
Re:Python will kill Ruby (Score:2)
Re:Python will kill Ruby (Score:2)
Not less powerful, just less usable. In fact, from what I've seen, the Pythonic way is to not do it.
Take a look at how pervasively HOFs are used in any idiomatic Ruby API (or those of all the languages that came before it). There is a qualitative difference between closures with anonymous functions, and closures only via first class functions.
Re:Python will kill Ruby (Score:2)
Re:Python will kill Ruby (Score:2)
The only difference is that the people behind RoR are really good at building a buzz behind it. They posted frequently on popular websites like Joel on Software and
I agree that Ruby is a cool language, and that Ruby on Rails is cool. But, there's much more happening in Python and ultimately it will bury Ruby... ruby is just too obscure!
Re:Python will kill Ruby (Score:5, Funny)
Damn! Wish I would've known that before I decided to learn Ruby because of all the good things I was hearing about it. But now you tell me it's obscure! Man, I feel so betrayed by all those people who were telling me about how great Ruby is. I had no idea all those people (some with some pretty impressive credentials like the Pragmatic Programmers, the creator of Ant, etc.) were trying to lead me astray. My coworker was showing me how much more productive he was programming in Ruby - was that all just an act? Well, it just proves that you just can't trust anyone these days, eh? Damn!
Ruby is just too secure (Score:3, Funny)
And this, of course, is what makes Ruby so secure.
Re:Python will kill Ruby (Score:2)
actually, you stated:
Has it been out as long as RoR? Ruby on Rails has been around for about a year. RoR started out in a working state a year ago, and it's only being noticed now. I can't get a history on django, but it doesn't appear to be as old or as mature as you state.
Re:Python will kill Ruby (Score:2)
If you really wanted that information, you would have followed the link to the Django website, and found, almost instantly:
You'd also have noticed that chicagocrime.org [chicagocrime.org], one of the famous Google Map API using sites we /.ers have s
Re:Python will kill Ruby (Score:4, Interesting)
The Rails folks are very good at marketing -- but they surely haven't forgotten to put a solid product behind that buzz.
As for Ruby losing to Python? Well...
At work, we're in the middle of re-implementing OCLC's PURL [oclc.org] redirection server (which is a tasty casserole of Perl, C, and god only knows what else). With the goal of demonstrating that we don't need our own private copy of Apache (as OCLC uses), a pile of ReWrite rules, and an army of Perl scripts to work with its Berkeley DB backend, I threw together a quick demo using Ruby's WEBrick servlet and connected it to PostgreSQL. Thankfully, I was able to persuade the decision-makers that a scripting language and an RDBMS are a reasonable solution to our problem... but their attitude toward Ruby was similar to yours. "I dunno, I haven't heard much about it, let's use something else."
We settled on Python, which, of course, has its own SimpleHTTPServer which fills roughly the same niche as WEBrick. But it's slower, it dies if you throw too many concurrent connections at it, and its built-in methods are far cruder than those of its Ruby counterpart. I'm going to have to write a lot more code to pull it off in Python.
Obviously this is an anecdotal example... but I just keep coming across things in Ruby that simply make more sense, and just work better than they do in other systems. After a couple of weeks, I'm certainly sold -- even though $PREFERRED_LANGUAGE will keep paying the bills, Ruby is a great tool to have at my disposal.
Re:Python will kill Ruby (Score:2)
While you are rewriting your PURL server, could you make it easy to switch individual redirects [w3.org] (that's not me) to 303 Founds to be compliant with HTTPRange-14 [w3.org]? Even better, a per PURL option for 302 or 303 redirects would be nice. I don't really like the HTTPRange-14 compromise, but it is better than nothing I guess.
Re:Python will kill Ruby (Score:1)
I believe OCLC went with 302 due to incomplete/nonexistant implementations of 303 status in pre-HTTP/1.1 clients, but that was a long time ago.
Re:Python will kill Ruby (Score:2)
I have no affiliation with twisted beyond being impressed by the library, btw.
Re:Python will kill Ruby (Score:2, Insightful)
It's pretty simple, once a developer/group/company builds up a lot of functionality in API's or Classes, or just gains experience using one language, it is easiest and best for them to try to use that language with the new addon instead of trying to learn something new (such as RoR).
It is not always possible or viable to use something just because it is the "great platform."
Re:Python will kill Ruby -- grow up (Score:1)
Re:Python will kill Ruby (Score:1)
Nitro kills Django dead (Score:3, Informative)
Django is now old news...
Yeah, Nitro is in Ruby. But considering that RoR has opened the Ruby door so that many people have been learning Ruby lately ( and also considering that it's quite easy to go from either Perl or Python to Ruby) that's not a problem. Excellent Ruby web programming frameworks are now popping up like mushrooms after a Fall rain.
One nice RubyOnRails feature... (Score:3, Interesting)
Re:One nice RubyOnRails feature... (Score:1, Interesting)
use XMLRPC::Transport::HTTP;
$daemon = XMLRPC::Transport::HTTP::Daemon
->new(LocalPort => $PORT)
->dispatch_to('ClassName')
->handle( );
Wow, that was easy, too. And look, Perl is already installed.
Re:One nice RubyOnRails feature... (Score:1)
Stupid (Score:4, Insightful)
That's like asking C++ and Java, room for both? Or, Chevy and Ford, room for both?
Of course there's room for both, and if there's not, who cares?
Tapestry and Spring? (Score:2)
I'd like to see a comparison of RoR and a J2EE app that uses Tapestry, and maybe even Spring. Tapestry just throws JSP out the window and brings something much much better, cleaner, more powerful. People who have used WebObjects will understand very quickly the way Tapestry works. As for Spring, well, it just saves you a lot of headaches and a lot of code that
Re:Tapestry and Spring? (Score:3, Interesting)
of course there's room for both! (Score:4, Insightful)
If I had a team of 50 programmers working on a gigantic site, and the programmer turnover was high, and these folks put in a good day's work but weren't hardcore programmer geeks, I would probably choose Java. Type safety, verbose explicit code, huge array of tools and vendor support, this is the stuff of "joe sixpack programmer".
However, for small focused teams with passionate programmers (folks who program 10 hours a day at work, and then go home and do another 4 hours just for fun, and then write their own IDEs on the side), I would definitely choose Ruby on Rails. Java would just slow us down.
And don't think for a minute that there's anything revolutionary about RoR. This is an old debate: do you create a powerful and expressive "domain specific language", which takes time to learn and understand but allows you to work at high velocity once up to speed (example: RoR)? Or do you go for slow and steady but with a quick ramp-up (example: PHP).
The great thing about RoR is it brings this style of metaprogramming to the masses with a pragmatic language like Ruby. I love languages like Lisp, and they can blow Ruby out of the water, but try and do something simple like connect to a database and you enter a sea of incompatible confusing half-finished code and rude IRC denizens.
Rails not the only Ruby Web Framework (Score:3, Interesting)
I've not yet used Ruby (Score:2)
Note: This is a repost. The original was modded 'Redundant' by somebody, but I'm not quite sure how the first post can be redundant, so I'm reposting