Accessing Java components in Ruby controllers.
Here we examine Ruby-based controllers, and the invoking of Java functionaility from them. Consider:
A DAO, PersonDAOImpl, is registered under the name "person_dao" and we have one Ruby based controller available. Now its
probably safe to assume that this Ruby PersonController will need access to that DAO object. Gaining access to this DAO
from the controller is easy in Waffle, by invoking the locate method:
Notice that we were able to retrieve the DAO by its interface. Additionally, since this DAO was registered with a key
you can use a convention to retrieve the component.
The convention is that "locate_<component key>" method is used by the controller to locate and retrieve a Java component by key.
As you can see this makes writing Ruby-based controllers with Waffle really easy.