Ruby on Rails (Redux)

Ruby on Rails - is good for replacing clunky Jsp apps

Posted by 10/13/2005

After rewriting a Jsp application in Ruby on Rails - I'm still impressed with the Ruby on Rails framework

Rebuilding a jsp site

I just finished rewriting a jsp application in the Ruby on Rails framework. I wasn't my original intention, but I kept gravitating back. It had some kind of seductive force that overrode my objections. Just like they say, I found myself being hugely productive with minimal effort. And once I started seeing some immediate progress, it sucked me in. Now I'm trying to figure out why.

It's Easy

There's no doubt about it. It's easy. There are stumbling blocks to be sure. But a quick reference to the API usually answered my questions. It reminds me of PHP, and yet addresses my problems with PHP. It reminds me of Python, but has a web interface toolset I can quickly use.

My Objections

  • Convention over Configuration: It is true that there were times this caused problems. Inexplicable errors. I don't remember specifically. There is some kind of error message like "you probably expected ... but you got ..." I don't remember the exact wording. But this is where the 'scaffolding' comes in handy. The scaffolding is useless for creating useable pages, but it does get you an example of the syntax and setup. Which is invaluable at times.
  • Ruby: I still can't decide about this language. At times it seems to have a beautiful simplicity. Other times an inscrutable obtuseness. Some things violate what I've learned over the years. Don't name a method "to_a" - what does that mean? I've learned to avoid these kind of abbreviations. And yet, it is kind of nice to save on the typing. And it looks like C, so it's not that unusual. Also it also reminds me of vim for some reason. I can't quite put my finger on why. Maybe it's just more of the succinct operations. 10dd. 5x. Maybe it's the text manipulation with numbers. Or just the general ability to be able to do powerful things with a few keystrokes. Like "reverse_foreach". And the blocks and mixins.
  • Template language: Over the years I've come to frown upon the spaghetti code that Asp and PHP make. Some code, some html, some code again. At the same time, when I think back 6 years in the past, my big problem at the time (before I signed on to struts, taglibs and the like) was that I couldn't develop an an object-oriented fashion. Compartmentalizing an application meant a bunch of "include" statements. There was no such thing as a namespace. My code only worked in a web application. But if I'm honest, maybe that was more what I hated then the actual code within html.

Problems with Plone/Zope

In the meantime, I've had some bad experiences with Plone. It's a good product and I don't want to put it down, but it's very much in it's own world. And when something goes wrong, or something doesn't quite do what you want it to, it can be very frustrating. I have a site that will not allow for downloading mp3s. I'm using the ATAudio Product. The problem may be fixed in the upgrade to version 0.6, but the upgrade requires ATContentTypes, which is a real destructive Product that I tried to install at one time, that seemed like it was best used with Plone 2.1. But when I tried to move to Plone 2.1 nothing worked. Which worries me. Maybe 2.1.2 will work fine - but right now it does not work. And I just get this sinking feeling. I wanted to like this. But it's more and more striking me as being too convoluted. Maybe Zope 3.0 will fix all this, but I predict that is a good year away from really infiltrating.

Versioning

One thing only .NET and Ruby have addressed (that I know of) is being able to use multiple versions of packages simultaneously. This seems hugely important to me. There have been some many times I tried to use or update a Java package just to be led down a dead-end dependency trail.

Comments

Post a comment


Total: 0.16 Python: 0.14 DB: 0.03 Queries: 31