Advanced Ruby and the Rails Edge

I just got back from Reston, VA, where Chad Fowler and I gave the very first Advanced Ruby Studio. It was a blast. Both Chad and I came away exhausted; we went through a lot of material (from low-level interpreter data structures, through the true meaning of self, to design principles in dynamic languages). This first Studio sold out, but I believe there are still a few seats open for the one in Denver in November.
Between now and then, I'm really looking forward to meeting up with old friends (and making some new ones) at the next Rails Edge. I really liked RailsConf in Portland, but it was clearly a big conference. The Edge has a very different feel: it's far more intimate, so attendees and speakers all get to know each other through the three days. And, as a speaker, I find that invaluable, because that's where I learn what's really going on. If you haven't been to an Edge before, and you'd like to learn the latest in Rails from the world's experts (and me), I'd recommend checking it out.
(Oh, and if you are going, be sure to sign up for Jen's half-day Web Design for Rails Developers. Despite the fact that I'm a lost cause when it comes to design, I'll be there.)




Dave,
You are not a lost design cause. You have a good eye and, more importantly, good analytical skills.
Looking forward to August.
;o)
p.s. You just might find me in the Nov. Advanced Ruby class...
Posted by: Ms. Jen | July 26, 2007 at 12:49 AM
Wish I had been at the session! I might have asked why "Agile Web Development with Rails" does not include the term "Stored procedure" anywhere :) I am right now dealing with a fairly hairy legacy database (Sql server no less), and my neophyte ruby status isnt helping me solve some of the relationship issues. nested XREF's, etc. I am almost ready to give up on active record and try rbatis... with all the stored procedures and views in the database, i am having a hard time deciding what to create models for....
Posted by: Tim | August 07, 2007 at 07:01 AM
AWDwR doesn't mention it because DHH doesn't believe in them, and therefore Active Record doesn't really support them. There are database specific hacks, but they're ugly.
The book documents the framework. FWIW, this is something that I personally wish Rails supported.
Dave
Posted by: Dave Thomas | August 07, 2007 at 07:14 AM
What we've done with our legacy Oracle databases is just treat views like read-only tables, so they get an A/R class. For stored procedures we found some OCI-specific ways to call them, and put that code in particular methods in the A/R model class, so calling it from the rest of the app at least is pretty clean, and the db-specific code stays in the model where it belongs.
I'd suggest first figuring out how to call a SQL Server stored procedure in a plain ruby script using whatever database driver you'll use in Rails, so you're just working with that. Then bring the code into Rails, give it a connection from ActiveRecord (so it uses your rails app's existing connection) and you should have it.
Posted by: Wes Sheldahl | August 23, 2007 at 10:15 PM