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 ..).
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 ..
Hoptoad # 500 automatically send a letter / order log
God # monitor who is dead, eat too much memory, automatic re-opened ....
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 .
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 ....
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 ....
Related Posts of
Advanced Learning Ruby on Rails
Ruby is a completely cross-platform object-oriented scripting language, built on the Ruby-based Web framework Ruby on Rails (ROR) is the field of web development is gaining increasing acceptance. ROR substantial use of the Ruby language features, Symbol i
ruby on rails recommend the production environment is running Linux / FreeBSD / Unix, or Unix family of operating systems, using lighttpd + FCGI solution. The following will be my Linux operating system, lighttpd + FCGI, MySQL database as an example, comp
First, install Ruby, rails, mongrel and Apache2.2 Rubyforge download from the web site One-Click Ruby Install, run setup on installed ruby and rubygems. Run the command: gem install rails-y gem install mongrel-y gem install mongrel_service-y Installed rai
Interactive Net Purchase Excellence Amazon purchase [Original title] The Ruby Programming Language Publishing ] [ O'Reilly Media, Inc. [Author] (United States) David Flanagan; Yukihiro Matsumoto Translator  LIAO Zhi-gang; Zhang Wo [Name] Books O
Ruby is long overdue to replace java more flexible and make some necessary changes in a matter of, if not deep-rooted culture of the company's java, I think. . . . . . The following are my Writing for the Rest of the interface used to make the test su
First of all, to quote another blog saying: 1.cascade ="..."? cascade is not a property of many-to-many relationship must have it just so that we insert or delete at the time like some more convenient, as long as the source of the cascade insert
Reprint: http://blog.csdn.net/dingx package sgf4web.dao; import java.io.Serializable; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.hibernate.*; import org.hibernate.criterion.*; import org.springframework.
In windowsxp install ruby on rails of sqlite3-ruby problem-solving nmake 'nmake' is not recognized as an internal or external command,
ROR is Ruby on Rails. Ruby is a well-known has been very good dynamic language It's dynamic language. Simple and easy. Dynamic languages are interpreted, but the performance may make a discount, but not absolute, because the application is complex, th
This article contains a list of ruby on rails routing examples. If you find you have any questions please leave a comment. Routes are processed from the top of routes.rb down. If a route is matched it will stop processing the routes.rb file and use that r