I’ve found that Rails is really easy to create CRUD. Create/retrieve/update/delete databases is really easy. You set up the database, run a ruby command at the command line, and you get the basic web forms you need to create, list, update, and delete records in a database. Then, you dress up the html with CSS and you’re on your way.
Rails is a great way to easily create database applications on the web.
Until you need a relational database.
Figuring it out relational databases are hard, primarily because you have to: 1) name the relationships correctly, and 2) tell ruby about the relationships. I haven’t figured all this out yet and I have felt really frustrated seeing as single tables are easy.
I thought it was me, but then I found Rails Ridiculous Restrictions, Rant, which outlines the problem with Rails nicely. Basically, the ranter’s argument is that Rails should be smart enough to figure out the relationships without having the programmer tell it what those relationships are. And I agree.
This is really scary stuff…. I just started learning ruby-on-rails so I hope the problems aren’t as big as the author of the article claims..
Comment by Maarten — November 3, 2006 @ 8:13 pm
I liked your blog a lot.
Is it abandoned?
Comment by Thiago Hickmann — December 10, 2006 @ 4:43 am
You and your blog make me sick. You are trying to jump on the rails bandwagon because you assumed that since you walked yourself through ‘teach yourself C in 21 days” a decade ago that you are a programmer. You are competent enough to install wordpress (with default template and options) on a web host (ie unzip a file). Now you are waiting for the hits to roll in. I am sure it is in your plans to put google ads on here but you probably couldn’t figure it out. A relational database is the key backbone to a real website. If you think it is too complex, you should stick to what you are good at – talking out your ass. Hire a real programmer and please take this site down as it is a waste of bandwidth and a dead end for ruby programmers.
Comment by Simon — December 11, 2006 @ 8:21 pm
Maarten: The issues aren’t with Ruby, I found the issues had to do with books on Rails.
Thiago: I’m not posting often because I’m not putting that much effort into rails. You can see what else I’ve been up to in the mean time at http://friendstalking.joelandkaren.com and http://blog.ideacity.com. I may post more in the future.
Simon. Wow. I don’t know where to begin. I guess making a living as a programmer for 10 years doesn’t qualify me in your eyes as a “real” programmer. I guess you missed the Google ads that were there already, meaning you really aren’t reading this website.
As for a relational database being the key backbone to a real website…not necessarily. Have you heard Tim O’Reilly’s address to the 2006 MySQL conference (http://osc.gigavox.com/shows/detail1641.html), where he points out that flat file databases can work just fine. One example is http://www.bloglines.com.
Actually, I’m looking forward to more of your posts because I’d mildly interested in seeing what caused such a tirade.
Comment by joelg — December 11, 2006 @ 8:38 pm
Hey there, I’m totally with you on this one. I’m a graphic designer by training, and web designer by trade, and becoming more of a web developer as the projects we’re handling at work are beginning to require more database back-end.
I’m an PHP/MySQL guy myself, so I’m trying to get my head around the database relational model that Rails uses. I mean, hell, I’m tempted just to barge in and write the straight SQL I need to link my two tables up at the moment since the “Belongs to, has many, etc..” relationship system is baffling me.
I hope you get this one straightened out, and I’m glad I’m not the only guy that’s finding this harder than it should be. And hell, I’m using the Agile Rails guide too!
Comment by Paul Sweeney — January 29, 2007 @ 12:35 am
Hey Paul – I found a good explanation of the “has many” and “belongs to” relationships can be found in Black’s ” Ruby for Rails”, specifically, Section 2.3.2 on pg. 43. The subsection titled “Diagraming the domain” really made it click for me. It’s only two pages long, so you may want to check it out the next time you’re in the book store.
I don’t think the conceptual problem is with Rails, I think it’s been with the books to date that I’ve read that try to explain Rails. Much of the books have assumed their audience are professional programmers moving to a new language; I can see that they would be fine with much of the literature. That was me ten years ago, but now I find I need more conceptual hand holding, not necessarily step by step tutorials.
Comment by joelg — January 29, 2007 @ 5:20 am
I earn my money in .NET & SQL Server (I have a strong grasp of relational databases) and a few months ago I decided to learn Ruby. I read the magnificent ‘Agile Web Development with Rails’ once, cover to cover, and I found that explained Everything.
The relationships stuff is great. I really miss it when I’m using other languages. It makes life so easy, and the syntax really isn’t that hard to grasp. In fact, stick this link in your bookmarks bar [http://blog.nanorails.com/pages/rails_1.1_cheat_sheet], and you’ll have all of the answers one click away.
My biggest issue with Rails is getting used to the somewhat amateur-feeling MySQL tools.
Stick at it. Rails is great. I’ve re-written my entire website with Rails (in record time!) and I’m about to start a second bespoke customer project.
Comment by Adrian — January 29, 2007 @ 8:52 pm