Framework solution
Aliro adopts solutions consistent with the approaches advocated earlier. Often, more than one alternative is available to achieve similar results. Selection can be made according to circumstances and by keeping the particular aim in view. Illustrations of the general approach are given before going into more specific mechanisms.
Using "heredoc" to define XHTML
To demonstrate that PHP can be used to define the XHTML for a page in a clear and straightforward way, we can look at an example from the administrator side of Aliro. The one I've chosen is a simple one, the code that displays a list of the attempts to access non-existent pages, the 404 errors. Although it is not possible to modify the entries in the database for these errors, it is possible to select an error from the list so as to see more detailed information. So the 404 administrator interface is a simple version of the common case of listing items from a database table, and allowing detailed access to individual...