BOEUF (“Bunch Of Extremely Useful Functions”) is a helper library (a “mini-framework” if you will) designed to make the most tedious operations of building PHP websites a little bit easier. I’m using it to drive a few web projects at the moment, including this very same blog.
It’s been inspired in part by CakePHP, but maybe most of all by good-old oldskool PHP/MySQL development. It gives you:
- A data-driven development workflow. Sounds oh-so-fancy but it just means I can start designing my app from the configuration and data modelling, since the general framework is already in place.
- Easy MySQL access. Just configure and query() away.
- Error logging
- Error messaging using XML
- Input sanitation
- Easy mod_rewrite URL handling (inspired by Cake)
- Support for different output formats - XHTML, RSS and XML (Ajax)
- A few useful utility functions
If you stick to some of it’s conventions, it also gives you the following:
- Input validation. Ie a “post” should have a “title”.
- Entity (table) references - belongsTo, hasMany and 2-way combinations thereof
- Reference handling - search for posts and get the authors automagically in native PHP arrays.
- A simple controller/action/parameters scheme
Of-course it also has a number of weaknesses also:
- No real templating. This isn’t a CMS so I’m not sure how relevant this really is, but somesort of scheme would perhaps be nice since templating can also be one of those “trouble spots”.
- Most probably buggy. Undergoing heavy development constantly, never done any real testing though.
- Performance. This hasn’t even been a consideration yet. The main focus right now is to make it reliable.