www.SmarteGuru.com
  Home | Blogs | Recipe | Find a Friend | Discussion Board | Resources | Developers Area | Articles | Health |  Login | Register Now 

Posts Tagged ‘ruby on rails tips’

Sexy URLs, or, Default Routes Considered Harmful

Thursday, September 25th, 2008

Generating anonymous routes is very freaking expensive because Rails has to try generating every possible route you have listed. Use either named routes or helper/model methods if you’ve got lots of links on a page and are worried about performance.

URLs are first sight of your app’s GUI — If every Rails developer said that to themselves, there wouldn’t be a deployed default routes.rb left on the Internet. A URL is not just an arbitrary string of characters which identifies a resource on the Internet. A URL does not merely identify, it also describes what comes behind it, both to end users and, critically, to search engine crawlers. Take a look at these two URL pairs:

* www.smarteguru.com/card/show/116
* www.smarteguru.com/category/show/16
(more…)

Home - About Us - Help - Terms and Conditions - Site Map - Link to Us - Resources - Contact Us
Google Rank Calculator | Suggest developer resource | Suggest Article
All rights reserved © 2007 SmarteGuru.com.