Archive for 2010

Orms and Circular References

May 27, 2010
By SeanJA

In my spare time I have been working on an ORM… not one meant to be used in the real world (well… not yet anyway). I currently have hasOne and hasMany working like so: <?php   /** * @property int $id * @property string $type * @property int $car_id */ class wheelBoilerplate extends orm{...
Read more »

Tags: , , , , , ,
Posted in PHP, Programming | 1 Comment »

Netbeans 6.9: My New Favourite Features

April 29, 2010
By SeanJA
Netbeans 6.9: My New Favourite Features

Netbeans 6.9 beta was recently released, here are some of the new features for the PHP editor that are pretty awesome. The first one is recognizing overridden methods and classes. This feature is great because it allows for better auto completion, and lets you find things faster. Not only does it recognize that I...
Read more »

Posted in IDE, Netbeans, PHP, Programming | 3 Comments »

Exceptions Are Not For Flow Control

April 21, 2010
By SeanJA

When I saw this post on Better Error Handling, while there is nothing horribly horribly wrong with it I couldn’t help thinking that he has gone past proper error handling. Exceptions are for exceptional cases, hence the name. They should not to be used for flow control, or for things that could occur normally...
Read more »

Posted in Best Practices, PHP, Programming | 2 Comments »

PHP Functions, you’re doing it wrong…

April 14, 2010
By SeanJA

Just a quick tip today. If your function looks something like this:   <?php /** * A really long function definition * @param string $has * @param bool $a * @param int $lot * @param float $of * @param assoc_array $parameters * @param string $I * @param string $wonder * @param int $what *...
Read more »

Posted in Best Practices, PHP, Programming, Ruby, WTF | 7 Comments »

An alternative to Poor Man’s MVC in PHP

April 7, 2010
By SeanJA

As written in my previous post ( http://blog.seanja.com/2010/03/re-top-10-php-techniques-that-will-save-you-time-and-effort/ ) I noted that the code for the proper way to write an index file is essentially a Poor Man’s MVC tm. This method is fine for someone starting out their php journey, it lets them do everything they will probably need to do (they can...
Read more »

Posted in Uncategorized | 6 Comments »