<Switch> Advanced Learning Ruby on Rails

Original Address -> http://blog.xdite.net/?p=1227

From Blog.XDite.net of: xdite

On a reference to a number of entry will be the basis for training. And now to continue to write the Advanced chapter. Divided into two directions: arbitrary integration / Scale and Deploy

* The integration of arbitrary

1. To know more Plugin / Gem, an opportunity to reduce re-creating the wheel
Gem / Plugin scalability has always been the role of the Rails development has greatly accelerated the bonus effect.
- Github or RubyForge
- RailsEnvy week introduced new / brightest / utility / whatever the gem / plugin and the new knowledge

2. Can be transferred to other projects easy to use code, re-written as plugin or porting into a Rails Engine . Write your own Template .
Plugin Patterns (Peepcode) would like to learn to write Rails plugin see the PDF.
Rails Engine # to the previous app as a plugin to use
Rails Template # Every time the project will install the package and the implementation of the action written in Template

3. To develop their own View Helper and Form builder.
Rails not only provide nice helper, or you can write your own Rails API provided by the Helper and the Builder. For their project was put on standard layout and reduce the chance of nausea html.

Recommended Reading ihower released in the last Ruby Tuesday Building Web Interface on Rails , as well as playing ihower provided in github demo application. Rails3 this demo provided with the concept of Unobtrusive Javascript implementation, use jQuery on Rails as an example.

4. For the familiar third-party integration solutions

Rails is a web framework, but it is not Aladdin's lamp. For example, you need to search, payment functions, send SMS, and IM integration .... Rails of course .... * Not * built-in. Although relatively few books are described in the information, but there are several Site out good Video Turtorial (paid / not paid all ..).

AsciiCasts # Railscasts teaching graphic version ...

Railskits # of course you have the ability to develop, the ability to change, but no time to develop from scratch, you can also buy from here ... go back and change Solution

5. Deep in Ruby / Rails
Advanced Rails (O'Reilly) Advanced to the really rare books
Writing Efficient Ruby Code (Addison Wesley shortcut PDF)
Code Review (Peepcode)

* Scale and Deploy

When the station big (code change much, query variables, activities change over) will encounter after the structure of complex / slow problems. There are several directions that can be examined in

1. Replace Ruby.
well ... Ruby there are many versions, maybe you can try to put Ruby Enterprise to save memory and improve the GC.

2. Try different Web Server / Rails Web server, identify the most suitable match.
Mongrel / Thin / mod_rails / FastCGI + Apache / Nginx / lighthttpd can try a combination of both.

3. Using Rails Metal or dismantled structure
Rails framework is not universal, nor necessary, re-use the Rails framework that fertilizer alone to do simple things (such as the API's provided). Can use other languages or other frameworks ( Sinatra ) is the method you can try ....
Sinatra with ActiveRecord integration method, I wrote a demo on github on.

4. View Code SQL Query and efficiency.
You can use NewRelic RPM, monitor the entire site. The bad to find the next query, or write bad grammar to improve ORM.

ActiveRecord and advanced on the basis of available information RailsEnvy out Advanced ActiveRecord and Pragprog out Everyday ActiveRecord . Less join, more than a few select to achieve the same effect, if necessary, their handwriting query ...

Code efficiency can refer to "Deep in Ruby / Rails" book list ...

5. Scaling Rails
Read according tune, can cache of the cache ..

6. Monitor
Hoptoad # 500 automatically send a letter / order log
God # monitor who is dead, eat too much memory, automatic re-opened ....

7. Deploy
Many complex structure of the machine, update code re-open trouble. To write a Capistrano Recipes to help you right .... Also can be used with Chef .

8. EC2onrails
Lazy structure, the premise is familiar with EC2 with Capistrano ...

9. Clouds: Heroku / GAME
Interested can refer to this last month I wrote an article of Sinatra on the Cloud .

Scale and structure of the design of other things that they all belong to General Scaling Knowledge, not in this post about Rails article details go ....

* Summary

Is ultimately a matter of fact that a number of important feed fixed set of view, there are new things to write on the training and experience ... this will progress very quickly. Reading, of course not only to see than a direct API and blog post to learn fast ...
Description is worth several sources set:

Ruby on Rails Official Blog
Dr. Nic
Yahuda Katz
Rick Olson

Every time the Rails community organizing Conf, such as RailsConf 2009 or Acts as Conference 2009 , in fact are quite many slides and video can be seen, after reading a lot of knowledge ... president.

railsconf 2009's video and slides
act_as_conf 2009's video

Wish to provide this information allows everyone to learn and practice with directions ....

分类:Ruby 时间:2010-06-07 人气:286
blog comments powered by Disqus


  • Ruby on Rails Small Web site Performance Optimization step 2010-05-13

    Geek Express is my way by agile developers out a few days out of a RoR site, on-line a month, although the middle and gradually have to add some small features and improvements, but the speed and performance has been not too much to consider, so far

  • Ruby on Rails and to use Action Web Service to create Web Services 2009-05-25

    Action Web Service Module will be at Ruby on Rails implementation of Web services. Action Web Service will be the creation of SOAP and XML-RPC Web Services in support of server-side protocol. You can use the Declaration and the Action Web Service rel

  • Web开发人员的利器:Ruby on Rails 2014-03-09

    工具发展简史 人类的发展就是工具的发展.从石器到木棒和矛,再到火器,我们学会了如何更有效地捕猎.从观看星像到指南针,再到海洋精密计时仪(marine chronometers)和全球定位系统(GPS),我们发现了如何更好地进行导航.从书信到电报,再到电话和互联网,我们将人类通讯的方式进行了革命.人类能够进行创新.我们能够发现解决问题的更有效的方法.我们能够创造更好的工具--这些工具对于我们所要解决的问题来说,显得更具有针对性和专门化,因而更为高效. 程序员也一样.优秀的程序员总是在寻找解决问题的

  • Introduced the Ruby On Rails 2009-11-10

    === To http://kiwi.csie.chu.edu.tw/blog/archives/133 This article from the PHP and Web programmers point of view, and gradually bring out the Ruby on Rails and Web Application Framework of the advantages of the concept structure. Next Introduction to

  • Learning Ruby On Rails resources 2011-01-04

    A: site and its blog: 1 .. http://ihower.tw/training/ Ruby on Rails Learning Network is an exchange of learning Ruby on Rails knowledge, professional website. 2.http: / / www.javaeye.com / wiki / rails_weekly Monday Question Rails 3. http://www.5iror

  • Twitter没有计划放弃ruby on rails,而且早就用了erlang改进性能 2014-02-06

    Twitter 是用 RoR 开发的流量最大的站点. 应用了 Rinda,其基于 DRb使用DRb ("Distributed Ruby".), 该库可以通过 TCP/IP 从远程 Ruby 对象发送接收消息, ,还用到了erlang技术中著名的 ejabberd. 有消息称:Twitter计划放弃ruby on rails 5月9日,其官方网站上登信息辟谣, Twitter没有计划放弃ruby on rails,早就开始使用了混合语言改进性能. 为什么这个谣言传得这么快,这么像真的?

  • 利用RJB在Ruby on Rails中使用Java代码的教程 2014-02-14

    这篇文章主要介绍了利用RJB在Ruby on Rails中使用Java代码的教程,本文来自于IBM官方网站技术文档,需要的朋友可以参考下 开始之前 关于本教程 Ruby on Rails (Rails) 是用 Ruby 编写的一个 full-stack Web 应用程序框架,而 Ruby 是一种功能丰富的.免费的.可扩展的.可移植的.面向对象的脚本编制语言.Rails 在 Web 应用程序开发人员之间非常流行.通过它,可以快速有效地开发 Web 应用程序,并将其部署到任何 Web 容器中,例如

  • 使用 RadRails 和 Eclipse 可以轻松进行 Ruby on Rails 开发 2011-03-02

    Ruby on Rails 的地位如日中天.随着它的流行,开发人员越来越迫切地需要一个集成开发环境(IDE)来使 Rails 更容易使用.RadRails 是基于 Eclipse 的环境,能够满足大多数开发人员的要求. 本文介绍了 RadRails IDE,并假定您已经知道用 Ruby on Rails 开发 Web 应用程序的方法,因此,本文将不会花时间说明 Ruby or Rails 代码,而将主要说明 IDE 本身. 下载和安装 RadRails 您想要赶时髦使用 Ruby on Rail

  • 09 economic situation may stimulate the Ruby on Rails? 2009-03-11

    It is weeks, when the financial turmoil hit all over the sky at the time, layoffs crisis become the most reluctant to face all this. However, it will never be able to evade the truth. Earlier, PPLive and six houses several IT companies layoff news ha

  • Using Ruby on Rails and Action Web Service to create Web Services 2009-03-07

    Action Web Service module will be at Ruby on Rails implementation of Web services. Action Web Service will create the SOAP and XML-RPC Web Service Protocol server-side support. You can use the Declaration and the Action Web Service released the API.

iOS 开发

Android 开发

Python 开发



PHP 开发

Ruby 开发






Javascript 开发

.NET 开发



Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 黔ICP备15002463号-1

processed in 0.157 (s). 12 q(s)