The Jifty::Web::Form::* classes are currently a bit of a mess. This is an effort to document their internals so they make some sense to whoever finally gets motivates to fix them (which may well be me). C is the base of *every* class in the hierarchy. Virtually any widget that Jifty renders, be it a link, button, or form field, comes from some subclass of C C itself deals essentially only with writing out javascript event handlers for widgets. Its method walks the C argument to all those buttons and links, building up a data structure that is eventually serialized using JSON and passed to jifty.js's C function in an C wrapper. Form fields (usually created by C calls on a C are all subclasses of C, (C). C takes care of most of the work of rendering form fields. It renders the label, autocompletion, placeholders, hints, validation errors and warnings, and so on. Subclasses override methods as appropriate to add or alter details of the rendering. Note that subclasses need *not* concern themselves with making sure that the field is rendered as the correct kind of widget (field, select, etc.), assuming they represent a standard, single, HTML C tag (as opposed to, say, C). That is dealt with by the C magic: Whenever you create a C, it has a C. Normally, this represents the C property on the C tag. In order to make the system extensible, however, it *also* indicates what perl class this widget will be. C blesses the returned object into C<'Jifty::Web::Form::Field::' . ucfirst $type>. The stock rendering renders an input field with C, but subclasses can override C to render something else -- see C for an example of doing this. Simple links are instances of C. This class is fairly simple -- it merely renders as a HTML C tag with the appropriate attributes. The only detail that remains is the non-javascript state-variable emulation of AJAX support on links and buttons. This is C's job. C is also a C, which means it inherits the Javascript hooks. Its constructor builds up a list of state variables that need to be B from the previous request, while its C method walks the javascript hooks inherited from C and generates new state variables that will need to be sent by this button to simulate the AJAX effects given in the C. If the clickable needs to submit actions, C creates it as a button, and otherwise it creates a link. It does this by creating a *new* C or C object, and serializing all the state variables it's built up onto that object appropriately (in the name, if it's a button, as GET parameters if it's a link). This final step, where a C (which is not renderable) clones itself into a different class that can be rendered, makes use of the C method defined in C. Every subclass of C keeps a list of the accessors defined on that class (typically these are defined using C, but not always). When C needs to clone itself, it walks the list C<< ($self->accessors) >>, building up a hash of all the accessor key-value pairs on itself, and passes these to C on C or C, which calls accessors on itself for every C value> pair in its argument list.