dcsimg
Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


advertisement
 

Move Over Rails. Here Comes Merb. : Page 5

Merb is potentially much faster than Rails, and the combination of Merb and Ruby can provide the performance most web apps require. Find out how Merb can deliver a 2-4X speed increase over Rails and why that makes it better for certain applications.


advertisement

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


Which Apps Are Best for Merb?
Am I going to completely give up using Rails in favor of Merb? Absolutely not. I currently see Merb to be most suited for either small compute-intensive web applications or for creating web services from Ruby applications.

The techniques I discussed in this article (note that I did not cover using page and fragment caching, testing frameworks, and "slices") reflect my own use of Merb to create small, targeted web services and web applications. I believe that Merb is an especially good fit for writing web services; notice that when you create a new resource with merb-gen, the generated controller contains a commented out line that you can uncomment to enable rendering XML, YAML, and JSON:

class Feeds < Application # provides :xml, :yaml, :js



When you use a provides method call in your controller, you get an automated conversion of Ruby model objects to data formats, which are also useful for implementing web services.

I am still experimenting with Merb to understand which other kinds of projects are a good fit for it and which are best implemented in Rails. I encourage you to do that same.



Mark Watson is a Java consultant and the author of 14 books on Java, artificial intelligence, C++, and intelligent agents.
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date