InfoQ

News

InfoQ Presentation: MetaProgramming Ruby

Posted by Werner Schuster on Dec 07, 2007 10:15 AM

Community
Ruby
Topics
Domain Specific Languages,
Language,
Ruby on Rails,
Programming
Tags
Qcon London 2006,
Metaprogramming,
Ruby on Rails
Metaprogramming is one of the technologies used to implement some distinctive Ruby on Rails features such as has_many. In this presentation, Dave Thomas (PragDave) focuses on the Ruby features that make metaprogramming possible:
  • Class definitions are active - they get executed
    This allows to execute custom code when a class gets first loaded.
  • All method calls have a receiver, i.e. a self object
    A crucial fact in Ruby - Dave explains how self some methods of metaprogramming work with manipulating self.
  • Classes are objects too
  • Open and singleton classes - it's always possible to add members to classes
Other topics include how to use eval flexibly with bindings and more.

Check out "MetaProgramming Ruby".

6 comments

Reply

This is cool!!! by Jure Srsen Posted Dec 18, 2007 9:02 PM
eph by Andrei Zinca Posted Dec 19, 2007 3:55 PM
problems by jimmy coyne Posted Dec 20, 2007 10:24 AM
Re: problems by Sean Cribbs Posted Dec 22, 2007 11:58 AM
Re: problems by johan andries Posted Dec 28, 2007 3:00 AM
Re: problems by sohbet sohbet Posted Sep 13, 2008 4:18 AM
  1. Back to top

    This is cool!!!

    Dec 18, 2007 9:02 PM by Jure Srsen

    Tnx. It would be really nice if more Ruby presentations like this would be available.

  2. Back to top

    eph

    Dec 19, 2007 3:55 PM by Andrei Zinca

    An otherwise good presentation ruined by an awful, macabre joke.

  3. Back to top

    problems

    Dec 20, 2007 10:24 AM by jimmy coyne

    Is any body else having problems viewing this presentation?

  4. Back to top

    Re: problems

    Dec 22, 2007 11:58 AM by Sean Cribbs

    +1

  5. Back to top

    Re: problems

    Dec 28, 2007 3:00 AM by johan andries

    On Windows, for me it works in IE but not in FireFox.

  6. Back to top

    Re: problems

    Sep 13, 2008 4:18 AM by sohbet sohbet

Exclusive Content

A Formal Performance Tuning Methodology: Wait-Based Tuning

Steven Haines talks about tackling web application performance tuning by proposing a method called wait-based tuning.

Shaw and Fowler About Forging a New Alliance

Shaw and Fowler talk about the need for a new relationship between the business department and the IT department. Studies have shown that projects mostly fail due to miscommunication between the two.

How to GET a Cup of Coffee

In this article, Jim Webber, Savas Parastatidis and Ian Robinson show how to drive an application's flow through the use of hypermedia in a RESTful application.

Archaeopteryx: A Ruby MIDI Generator

Eccentric artist turned overnight anti-celebrity, Giles Bowkett captures the heart and soul of RubyFringe as he demonstrates his revolutionary Archaeopteryx MIDI drum pattern generator.

Alexandru Popescu Discusses the InfoQ.com Site Architecture

InfoQ Chief Architect Alexandru Popescu discusses the InfoQ architecture, WebWork and DWR, Hibernate and JCR, Hibernate scalability, the new InfoQ video streaming system, and future plans for InfoQ.

LHC Grid: Data storage and analysis for the largest scientific instrument on the planet

higgs-event

The Worldwide Large Hadron Collider (LHC) Computing Grid provides data storage and analysis for the entire high energy physics community that will use the LHC.

Fostering Software Craftsmanship in a Corporate Setting

Scott talks about software craftsmanship represented by people responsible for their work, continuously learning, taking pride in their work, sharing knowledge and respecting professional standards.

Eric Nelson on Windows as a Web Platform

Eric Nelson explores Windows as a web platform using IIS 7.0 providing an architecture deep dive and striving to reduce the lines of code in web applications.