Wednesday, September 20, 2006

What's So Great About Rails?

OK, so now I guess I am becoming a "Rails Guy." At least, I have been doing some Ruby on Rails programming lately and am generally very impressed.

It is still Web programming, there are no major paradigm shifts here. However, Ruby on Rails is an example of how a lot of little things done right can really add up. Ruby is a fine scripting language, improving upon popular languages like Perl and Python. And Rails is an example of getting the little details of Web programming right. Rails is optimized (as I see it) for (1) Productivity and (2) Maintainability. The following are what I really like:
  • The clean, simple ActiveRecord ORM layer.
  • A full-fledged yet simple MVC that is easy to comprehend and get around in.
  • Sensible defaults and very little configur-bation; "convention over configuration."
  • A good job of making the most common tasks simple; the 80/20 rule.
  • "rake migrate" is the coolest way to manage schemas that I have seen.
So, is Rails the answer to everything? Of course not, you won't find sweeping generalizations here. As always, it depends on *specific* requirements. Ruby and Rails are geared toward fast and simple development and maintenance. Java and JEE technologies generally have not prioritize these factors as highly as Enterprise requirements, e.g. massive scalability, security, etc. And I am not saying that one or the other stack is incapable of solving a kind of problem, rather that it is a matter or priorities, focus, and fit.

So I do like Rails a lot, I think it is probably the best solution for many small-medium sized webapps. But it is not necessarily a replacement for Java, especially in the enterprise. The trick is for decision-makers to weight their needs for big E Enterprise requirements against speed and simplicity.

Tuesday, September 19, 2006

Productive Editing and Eclipse

I went to a great presentation by Neal Ford last week at the DJUG, entitled the Productive Programmer. Neal is a sharp guy, a good speaker, and a solid thinker on improving productivity. Go ahead and CRTL-Enter nealford in your address bar to check out his site (you'll see what I mean).

The talk was a bit of a wake-up for me. His premise is that the rise of the IDE has made programmers, well, lazy (my words, I don't think he went so far). I realized that I have let some old but valuable skills languish in the past few years. So Neal's talk has inspired me to sharpen the saw back up. For example, I have made the decision that Ruby will be my scripting power tool moving forward (used to be Perl), and I will not shy away from opportunities to explore automation (even if it is initially just exercise).

Another point that resonated with me was the idea of the "perfect" editor. I do think that I am now as productive over all in Eclipse as I used to be in Emacs (with a side trip through NetBeans). But Neal hit on two things that are missing: Multiple cut/paste buffers (kill-loop in Emacs) and editor scripting. Though I am intrigued by the lightweight JEdit, I am determined to stay in Eclipse and make the best of it. I think that surely these two deficiencies can be addressed.

On the multiple buffers front, I quickly came up with an answer that works for me: CLCL. This tool is actually a utility that caches your Windows clipboard. So CRTL-C still works like normal, but you can also reach back in time and paste something from 30 cuts ago. Sounds trivial, but it can change the way you edit.

As for the scripting integration, I haven't looked very far. Prashant Rane's blog led me to Eclipse Monkey, which looks interesting--it's Javascript, which I can defnitely code. I might keep looking, though, for something that provides editor hooks for Ruby, Groovy, or BeanShell. I'll post again if I find the silver bullet.