Justin du Coeur (jducoeur) wrote,
Justin du Coeur

Comics on Rails

Okay -- having finally spent a day doing some reasonably serious Rails programming, I begin to understand the attraction.

I decided a while ago that, if the comics were going to get sold, I needed a custom tool to inventory the mess. And as always, I took this as an excuse to learn a new environment -- this time around, Ruby on Rails.

I actually started the project lightly a couple of months ago, during our cruise. (You were surprised that I'm enough of a geek to be doing a bit of programming on my vacation?) Frankly, that first experience was a bit of a turn-off -- not because Rails was too hard to use, but because it hid too much. I did the tutorials, and they left me feeling like Rails has too much "magic": that it's easy to do the obvious stuff, but there's no clear path from there to the interesting bits. I couldn't figure out how to customize it the way I wanted, because the scaffolding machinery was so automated that I didn't really understand what I'd built.

Today, though, I sat down and made a serious attempt to understand what's really going on here, and pretty quickly unraveled the chain of operations. What I found is that there *is* a lot of magic, especially in the relationship of the object model to the database, but the web side (which is what I really want to modify) is pretty straightforward to customize.

By the end of the evening, I have a simplistic and unpretty but fully functional comic-book database system, customized to my needs -- not bad for what probably amounts to about four hours of concerted work. And now that I grok what's going on, I'm able to customize the behaviour of the pages quite quickly, so I should be able to easily tweak the workflow as I figure out exactly what I want.

Overall, I'm reasonably impressed. It does a nice job of allowing you to specify exactly what you mean, with extremely little redundancy and boilerplate code. At the conceptual level it's a lot like ASP.NET, but quite a bit more concise and focused. (I suspect that PHP is pretty similar in the conciseness, but I like having the full power of Ruby at my fingertips.) I don't think I'd use it for enterprise-grade software yet (mostly because Ruby's threading model is simply too immature for me to take seriously at this point), but for a small app like this it's a delightfully quick way to get up and running...
Tags: programming

  • Bagels

    On a lighter note: while I don't entirely want it to be "discovered", the good stuff should be publicized. While Boston isn't New York, we do…

  • Vote Loki

    No, really -- that's an actual 4-issue Marvel mini-series that wrapped up a couple of weeks ago, and I just got to the end of it. It more or less…

  • TRoOB: Wandering Star

    I always like to save the best for last -- piling a couple of pieces of pepperoni up on the last bite of pizza, and like that. And so I'll wrap up…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded