Chapter 14. Constructing complex web pages

14.1 Combining templates (Composite View) 325
14.2 Implementing a straightforward composite view 326
14.3 Composite View examples 332
14.4 Summary 337

A complex web page is like a zoo. There may be all sorts of different creatures, all with different habits and requiring different care, cleaning, and feeding. Some of them are in cages (typically the stuff that surrounds the main content, such as banners, ads, menus, and various kinds of sidebars); some of them range freely on the main expanse of the page.

Keeping all these coordinated is one of the great challenges of web programming.

In addition, different species play together. A menu may need to communicate with a news list as well as with itself. ...

Get PHP in Action: Objects, Design, Agility now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.