Mvc

So I finally took the plunge. I started developing with Ruby on Rails.

Little did I know that learning Ruby on Rails consists of learning a host of other things that I should probably have learned by now, but for various reasons, haven’t.

MVC is complicated. Not complicated like difficult to grasp, complicated like “wait, where do I put this function?”. I read somewhere it should go in your controller. Then I read the skinny controllers, fat models post by JamisBuck. Oops. Time to “refactor” I guess. (is it refactoring if you’re only playing with the default scaffold?)

Ruby is amazing. Thank goodness DHH chose this when developing Basecamp. A language designed to behave as you expect it to? How could it get any better?

ActiveRecord is amazing. If I never see another SQL query in my life, I’ll be happy.

Rails is incredible. DHH is the man. I’ve never used a framework before, so maybe I’m giving him too much credit, but the amount of productivity you can get when you have Rails in place is just mind-blowing.

I’ve never installed a server locally before, and I’ve never done my development on a local machine. I know that sounds REALLY crazy, but I have always done my hacking in PHP on a shared box somewhere that I FTP'ed to. And with the Notepad++ FTP extension, it was super easy. But developing on your local machine is…easier. Except for the setup part – which was made worlds easier by EngineYard’s Rails Installer for Windows. (Yes, I’m developing in Windows. Yes Rails is much slower on Windows.)

I’m using Git wrong. I know that I am. And I’m so used to developing without version control that I don’t really git it yet. (That’s not a funny pun, but I couldn’t help myself). But it is nice to put little messages next to your saves I guess, even if they are just a string of obscenities.

Heroku is cool. But not as cool to me as to long-time Rails developers because it basically does what you’ve been able to do with PHP forever: upload it and have it work the right way. I know that for Rails with all the dependencies, etc, this is a big deal, but from a pure user experience perspective, it’s pretty much the same to me.

Migrating to PostgreSQL is a big pain. I did all my developing in SQLite3 (against the wishes of Heroku) and when I deployed to Heroku I had to fix one query in 3 different places. And of course I had to re “git push” every time. And I haven’t figured out how to make Heroku not re-install all my gems every time I do that.

All in all, even with the huge learning curve of what feels like 10 new systems and a totally different model of development and deployment, I’ve accomplished in a few days what would have taken me probably a week in PHP (which I’m very comfortable in). So yes, it was a good decision. It hurts right now, but I can already feel the productivity gains.