Category Archives: RubyOnRails

MVC Antipatterns : Models Antipatterns

Here are some excepts from Rails Antipattern book that I have reading lately. Even though the examples are specific to rails, the fundamental principles applies to pretty much any MVC framework. In this post, I list out various Model Antipatterns & their potential solutions. I would be writing about other anti-patterns in next posts …

Antipattern # 1 : Voyeuristic Models

  • Solution: Follow the Law of Demeter

  • Solution: Push All find() Calls into Finders on the Model

  • Solution: Keep Finders on Their Own Model

AntiPattern # 2 : Fat Models

  • Solution: Delegate Responsibility to New Classes

  • Solution: Make Use of Modules

  • Solution: Reduce the Size of Large Transaction Blocks

AntiPattern # 3 : Spaghetti SQL

  • Solution: Use Your Active Record Associations and Finders Effectively

  • Solution: Learn and Love the Scope Method

  • Solution: Use a Full-Text Search Engine

Complexity is the biggest enemy of successful projects

Curiosity killed the cat & complexity killed the project !!

2008-03-17-curiosity-killed-the-catThe importance of simplicity in application development is paramount. Complexity is the number-one killer of projects today, and it comes into an application in many ways, including through excitement over new features, overly clever developers, and unfamiliarity with the Ruby on Rails framework.

How to use Delicious to search for useful content

In this post, I would like to explain an extremely useful use-case of one of my favorite and highly popular tool Delicious. Let’s say I came across a useful URL that is relevant to the work that I am doing or stuff that I am interested in. For instance in this case, I came across rFacebook , a ruby gem for interacting with Facebook API.

Now, I want to search for more related links to Ruby, Rails and/or Facebook. Here is what I did:

1) Bookmarked this link on Delicious. As you can see in the image, the Addthis Addon already shows that it has been saved 391 times.

2) Select a few tags for instance rails & facebook in my case & click save. Once you have saved the link as well, it would go to delicious & increment the count by 1. Now it it showing 392 for me.

3) Click on the count to open all the saved items for this URL.

3) Now it shows all the users that have saved this URL & the tags they have used for this URL.

4) You can click on the tags to view other URLs that they have saved for these tags. Lastly, you can also add any of the users that you find useful to your network so that you can quickly browse their bookmarks quickly at any time.

I have found this to be a very useful technique to discover new, useful & relevant content. Hope you find it useful as well.

Free PHP 5 / Rails Hosting for Facebook app developers

Facebook developers get some more good news. If you are worried about having a reliable hosting space for your Facebook application, you can get it Free. Joyent is giving free PHP5 hosting along with MySQL, Rails 1.8.6 ,Python free for 1 year, if you are a Facebook application developer.

Free Accelator

Other companies offering free hosting for Facebook developers include Jumpline.com & Freeunmeteredhost.com.

Close Read more >>   Options >>  

Visit Answers.com

Ruby on Rails – ComputerWorld’s #1 Hot Technology for 2007

A ComputerWorld article has named RoR as one of the top 5 technologies you need to look in 2007. Only one in the software, rest are Hardware related.

It seems like every month a new technology emerges with the potential to change everything. Technology writers and analysts get hyperexcited. Everyone starts patting one another on the back and hugging. And two years later, we’re still talking about the promise of that technology, with little to show in the here and now.

That’s why as we began to look at core technologies that may have the greatest effect on the world of computing over the next 12 months, we paid special attention to how soon these advances will be available to everyday users, either at the enterprise or the personal level. The result is the following list of five emerging technologies with groundbreaking potential — this year as well as in the future.more