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.
Ruby on Rails and J2EE: Is There Room for Both?
About The Author
Follow me on Twitter @thomholwerda
2005-07-18 5:19 pmJoe User
Dumb question, sort of like: Is ther room for Linux with Windows and MacOSX. The market is big, and the tendency towards a homogeneous seting is almost gone.
What do you think is the best Python framework for web development?
2005-07-18 5:35 pmAnonymous
take a look at: http://www.djangoproject.com/
2005-07-18 5:46 pmJoe User
Yes, people are recommending Django and Myghty…
Ruby on Rails seems to be gaining momentum, so the answer is, of course, yes. However, I’d wish the 10,000 other “me too” APIs out there (do we really need another object persistence API?) would just curl up and die off.
The weaker projects get adopted by naive programming teams and they get left making excuses to their bosses why thy can’t upgrade or why they can’t add support for a new tool or whatever.
Folks, just because it appears on the cover of a magazine does not mean it has been validated by the test of time. Magazines will publish anything to fill up their pages, even if it is complete rubbish. They always leave it open ended like “Framework XYZ seems promising” or “the company says these issues will be worked out in the next version…”. Whatever.
I’ve been skimming over the ruby book (Pragmatic programmer) that comes with ruby installs and although its not a bad language I think I do prefer Python as a language.
Ruby has the “one” framework that has lots of momentum, but there is no conclusive RAD framework for Python. Is there any momentum for one Python framework that will compete with RoR, instead of a bunch of little projects?
2005-07-18 6:11 pmAnonymous
well, I think we can say that plone and zope are not “little projects”.
2005-07-18 6:13 pmLumbergh
But is Zope in the same category as RoR? I guess my question is why is RoR getting so much hype compared to the other umpteen web frameworks?
2005-07-18 7:43 pmaemadrid
I spent two years of my life working with Zope and, yes, RoR deserves this much hype. If you really want to know all you have to do is spend 2 hours of your time doing a simple tutorial on RoR and you will know for yourself.
2005-07-18 9:06 pmAnonymous
Zope is more in the same category as J2EE. Both are (at the moment) far bigger, complex, and more powerful than RoR. Both Zope and J2EE are fine for enterprise applications right now (I don’t doubt that with RoR’s current hype it’ll be there soon, too).
2005-07-18 9:18 pmarbour42
i think Rails is getting hype because it does easily what most people need: get a database hooked to the web, while using MVC. And it’s very focused on the end-user experience. In many ways, it reminds me of 1996 and how far Delphi was ahead of VB in making database apps — it’s fast and easy to develop with, and gives a good end-user experience.
i’ve got 3 books on plone and zope, and none of them have the straight-forward tutorial that the first Rails book already has, which gets you up to an intermediate level of skill. I can see the power of Zope 3, but someone has to write a full blown tutorial creating a complex site. I just have a hard time wrapping my mind around zope, but that may be my fault
2005-07-19 2:21 amClinton
I agree with your last statement.
Python is by far my favorite language to use and therefore, I was extremely interested in both Zope and Plone.
Unfortunately, after reading most of a book on Zope and several “tutorials” on both Zope and Plone, I just couldn’t see the big picture. I also couldn’t see much Python either. Needless to say, I don’t have any sites running on Zope or Plone.
I’ve heard Zope3 is trying to solve the Python issue, but I haven’t looked at it at all. I’m sure it will still be something my small attention span will refuse to digest though.
2005-07-18 6:52 pmsmitty_one_each
There is PEP 333, WSGI, whose goal is to at least some standardization.
Nothing against Ruby on Rails. Exciting project.
But, there seems to be this continuing misnomer that conflates Java Servlets and JSP with overarching J2EE.
Servlets and JSP are subcomponents of J2EE. Servlet containers like Tomcat are simply that — servlet containers. Containers that implement a mere portion of the entirety of what J2EE (now simply JEE) is.
If this were titled “Ruby on Rails and Struts”, I wouldn’t even be making this point, but J2EE, as most are well aware, is far bigger than simply the servlet portion.
Is writing a personal web blog tool leveraging all of the J2EE stack overkill vs something like a simpler RoR or Struts application? Yes. But that’s because they server different purposes.
Web based applications CAN BE part of much larger sets of infrastructure, so its nice to be able to more easily integrate such applications into larger systems. If your application doesn’t need that kind of integration, then the common web only style frameworks and infrastructure are more than adequate.
I do not know, but I do not believe that Ruby has a similar back end architecture of the scope of all of JEE.
I liked the article’s summary and agree with it. There are a lot of advantages to using Rails, and I definitely think that it should be considered for future projects. That said, there certainly is no reason to reimplement existing projects that work and J2EE is still very useful. Once Rails gains maturity and earns the elusive “enterprise” label from the community, I believe there will be little reason to choose Java over Rails for new projects. Until then, however, Rails will be a tough sale to bosses on big projects.
2005-07-18 7:48 pmaemadrid
I personally don’t think RoR will ever be labeled “Enterprise” because it does not follow the “Enterprise” mentality. RoR is all about simplicity and “Enterprise” software is all about complexity (J2EE anyone). Now, that does not mean companies will never use it extensively to develop “Enterprise” applications. I know first-hand of a company that is building a large product on Rails. Anyway, my take is that both J2EE and Rails will always coexist peacefull since they both live on two separate worlds. Personally, RoR’s world fits my needs just fine.
2005-07-18 8:53 pmMatt Giacomini
RoR is more like anti-enterprise, and seems very happy to stay that way.
2005-07-19 4:02 pmAnonymous
What makes it anti-enterprise?
Ruby or Ror is not revolutionary , maybe some neat tricks only. J2EE is not the equivalen of RoR. J2EE is not EJB either. On th technical aspect this is still comparing apples to oranges in many cases. RoR-Hibernate, Spring or Struts or whatever framwork would be a better comparison.
However, On this subject i will not suggest looking the buzz words so much, go dice.com and make a search for Ruby vs Java, RoR vs J2EE, Rails vs Hibernate (you will not find any hits for RoR posibly, look for rails) . Result is the real answer of the question. you want to work alone, do whatever you like, you want to work with a team, or make a living, do whatever makes sense.
At the cleaness and compactness of the code..
One issue with all of these app/lang combos is deployment.
How do you deploy and maintain these things? How about in a hosted environment?
Is it easier to understand & maintain a RoR app than a j2ee app? It sure does look faster to write a RoR app than a j2ee app.
“Enterprise” means “complicated and scaleable.” That doesn’t necessarily mean “hard to use,” even though tt does with the current vendors.
If Ruby/RoR does the job, it’ll move to the enterprise.
BTW, there is already project called Trails that mimics what Rails does in Ruby only using J2EE technology. So, you can have your cake and eat it too. Check out https://trails.dev.java.net/
Trails clones one notable feature out of hundreds in Rails: Scaffolding. It’s like calling a bicycle a clone of a Ferrari because they both have the concept of wheels — David
its perl and maybe one nose ahead RoR, but not as popular (yet?) check http://catalyst.perl.org/ and compare yourself
I chose Ruby as my primary scripting language over the others (Perl, Python, …) but there are some pros & cons so I use all three mentioned languages depending on my needs.
Python has fantastic projects like Trac but the core language doesn’t feel as clean as Ruby (IMHO) and I don’t like TAB having special meaning. Another thing I really like about Python is the solid support for wxWidgets GUI toolkit. While there are several other cross-platform GUI toolkits out there, wxWidgets is pretty compelling. Oddly, support for wxWidgets in Ruby is pretty far behind less well-known GUI toolkits such as FOX.
In terms of the core language, I prefer ruby over the others. Everything is an object, even the literal 123, but there some things are in place to make practical one-liners possible like procedural languages. And TAB characters that have meaning.
And Perl, well…I don’t see either Ruby or Python having anything close to Perl’s CPAN for at least five more years–and thats with CPAN not continuing to grow in the meantime.
So in a nutshell, Ruby has some advantages over older languages because it heavily borrowed the good aspects from existing languages. But it is newer so there are fewer people using it for now (though #ruby-lang IRC channel at freenode seems to be growing at is at 200+ members).
I’ve had the fortunate to use RoR and it’s pretty dreamy for creating web based applications. I’ve also used Struts extensively, and the past two projects I’ve been involved with have used Struts, without any serious consideration any other alternative. RoR has quite a ways to go in the corporate world to gain any mindshare – never mind actually winning the battle. IMO, it will get there only by the continuing major grassroots movement.
I have loved Ruby since it first came out, and have been a fan of dynamic languages for a long time. I am also in love with Lua. http://www.lua.org
Another interesting technology – for building more service oriented applications, and rich user interface – take a look at Laszlo. http://www.openlaszlo.com/ It’s free, and robust… IMO, much easier and cleaner than building Ajax applications with better GUI controls, flexibility, and client-side (UI) debugging.
There are several other interesting blog entries in Adams area, take some time to read them.
Another semi-relevant entry by Oliver Steele:
Dumb question, sort of like: Is ther room for MacOSX with Windows and Linux. The market is big, and the tendency towards a homogeneous seting is almost gone.