RedBean Models with Composer
I've finally got to the point where I want to use custom model classes with the RedBean ORM. I personally think this sure speaks volumes for the technology after already using it for various projects for around a year because, as a result, it's reconfirming it's ability to provide 'schemaless' development compared to other ORM technologies. (See DBIx::Class, Doctrine, ActiveRecord etc). Being a Composer convert I automatically wanted to have my models residing in a 'namespaced location' inside my (Empathy) web apps so that they could be auto loaded for me. Although I appreciate the RedBean creator's views on namespaces in PHP, because I think less is often more, I've simply always been a fan, especially since I started to use Composer and becoming aware of the PSR 0 autoloading standard. So assuming I have some 'Acme' components in my web app I would declare them according to the composer documentation as such:
{
"autoload": {
"psr-0": {"Acme": "src/"}
}
}
Blogging
After a small amount of deliberation I've decided to put the latest version of my personal blog live again. You may notice a change in the front-end which I initially started work on over a year ago! The blog is the same as before, in that it is a custom built web application using my own MVC components together with Smarty but in the latest version the inner dependencies are managed using Composer. These components are still in the pre-release stages of development but watch this space.