small medium large xlarge

16 Feb 2010, 16:52
Paul Waterhouse (2 posts)

Hi All,

I have been reading “Agile Web Dev with Rails” for a couple of weeks now and I have worked through most of the Depot tutorial. I am enjoying learning something new and having never before worked with a framework I love the whole RoR philosophy but at this point in my learning I feel that i need to ask a question that Google doesn’t seem to have an answer for: Am I using the right tool for the job?

Let me explain a little about my situation. I am not a full-time developer, nor do I develop web apps for a living and I am not a ‘natural’ programmer so it generally takes me a while to get a new site out of the door. I develop apps for my own projects, some commercial and some personal. Right now I am developing a site that that advertises vacation rental properties. I have about 12,000 properties to list and they have around 40 possible criteria for searching and filtering so that the user may find the right properties for their needs.

I have been developing in Cold Fusion off-and-on for over 10 years and I know it reasonably well. My main reasons for trying out Rails for this project is as much for a change of scenery (and to broaden my horizons a little) as for any real practical reason. Having looked at many examples of Rails sites and following a few tutorials I am starting to get the feeling that the kind of site I am looking to develop isn’t the kind of site that Rails was designed for.

For example, my listings page will need to offer the ability to filter the properties by almost any combination of those 40-or-so criteria (price, bedrooms, bathrooms, double beds, single beds, cots, pets allowed, smoking allowed, near the sea, private pool, location, TV, broadband etc. etc……) and at that point the queries start to get interesting especially as there are also 5 other tables linked to my properties table (property images, descriptions, locations, user fields and reviews).

In Cold Fusion I always built everything from scratch and got into some reasonably complex SQL. So having come this far with Rails I am just asking the question, should I be looking in another direction or is Rails an ideal platform for what I am looking to do here? I have no problem with doing the learning but I don’t want to spend any more time travelling down the Rails route if it isn’t going to take me where I need to go.

Thanks in advance for any advice, Paul.

16 Feb 2010, 22:12
Sam Ruby (633 posts)

If you are just learning Rails, and your primary pain point is 40-or-so criteria, then perhaps Rails 3.0 might be a good thing to look at:

The idea is that queries in Rails 3.0 are fully chainable. You can start with a simple query, and progressively add more and more constraints (such as “where” clauses). When you are done, you can finally execute the query that you produced.

17 Feb 2010, 09:13
Paul Waterhouse (2 posts)

That sounds interesting, I’ll take a look at that. Thanks Sam.

You must be logged in to comment