Archive for the 'Ruby on Rails' Category
Ruby on Rails: Building a Reverse Index for Search
Wow. I’ve never been so impressed with a framework. Take a look at this guide to create a reverse index for search in Ruby on Rails. Here’s the basic idea:
- Install a gem
- Install a plugin
- Specify the fields for each model that should be indexed
- Call the find_by_contents method
Insane! I used Lucene with Timedex, and I can’t even begin to explain how much more work that was.
So rad!
2 commentsRuby on Rails: Second Impression
My second impression of Ruby on Rails is again good. I’ve began to dig into it quite a bit with my developing world project. I admit that I’m still not an expert, but I do have a few things to note:
Pros
As everyone will tell you, Rails does a lot for you. The amount of code you have to write is extremely small, and the code that you typically write is more interesting relative to most web code. What I mean is that Rails code is minimized in areas such as form processing or database access, so most of your time is spent coding business logic and views.
Rails is insanely well supported. There is a plugin or gem to do almost anything you want, and the support is wonderful. Googling for Rails information always turns up good results, and the IDEs available, for example Aptana, are super powerful.
Cons
You’ll try to do everything the “Rails way.” Rails allows you to do things by hand, for example manually include a style sheet or manually write an AJAX widget. However, Rails also offers tools and techniques to make things such as including style sheets and writing AJAX widgets easier and faster. This is somewhat of a catch-22, though, because I find myself spending too much time learning the “Rail way.” I suppose this is the same with any framework - in order to use it to its full potential, there is usually a large learning curve.
Another con that I have not noticed first hand is performance. I just read an article about Ruby on Rails performance problems, which describes how Twitter is moving away from Ruby on Rails for performance reasons. While reading through that article I noticed a comment about a particular PHP rapid application framework called CakePHP. I’m going to look into Cake, because it might be a pretty cool alternative to Rails.
More Rails updates coming soon!
Update: Open has a good post about Ruby on Rails scalability enhancements. Another good read.
Update2: ReadWriteWeb has an awesome article on website scalability, in particular about Twitter scalability.
2 commentsRuby on Rails: First Impression
First impression of Ruby on Rails: awesome. It does so many things for you, and it makes things so easy. “Things” is a very vague term, so I plan to write a much more in-depth post when I know more.
I tried to use Aptana as a fully enclosed IDE, but I couldn’t get it to work correctly after trying to reinstall it at least 10 times. I followed a guide on how to install Ruby on Rails on Mac 10.4; I got everything working from the command line. Finally!
More Ruby on Rails updates to come.
6 comments