> ## Content Index
> Fetch the complete content index at: https://werd.io/llms.txt
> Use this file to discover other available public pages before exploring further.

# Bonita: a PHP template manager with lofty ambitions
- URL: https://werd.io/bonita-php-template-manager-lofty-ambitions/
- Published: 2011-08-23T18:51:18.000Z
- Updated: 2025-06-12T11:00:46.000Z
- Author: Ben Werdmuller
- Tags: Software development, #ben-684a32da145d7d001be71dae, Web, bonita, github, open source, php, templating, #Migrated-1749693130536, #wp, #wp-post, #Import 2025-06-11 21:52

I'm fed up of using the same PHP template pattern over and over in my web apps, so I decided to write it from scratch and iterate on some core ideas. And then open source it under an Apache 2.0 license.

The result is [Bonita](https://github.com/benwerd/bonita): a simple PHP templating engine. It's definitely version 0.1, but I thought I'd put it out there now in the spirit of *release early, release often*. Future enhancements will include a static cache, simple functions to handle action tokens for XSS, and some stubs to do things like semi-automatically generate RSS and Activity Streams.

**Isn't PHP already a template language?** Yes and no. Its origins are definitely as a template language, but these days it's a perfectly good way to write fully-fledged web applications. After all, Drupal, WordPress, StatusNet and Elgg are all PHP-based. (Yes, the language is much-maligned, and certainly has its flaws, but it's also much-used.)

**Aren't there already templating systems for PHP?** Yes, but they're typically designed for *sites* rather than apps. Bonita includes support for creating streams and automatically drawing PHP objects out of the box, as well as content post-processing and template plugins. Support for anti-XSS form action tokens is another example of a feature that really mostly makes sense for web app developers.

**Why are you releasing this?** By releasing this under an Apache 2.0 license, I get to continue using the ideas, but I also get to share it, and let the wider community help me build out the system. That seems like a more efficient model for development to me; it also sits better with me. (And, hey, if nobody uses it, the worst that's happened is that I have a great backup of my code on GitHub.)

**Are you releasing Bonita on behalf of anyone?** No. This is my own code, and it's not being released or endorsed by any other organization or entity.

For advanced themes and HD photographers to design you website [check it out](https://mangomattermedia.com/wordpress/portfolio-wp-themes/) on Mangomatter.

Interested? [Bonita's GitHub project is over here.](https://github.com/benwerd/bonita)