The Ruby on Rails framework is now two years old!
“We’re past the point of infatuation, this is love, and love is inclusive. Happy birthday Rails, happy birthday Railers.”
—David Heinemeier Hansson
Read David’s blog entry about it.
3 comments Latest by Robby Russell Sun, 16 Apr 2006 20:53:06 GMT
Well… Canada on Rails is over. There was an afterparty… and pictures will be uploaded in the next day. I had the priviledge of meeting many….many… many… talented… bright… and high maintenance people over the past few days. I went out of my way to go and introduce myself to several people and when you’re a speaker it seems to make that process even easier for others to ask you how you use Rails to solve certain types of problems. As Legacy systems, databases are problems that many people are encountering… it was comforting that people at the conference were highly interested in learning more.
The afterparty was alright… it got really exciting when a few of us decided to venture to a pub away from the club where the party was. Within 30 minutes… everybody followed. I got stuck sitting next to DHH and we got to discuss many topics with each other… such as legacy systems and how AR can be bent a little in one direction… but it’s not going to be the perfect solution for older problems. I have some work cut out for me. :-)
While I had him there… I was able to discuss prototyping with him. For example, does 37signals use prototypes that get thrown away? I’m not convinced that he’d agree with me... :but from how he described their process, which I can only assume is far from perfect and is evolving just as much as any of our processes… that they are onto something. It was entertaining and highly educational.
I have much more blogging to do…. and it’s true… Thomas Fuchs is really a direct descendent of Bon Jovi… and David Goodlad is really a Good Lad from Canada.
16 comments Latest by Kris Khaira Wed, 19 Apr 2006 05:52:53 GMT
Here I am at the very first Ruby on Rails-related conference. My first passport stamp!
We’re half-way through the first day and as luck would have it, I’m starting to feel ill. Am taking a short break from the conference to catch up on some rest after opting to hang out with some great people last night. About twenty of us went out last night, which ten were speakers. There are a few photos up on Flickr.
This morning started with DHH giving a 90-minute keynote about the what Rails Core will be focusing on. It went well and I’m excited to hear that they’re going to break out some pieces into plugins. Goodbye, Pagination and Web Services!
David also had some kind words for people who don’t get and/or appreciate the Rails way of doing things…
Joe O’Brien followed him with a talk about Service-Oriented Architecture with Rails.
I’m going to catch up on some rest, work on my few slides and head back to the conference shortly. :-)
Check out the lastest pics on flickr from Canada on Rails.
1 comment Latest by dgibbons Fri, 31 Mar 2006 05:07:23 GMT
If you know me at all by now… you might know that I am a huge fan of PostgreSQL. Coming to the Rails camp was a bit of an eye-opener./ Working with PostgreSQL used to save me quite a bit of work and let me sleep at night. I have dealt with the problems that many developers face while working with MySQL. Like many of us in the Open Source world, I was exposed to MySQL more often than PostgreSQL. For several years, I convinced myself that MySQL was awesome because it was fast… but speed isn’t always the most important factor in the technology world. Otherwise, we’d all be coding in C. What PostgreSQL provided to me as a developer was better relational integrity. Foo cannot exist unless Bar does, or vice versa.
ON DELETE CASCADE was a godsend and saved me quite a bit of work when building an application. Triggers… Procedural Languages… oh so beautiful.
PostgreSQL was (and is) the Open Source database server that both the Enterprise DBA and Developer could agree on.
Enter Ruby on Rails
At first, I just ignored my instincts and jumped in head first. Pluralization? Primary keys named
id? Blasphemy! Yet, I moved forward. After a few days of consistently reminding myself of these new-fangled conventions (I even printed out a little cheat sheet and taped it to my monitor)... I was hooked. Rails worked with PostgreSQL. Let me say that again.
RAILS WORKS WITH POSTGRESQL!
- Table names are not forced
- Primary Key field names are not forced
- Foriegn Key field names are not forced
- Legacy databases can work with Rails
- Active Record (like much of Rails) can be customized for your particular application’s needs
I was, and still am, concerned about trusting Active Record with handling my relational data… because in some cases it wasn’t doing what it should. But, that is being worked on… and because Rails is Open Source, the issue is transparent for us developers to see and help fix.
In the past, you might have found me advocating the addition of business logic in your database server, whenever possible. It is the gate keeper. The key master. It is not meant to be flexible with your data. If business rules are to change, you change them there so that if you have one or more INPUT streams into your database, the data will not get into your server unless your business rules are met. PostgreSQL even provides you with a nice ERROR message, which some other servers do not. If you can control everything through one INPUT stream (Application Database), then putting these constraints solely in your database abstraction layer is a-ok. However, if you are interfacing with your server through a variety of avenues (Integration Database), you probably already know that your system is going to be a pain to maintain in the long run. So, what are you to do?
Handling Legacy systems is going to be a headache, regardless of what you do… but you can’t always rebuild the whole thing and migrate your data. Add that to your Someday-Maybe list.
When you’re adding new pieces to your application, start by using good tools, frameworks, and practices. For example, try your best to follow the Application Database path to pragmatic enlightenment. Begin working on a new layer for your legacy database. Add on web services that use this layer. Refactor your existing applications. Can they use these new services? ReThink everything. That is… if you have the time and resources to do so.
If you are questioning whether or not to put your business logic in your database abstraction layer, stop. Just do it™. But, do it with caution. Test it. Test it well. I’ll admit that I still add some constraints into my database schemas-
I am not ready to give up that extra layer of data security. But, that’s just me. :)
PostgreSQL works with Rails!
...and I promise to show you how to do some fun legacy stuff with Rails in my book. :-)
You can read it here.
While reading it, I recalled a brief conversation that I had the other day, when someone said that they didn’t like Rails because, “it assumes things” which translated to the fact that they didn’t like that it had a uniform directory structure, pre-defined naming conventions, etc.
After spending this whole year, teaching myself Rails, reading the documentation pages… (probably at the API site a few hours a day), this concerned me. A lot of people are quickly turned off by the fact that Rails has opinions. But, let’s think about this for a moment. Rails has opinions built-in that help speed up the development process when you accept those opinions. If you don’t, you don’t have to pspend any more time than you did prior to using Rails. So, their argument is, “why bother with Rails?”
At first, the answer isn’t so obvious…. but if you consider all the opinions that Rails expresses, do you honestly feel that every one of them is wrong? If so, Rails is probably not for you. If you find a good portion of them to be quality opinions, then… Rails just might be your cup of tea afterall.
Pluralization make you feel weird? Turn it off. (one line of code will do this for your whole application.
Wait, you want to use
category_id as your primary key?
class Category < ActiveRecord::Base set_primary_key "category_id" end
Yes, I know… it’s tough. ;-)
Another thing that I am wondering now… what is the conductor?
My guess? Some added bonus for Rails that allows you to run a Rails application off of one or many servers… now that would be nice. That’s my guess though… what is yours?