in reply to the trend of the presentation layer driving application logic

For templating systems, the control and presentation can be separated fairly easily. For example, Template toolkit takes a template name and a hash of data. The control logic decides which template to use and provides the data for the template. Obviously, the template could use embedded code or some complicated object and perform actions. But that misses much of the whole point of using a templating system.

The control decides the operations to perform, what template to show, and gathers the data to fill in the template. The template just presents the data and does not change the state of the system. The template might do some reading from the database but it shouldn't make changes.

  • Comment on Re: the trend of the presentation layer driving application logic