Upload

Loading...

This video is unavailable.

erector refactoring

Like this video?

Sign in to make your opinion count.

Don't like this video?

Sign in to make your opinion count.

Want to watch this again later?

Sign in to add this video to a playlist.

Uploaded on Oct 3, 2009

Erector is a Ruby gem that implements the builder pattern for HTML generation. It can save developers time by encouraging more advanced reuse in views via composition and inheritance, terse syntax, auto-closing tags and default HTML-escaping of all output. It can serve as an alternate view technology in Rails.

Using Erector makes it easier to refactor complex views by using standard refactoring techniques such as extracting methods. In ERB you can only accomplish this by helpers or partials, each of which lives in separate files. Since every Erector widget is a class, you can factor out duplication more easily than you can with helpers or partials.

This bit compares ERB with Erector refactoring and was extracted from a talk given by Jeff Dean at RailsConf 2009. http://en.oreilly.com/rails2009/publi...

Loading...

Loading...

Loading...

Loading...

Ratings have been disabled for this video.
Rating is available when the video has been rented.
This feature is not available right now. Please try again later.

Loading...

Loading...
Working...
to add this to Watch Later

Add to