Showing entries 1 to 2
Displaying posts with tag: design patterns (reset)
05.12. Doctrine 2

Introduction

Object-relational mapping (ORM) frameworks have been around for several years now and for some people, ORM is already outdated by now. As we have seen with other technologies and concepts before, PHP is not exactly what we call an early adopter among the programming languages. Thus it took some time for ORM to grow up in the PHP context.

There have been some frameworks before Doctrine 2 that implement ORM (remember e.g. Propel) specific tasks but most of them lack the required maturity to be used in large projects. With Doctrine 2, PHP takes a huge step into the right direction Doctrine 2 is fast, extensible and easy to use.

This article will take you on a tour through the main concepts of Doctrine 2 in the first part and then explain how to use it in a real world application in the second part. Since at the time of writing …

[Read more]
The case of a color-blind painter.

I'm happy it turned out to be that simple, but the amount of such bugs and devastating consequences are humiliating.
Bug#7209 is a case of an intermittent failure when the best brain of Support department and dozens of man hours had to be spent to track the issue down to a repeatable test case. And the cause is such a trivial design mistake:

typedef struct st_hash {
  uint key_offset,key_length;           /* Length of key if const length */

  uint records,blength,current_record;
  DYNAMIC_ARRAY array;                          /* Place for hash_keys */

  /* cut */
} HASH;

gptr hash_search(HASH *info,const byte *key,uint length);

gptr hash_next(HASH *info,const byte *key,uint length);


Now, where does hash_next get the current position of the search? In …

[Read more]
Showing entries 1 to 2