a programmer's best friend :: Entries from December 2004 |
Wednesday, December 29. 2004New release of PEAR::Date_Holidays
Finally I managed to release Date_Holidays 0.12.0. You'll find some new language-files (German translation for USA-holidays and Italian translation for Christian holidays).
Additionally the getHolidayForDate() method has been vastly improved. Lorenzo sent me a cool patch which makes this method much faster. Sunday, December 26. 2004Unemployed at Boxing Day
Well, we survived XMas and we will survive Boxing Day and New Years Eve as well (Even if I'm not sure with NYE). Even if the world changes every day, people still need to work to afford living. So do I. Therefore I'm looking for a job in Australia again. This time I'm in Melbourne (VIC) - the home of Cricket and the Australien Open. So, if you run a web-design or development company in this beautiful city, I would be glad hearing from you.
Thanks in advance. Wednesday, December 22. 2004New versions of XML_Parser and XML_Serializer released
I released new versions of two of my PEAR packages: XML_Parser 1.2.2 and XML_Serializer 0.14.0. While XML_Parser 1.2.2 only fixes two bugs, XML_Serializer 0.14.0 provides two cool new features:
I added these two new features, as eBay requires applications to work with UTF-8 encoded XML documents and thus Services_Ebay needs to read and write UTF-8 encoded XML-streams. But the more I think about these features the more situations come to my mind where those options could be timesavers. Saturday, December 11. 2004Two new articles published
This week, two of my articles has been published. It started with issue 1.05 of the German "Java Magazin" for which I did a short introduction of to XUL. XUL is an XML language to model user interfaces for Mozilla, I did a PEAR class that allows you to create XUL applications with PHP.
Today I received the latest issue of the International PHP Magazine, which includes my article on XML_Serializer, I package I maintain in PEAR that is able to serialize almost any PHP structure to an XML document and vice versa. Thursday, December 9. 2004patSpiderizer v2.0.9 bugfix release
As I have finally had the time to look into the "cannot redeclare xmlrpc_decode()" bug, a new patSpiderizer release (v2.0.9) is now available from our site. This is just a bugfix release, but that one bug was very annoying, and only happened on PHP installations that had the xmlrpc extension included - the function names of our xmlrpc connectivity class simply were the same as those of the extension...
This is probably the last version for the v2 branch (except for bugfixes), as I have started writing up notes for the new v3. This new version will be rewritten from scratch, and synthesize the experience gained with patSpiderizer and its bigger brother XENA PolePosition (German) that I developed for my former employer, Metrix Internet Design GmbH, in one tool. The global concept will bring some fresh wind to the 'cloaking' scene, I think, as it will be the first NOT to cloak Wednesday, December 8. 2004Welcome Adam - Services_Ebay 0.10.0 released
I just released a new version of Services_Ebay, which fixes a small bug in the Item Model, allows you to change the language of the error messages and allows you to specify international shipping options for your items.
But the most important change is, that Adam Trachtenberg now has CVS karma to commit to the CVS repository. He already commited his first patch, hope there will be some more in the near future, when he started working with the package. So welcome aboard, Adam! Tuesday, December 7. 2004New PEAR proposal: HTTP_Cache
I just proposed a new package for inclusion in PEAR: HTTP_Cache. This package helps you creating ConditionalGet requests in your pages. This helps you keep the traffic low on your sites as it only sends the request body with the first request and a 304 (Not Modifed) header on subsequent requests. This is especially useful, if a page that is requested quite often is not changed a lot, but still is generated by PHP, so the browser will not cache it by default.
If you would like to implement this in your site, HTTP_Cache does all the work for you and even is able to work with output buffering. If using this feature, you only need to add two lines of code to the scripts you want to cache: <?phpHTTP_Cache will generate a unique id for the current browser and send the following headers: Cache-Control: must-revalidateOn the next request the client will resend the ETag back to the server and HTTP_Cache will compare the client's ETag with the one that will be generated on the server. If both tags match, the data will not be send to the client, but a 304 header will be issued: HTTP/1.x 304 Not ModifiedThe only drawback is that HTTP_Cache will need to create an MD5-sum of the content, which could slow your application down in some cases. But using the cache will speed up your site as your webserver does not have to send as much data as without the HTTP_Cache. Furthermore you may supply the unique id so HTTP_Cache does not need to create use the md5() function. This is especially helpful, when you are already using a serverside cache system and already generated a unique cache key for the current page. In this case you may also check whether the browsercache is valid so you do not need to load the cache file from disk: <?phpIf you are interested in this package, take a look at the package proposal or download the first version from out site. Monday, December 6. 2004PHP5 Kompendium is now available
While shopping for christmas presents on Saturday, I found Christian's and Tobias' new book PHP5 Kompendium standing on the shelves and until then I hadn't realized, that this already had been published. The German book deals with all you need to know about PHP5 and is the perfect christmas present for everybody who either wants to learn PHP from scratch or is looking for some advanced techniques.
While skipping through Christian's blog, I discovered that the book had been released nearly two weeks ago, I guess it's time that Christian's blog is included in Planet PHP. Congratulations to Christian and Tobi. patBBCode describers meet patTemplate
I have added the patTemplate driver to the new Describer class included with patBBCode: this driver uses a patTemplate template file or loaded templates to generate the tag guide, leaving nearly total control in layout. The effect can best be seen by comparing the very simple HTML Driver output with the new patTemplate driver output.
In addition to making it possible to let patBBCode render its tag guide automatically directly in your site's design, the patTemplate driver has a series of options you can set, namely:
Wednesday, December 1. 2004Unit testing with .phpt
In the latest issue of the PHP Barnstormer Aaron wrote a nice summary of Greg's tutorial on how to use those strange phpt-files and how to write your own tests. This currently is the best source of information on phpt files you can get (at least I could not find better information).
Together with the new PEAR_RunTest class, that Greg wrote, it will finally be a lot easier using these standard tests for your PEAR packages. This reminded me, that a lot of my PEAR packages still are in need of some good unit tests, guess I'll give phpt a try. |
php_network_getaddresses: getaddrinfo failed: Name or service not knownphp_network_getaddresses: getaddrinfo failed: Name or service not known |