May 20, 2008

error_reposting and exceptions....

I just found this line: set_error_handler(create_function(‘$x, $y’, ‘throw new Exception($y, $x);’), E_ALL~E_NOTICE); in the comments on php.net and did a short test to see whether it works. Normally I used to have a global function which passes all the errors through a logging-chain (FILE/MAIL/DISPLAY) but having exceptions could be more comfortable because you might sometimes want to make decisions locally and not on a global scope and just setting and re-setting the error-handler is not the best idea for this… I’m not sure if I get used to it, because the error-handling function did a good job for the last years … we’ll see :) ... Read more

May 19, 2008

Preview to PHP 5.3

One of the mayor updates since PHP 5.0 is upcoming with the 5.3 version, this is also a major step forward to PHP 6 - I love to have namespaces and appreciate the split of E_NOTICE and E_DEPRECATED. Also other features like the native MySQL support ( I hope this really raises the performance), the array_replace/array_replace_recursive functions and also dynamic calls to static functions “$classname::$functionname($parameter);” sound very cool. So I really look forward to have it on the server (or at least on my laptop) :P ... Read more

May 18, 2008

Firefox 3 RC1

I just saw that the first Release Candidate of Firefox 3 is available for download . As with the most of the Beta-versions I also checked this update because I’m really excited to get the new features, but after 5 minutes (again) I removed it from my PC. Non of my extensions is working in FF3 (except the dictionary), it still destroys the Frames in TYPO3 (there’s a bugfix-extension for that) and the memory-usage is still very high,10% lower than in FF2 but still high. ... Read more

May 17, 2008

Using Mocks within Tests

Let’s say you have some kind of process which creates cookies and which requires the cookies to bake before you deliver them to the customers. This process somehow touches two kinds of objects the cookie itself and a object which performs the process - the cookie oven. When you start to develop the oven how do you check whether the cookies are really baked or not? Since you can’t get rid of the dependency between the oven and the cookie, you have to simulate a real object and do the checks by hand - but wait there’s already a way to resolve it: PHPUnit ships with a very nice and comfortable function to create and check mock-objects and that’s exactly what we need in this situation where we somehow need to find out if our cookie really gets baked. ... Read more

May 15, 2008

TYPO3 API...

The API documentation on typo3.org is not very up-to-date, but the typo3-unleashed.net guys just provided some links to the API documentation of the current TYPO3 versions - http://www.typo3-unleashed.net/api_online.html - thanks a lot :)

May 15, 2008

Specification [DDD]

Maybe sometimes the cookie tin is filled with all sorts of cookies and only some of them are what you’d like in this special moment. Often it’s very easy to specify which cookie you like, but sometimes your wishes are very complex, for example if you look for grannies special cookie with chocolate, coconut and vanilla crumbles. This could lead into a real crumby problem if you try to sort all the cookies and then select eat the right one. ... Read more

May 14, 2008

Homer Simpson as ASCII-Art

The rebirth of ASCII-Art that’s how one of the comments called it - Homer-Simpson as ASCII-Art with modern and valid CSS - that’s so awesome: http://www.romancortes.com/blog/homer-css/

May 13, 2008

T3DD08

The last weekend was great, I joined the T3DD in Elmshorn, Germany and meet a lot of interesting people, the beer was cheap and the weather was amazing. So I’m looking forward to the T3CON in autumn… :) It also seems that some of the guys got some new spirit - today 4 official and some inofficial bugs in some extensions had been fixed in a very short sequence … great! ... Read more

May 13, 2008

Memento [GoF]

Let’s say you got a cookie from a repository your granny and you’re not sure if you like the new taste. Wouldn’t it be cool if you could just try it and revoke the operation first bite if you don’t like it? In the world of OOP thats a easy job which can be handled by the so called memento pattern - you just save the inner state of the object within a memento object and revoke you actions whenever you like… ... Read more

May 12, 2008

Decorator [GoF]

As the first pattern I’d like to introduce the decorator pattern - it’s one of the [GoF]- structural patterns. It enables to extend the functionality of a existing method by wrapping a so called decorator-object. So maybe you already know the situation ;) , your granny is going to bake cookies and you think of how they gonna taste - so cookie is our main-object and the different additional spices and other options which refine the taste of the cookies are the decoration for it. ... Read more

© tolleiv 2016 - CC BY-SA 3.0 - Powered by Hugo