Notes

When should Doctrine ORM be avoided

Doctrine is certainly the most popular ORM (Object Relational Mapper) for PHP. It might seem a good choice for a new project, unfortunately all it’s advantages come at a price. Obviously you wont find the limitations highlighted in bold on the first page of the documentation, and it may take a lot effort to switch back once you start developing with Doctrine and the problems start showing.

(more…)

When code smells are a sign of good changes

The catalogue of best design patterns for OOP is a relatively well defined set of rules, and listing the dos and don’ts is a really simple task compared to actually following those guidelines, and implementing them. Particularly if what you get to work with is an existing spaghetti code project, left after a dev who just got fired because he couldn’t maintain it any more. (more…)

Problems with ob_get_contents after user abort

One of the easiest and basic ways to handle templating in PHP is to wrap an include(‘template.php’) in output buffering functions such as ob_start() and ob_get_clean(). This allows passing the template contents as a variable for futher processing. It works well in most cases, but there is one catch…
(more…)

Compiling Javascript

One problem I often encountered when doing some more adavanced JS development was the way of organising code. Having everything in a single file was a headache to work with, but then it was the expected result. Copy-pasting content from files into the “production” wasn’t really a solution. With help came Ant and YUI Compressor, two tools that made merging and minifing JS files a one click action. (more…)

Netbeans, XDebug and Vagrant

Getting Xdebug to work with an Apache server running in a Vagrant box takes a bit more effort than with a local server. (more…)

XAMP vs Vagrant – subjectively on virtualization

With some recent experience regarding Vagrant I thought there are a few things worth sharing. As probably many others, for most of my PHP / MySQL projects I would use XAMP running on my pc, in many cases just organising projects into subfolders of localhost. Problems arise when the default configuration is not enough (more…)