Welcome to WebProNews Breaking eBusiness and Search News
Advertise | Newsletter | Sitemap | News Feeds News Feed 
 WebProNews Search Part of the iEntry network iEntry inc. 

Nineteen Rails Secrets To Web Development

David A. Utter
Staff Writer
Published: 2006-07-10

WebProNews RSS Feed


Ruby on Rails has increased in popularity among web developers seeking a solid framework for their applications, and some helpful hints can make it even better.

A number of resources for the Ruby on Rails framework have arrived online since its debut. The Ruby Inside blog, maintained by English web developer Peter Cooper since May 29th of this year, offers some nice insights into Rails and the underlying Ruby object-oriented language.

His latest post comes in a format most people always enjoy finding online - the list. Cooper's list of "19 Rails Tricks Most Rails Coders Don't Know" suits that very well.

One Cooper noted, the acts_as_nested_set, made its quiet debut in Rails:

It's much like acts_as_tree, but with the added benefit that you can select all of the children (and their own descendants) of a node with a single query. A list of the instance methods is available.

A couple of conversion tricks, like using the array method to_sentence, or the number helpers, have their place. An array of related terms like names can be rendered as a sentence. For numbers, helpers offer nifty shortcuts like formatting a number in currency format, or setting delimiters for them.

One useful speed trick can be accomplished for an application that has unchanging data from restart to restart, Cooper wrote:

If you have data that doesn't change between application restarts, cache it in a constant somewhere. For example, you might have a YAML or XML file in /config that stores application configuration data, and you could load it into a constant in environment.rb, making lookups quick and easy application-wide.

Cooper also touched on a small framework, BackgrounDRb, that will be recognizable for its utility. This daemon allows the Rails application to send it tasks, and the daemon will complete them in the background.

"It's extremely powerful, and useful for many tasks such as sending hundreds of e-mails, fetching URLs, and other things you don't want to slow down the request times for your main app," said Cooper.

Be sure to check out the rest of Cooper's list for more excellent insights into working with Rails more effectively.

---
Tag:

Add to Del.icio.us | Digg | Yahoo! My Web | Furl

Bookmark WebProNews:



Receive Our Daily Email of Breaking eBusiness News


About the Author:
David Utter is a staff writer for WebProNews covering technology and business.

WebProNews RSS Feed

More Top News Articles

Contact WebProNews
Advertisement





TOP NEWS

Targeted Information for Business
WebProNews is part of the iEntry network

Internet Business: Marketing: Small Business:
WebProNews MarketingNewz SmallBusinessNewz
WebProWorld AdvertisingDay PromoteNews
EcommNewz SalesNewz EntrepreneurNewz

Software: Search Engines: Web Design:
WebMasterFree Jayde B2B DesignNewz
NetworkingFiles SearchZA FlashNewz
SecurityConfig SearchNewz WebSiteNotes

Developer: IT Management: Security:
DevWebPro ITManagement SecurityProNews
DevNewz SysAdminNews SecurityConfig
TheDevWeb NetworkingFiles NetworkNewz

The iEntry Network consists of over 100 web publications reaching millions of Internet Professionals. Contact us to advertise.
eBUSINESS RESOURCES






 Advertise | Contact Us | Corporate | Newsletter | Sitemap | Submit an Article | News Feeds
 WebProNews is an iEntry, Inc. ® publication - $line) { echo $line ; } ?> All Rights Reserved
About WebProNews
WebProNews is the number one source for eBusiness News. Over 5 million eBusiness professionals read WebProNews and other iEntry business and tech publications.

WebProNews provides real-time coverage of internet business.

Free Email Newsletters:
WebProNews SearchNewz
WebProWorld DevWebPro
Marketing SecurityNews
Plus over 100 other newsletters!

Send me relevant info on products and services.


WebProWorld
Ten most recent posts.

NetworkingFiles
Featured Software

WebProNews in the News
View all recent mentions of WebProNews from around the world!

Recent Articles On ...
Google eBusiness
Yahoo Ask Jeeves
MSN Blogs
Search Engines Blogging
Affiliate Programs Marketing
eCommerce Advertising
eBay Sun Microsystems
AOL Adsense
Microsoft Adwords
Oracle IBM
Amazon Apple
SEM Mac
SEO iPod
Adsense XBox
PR Adobe



iEntry.com WebProWorld RSS Feed WebProWorld Contact WebProNews Print Version Email a friend Bookmark us