REST

Started designing my app last night. I had most of it in mind, so I just started hammering it out. I know, not the best way to do it, but sometimes you just have to get into the code.

A few days ago, I wanted to get more in sync with Rails and REST before, so I did some reading online. Something I enjoyed was this article (and the subequent parts) from SoftiesOnRails.com.

With REST fresh in mind, design goes really smoothly. There's only one place (yet) in my app where I'm feeling like I can't use one of the seven basic actions provided by a RESTful conroller.

It has to do with a "wizard" model where when a user is creating a new Widget we break it up into a few steps. So, I'm using the create action for the first page of the wizard, and then I guess I need to do some sort of update for the subequent pages. I'm not sure...haven't really researched it yet, but there must be a right way to do this.

RadRails and Scaffold-Migration Best Practice

So, started tinkering again with Ruby on Rails tonight. It's been about a year since I last worked with RoR, so I wanted to familiarize myself with it again.

Fired up RadRails. Let me say that this has undergone vast improvement since I used it a year ago, and I would feel totally comfortable recommending it to anyone. I have been able to manage the entire development process from within the IDE: create and empty application, generate models, views, controllers, and migrations; instantiate, start and stopp servers; rake tasks, database management...so far, I can do everything through the IDE. I'm very impressed.

Then, I spent an hour or so screwing around with a little test app to re-familiarize myself with how the whole thing worked. An issue here and there, but generally speaking it all worked out well.

I'm still trying to get my head around the whole script/generate scaffold thing in relation to migrations. You have to setup the DB table before you can run script/generate scaffold. But, you have to run script/generate model to setup the migration and then run rake db:migrate. This seems feels like I'm doing something wrong because I thought script/generate scaffold is supposed to setup the model too. That's how it was a year ago, in pre-migration days. I have to figure out the best practice now...suggestions are welcome in the comments.

Aptana RadRails IDE and InstantRails

So, I'm doing this new startup thing--can't tell you just yet what the thing is--from the very scratch and Mark asked me keep a blog about it. Here goes...

Yesterday was spent setting up my development environment. In short, this is composed of two things:
  • InstantRails
  • Aptana IDE with RadRails Plug-In
And the key is figuring out how to get the them to play nicely together. So far, I ran into only two glitches:
  1. Installed InstantRails, then installed Aptana IDE, then installed RadRails Plug-In. But, the plug-in wasn't working which I could tell because it's configuration options weren't appearing in the preferences. From reading this post I learned that it turns out I needed to upgrade my Java JDK to 1.5+. Yay. Also, turns out you can't just easily upgrade from within the JDK 1.4 (what I had) Control Panel tool to the latest version. You have to uninstall, find the new package, install, blah...yay.

  2. Got the RR Plug-In working, started reading the RR help documentation and it says there's some configurations that I need to setup. Even though the RR configs are appearing in the Aptana IDE prefs, the specific configs they mention are not to be found in the location where the screenshot in the docs say to look for them. Ug. Maybe the install didn't work...so, uninstall, re-install...everything. No luck. Some posts I read say don't install one sub-package of the RR plug-in (the Ruby Development Tools, RDT)...okay, uninstall, re-install without package...no luck.

    Turns out, this was a bug in the documentation. The configurations had been moved to a new area of the preferences, but the documentation hadn't been updated. Oy!

  3. Finally, This article on the InstantRails wiki describes how to configure RadRails so that they play nicely together. I set the configs and was all set. Hooray!


Note on the title: Progress vs. Perfection...what's it mean?
Some could interpret it as a form of saying quantity is preferable to quality, but that's not what it means to me. In my view, it's about staying focused on the goal while demonstrating respect for the Law of Diminishing Returns.