What is Nest?

Nest is a nestable server templating library. It lets you create pages that look like standard html and easily add functionality with custom tag libraries. Nest templates are well-formed html that is then compiled into standard php. A Phing task has been included so that in a production environment all the templates can be pre-parsed and only the php files pushed to the production web server.

Is Nest a PHP version of JSP?

Nest is based on some of the concepts of JSP 2.0. Templates are well-formed html. Tag libraries are included by namespace. There are tags and tag files, and there is a simple expression language typing everything together.

While some of the better concepts of JSP have been carried over, Nest was designed first and foremost to be a PHP templating library.

Unlike JSP, Nest was designed to make it easy for web designers to add new tags. The level of programming skill needed with JSP to add a simple styled div tag was simply to high. It's easier now, but most web designers have moved on.

Why another templating system?

The PHP templating libraries I've looked at are often like writing in a different language. I tried using just PHP, but found it got too difficult to read even when using shrort tags. I moved to using xslt, but that didn't have a particularly good capacity for dealing with nested tags. So Nest was born.

Nest's tag libraries make it easy to encapsulate complex functionality and then simply work on the design concerns.