A framework for developing Web applications, Ruby on Rails uses the object-oriented Ruby language and a model-view-controller pattern, which keeps the various chunks of functionality in the application separate while allowing them to work together as an integrated whole. Many developers find this a more congenial way to build Web applications than PHP, which lumps all the functionality together in a single file. An additional attraction of Rails is its integrated AJAX support.
RadRails, a free open source project, is an IDE for Ruby on Rails framework. The project’s goal is “to provide Rails developers with everything they need to develop, manage, test and deploy their applications,” according to the RadRails Web site.
Released late in July 2006, RadRails 0.7 goes a long way toward achieving those project goals. Rails applications include a plethora of folders and files: a freshly generated, empty Rails project has 12 subdirectories. Controllers written in Ruby pair with views written in RHTML (HTML with embedded Ruby server code). And a single key combination in RadRails makes flipping from controller to view and back nearly effortless.
Conventional Rails coding forces the developer to switch from the editor to a console to a Web browser, and from editing one file to editing another file. RadRails effectively moves most of this activity into one convenient tabbed IDE.
Of course, RadRails is hardly the only way to develop Rails apps. Some of its competition is commercial: TextMate on Mac OS X is an editor that supports 50 programming languages and ships with Ruby on Rails highlighting and macros; it’s popular among Mac Rails developers.
Another commercial competitor, Komodo, is an IDE for dynamic languages that runs on Linux, Mac OS X, Solaris, and Windows. Komodo is one of the few IDEs that can debug a Ruby on Rails application, but I’ve found its debugging to be so slow that I rarely use it. SlickEdit is a capable and responsive multi-platform, multi-language code editor that includes good Ruby support.
RadRails has its share of free competition, too. Ruby ships with SciTE, a free editor that supports many programming languages, and FreeRIDE, a free cross-platform Ruby IDE written in Ruby. FreeRIDE will eventually have refactoring functionality. And of course, just about every development platform has free versions of vi and emacs.
Getting on track
RadRails is an Eclipse RCP plug-in. The standalone version, which includes the parts it needs of Eclipse, is a 45MB download. The Eclipse 3.2 SDK is a 120MB download, so you’re better off downloading the standalone RadRails unless you need the other perspectives in the Eclipse SDK. I tested the standalone Windows version of RadRails 0.7 on Windows XP SP2 with Java 1.5, Ruby 1.8.4, and Rails 1.1.4.
The principal purpose of RadRails is to integrate Rails development, and at that it succeeds. Within RadRails in the Rails perspective, one can generate a new Rails application and Web server; configure its databases; generate controllers and models; edit models, controllers, and views; and browse the application site.
The Rails Navigator and the wrappers for the many Rails generators and Rake facilities help to manage the project effectively. (Rake is a Ruby-based make-like utility.) The RadRails editors can do syntax highlighting and some primitive code generation; for more substantial code generation, you’ll want to run Rails generators.
In the Data perspective, one can view the project databases and execute SQL queries. RadRails lacks a SQL query builder; you can either write your own SQL scripts or use another query builder tool.
Monitoring the Rails log files is the recommended way to debug Rails applications. RadRails can run the tail utility on specified log files and route the output into console windows that it manages. RadRails cannot, however, set break points in Ruby code for debugging.
Ruby on Rails supports unit, functional, and integration testing, all automated using Rake scripts. RadRails can use those tests directly or drive them from its own testing interface, which constructs a nice results display tree. RadRails 0.7 introduces a new AutoTest facility, which can automatically run the tests associated with a file every time it is saved. My only issue with the RadRails test facility is that it feels slow to launch on my 3.2GHz Pentium 4 workstation with 1GB of RAM, perhaps because it uses the Ruby remote test runner instead of the Rake test harness.
One of the mantras of test-first development is “red, green, refactor.” RadRails supports the red (write a test that fails) and green (write code to make the test pass) steps quite well, but forces the developer to refactor manually. Fortunately, the structure of Rails applications usually helps to keep the code well factored.
RadRails, as do Komodo and SlickEdit, has its own regular-expression test bed. Unlike Komodo and SlickEdit, it cannot word wrap its display. For example, I had to scroll far to the right to read the end of the second comment (as highlighted in the image at left) and ask the programmer of this controller, a TextMate user, to avoid long comments in the future.
RadRails integrates with CVS and Subversion version control systems. It does not integrate with Perforce, or with version control systems that use the Windows SCC interface convention.
Room for growth
The most glaring weakness of RadRails 0.7 is the sparse documentation, which is scheduled for completion for the 1.0 release. Two short demo videos found at RadRails’ site may help developers get started, but you’re largely on your own after that. I’d also love to see RadRails improve, in order of degree of difficulty, word wrap, automatic code formatting, source code control integration, debugging, and refactoring.
Overall, RadRails 0.7 is well on its chosen path “to provide Rails developers with everything they need to develop, manage, test and deploy their applications.” Given that it’s free for the downloading, all serious Rails developers should consider it for their toolkits.
Ease of use (20.0%)
Overall Score (100%)
Having trouble installing and setting up Win10? You aren’t alone. Here are many of the most common...
Win7 Update scans got you fuming? Here’s how to make the most of Microsoft’s 'magic' speed-up patch
Picking an Android phone can be difficult, but we're here to help. These are the top Android phones you...
SaltStack Enterprise 5.0 draws on high-speed messaging for superior scalability and control, but the...
With a scattershot set of improvements, the new Android version is a fairly minor affair, but there’s...
Miss Yahoo Pipes? Microsoft's low-code tool for application mashups does a better job in meeting...
The programming community's survey also finds that many developers are newcomers to the field