PHP in Action Rotating Header Image

Feature-revealing code

Making names “intention-revealing” is a well-known principle in object-oriented programming and design. You want the names of methods to communicate their purpose rather than their technical implementation.

A related question is: how much should the code reveal about what's going on at a lower level?

An illustrative example is the PEAR package HTML_Quickform, which handles all the essential tasks related to Web forms. Here's an ultra-simple example: create an HTML_Quickform object and add a single text input element to it.

Share/Save/Bookmark

Leave a Reply