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.
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 ..).
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 ..
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 ....
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:
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.
Wish to provide this information allows everyone to learn and practice with directions ....