Jakob WesthoffSystemProcess - Execute system commands with ease (21.11.2008, 17:31 UTC)
A current project of mine demanded me to invoke a lot of different programms on the commandline. Some calls were simple executions of a command followed by one or two arguments. Others were more complex with the need to define special environment variables or custom file descriptors. Some of them even needed me to asyncronously run the programs to be able to read their output during execution or run multiple commands at once. Because nobody, includind me, really likes the proc_* family of functions like proc_open in php, I decided to write a simple and yet powerful object oriented wrapper around all this functionality. The wrapper is fully unit tested and licensed under LGPLv3 for you to use in your projects. For more informations and documentation please refer the the blog entry.
Link
Bertrand MansionBye bye PDFLib (21.11.2008, 11:29 UTC)
I have been using PDFLib for over 4 years now on various projects. Of course, I had to buy the PDFLib license because most are commercial projects and we needed the PDI feature which allows you for example to use another PDF document as a template. So I bought the PDFLib 5 license, then the PDFLib 6 license update because if I remember correctly PDFLib 5 didn't support unicode or something like that. That's about 1000 euros each time.

Recently, we have upgraded our hosting plan from our hosting company and instead of a single CPU on the server, we now have two for the same price. It's a nice upgrade. Unfortunately, PDFLib didn't like the upgrade and now returns the following error when we generate a document with our serial number "Found 2 CPUs - license covers only 1".

Of course, I have contacted their sales department about the problem. They replied that I should either buy another license for PDFLib 6 for the second CPU, or eventually buy PDFLib 7 which doesn't have this per CPU limitation. Both solutions cost approximately the same price, more than 900 euros !

I don't feel like buying another license and I don't need PDFLib 7 "features". So, farewell PDFLib ! It was nice working with PDFLib but they obviously became too greedy.

I am going to investigate other toolkits. I know that most of them do not support features like PDI, but I can probably find another way around this issue. So far, I have found :

  • Haru : There is a brand new PECL extension for Haru written by Antony Dovgal which was released last week in version 1.0. Sounds interesting !
  • FPDF : These are mostly PHP classes. The author claims that it is not as fast as PDFLib but says it performs well. I have already tried this solution before and it was working very well but I was only producing PDF invoices for an e-commerce site. Building a full catalogue might be too much for it. The nice thing is its companion class FPDI which can also import existing PDF files and worked for me the last time I tried.
  • TCPDF : In the same vein as FPDF, these are a set of PHP classes for generating PDF documents. I need to have a look at it as well. It seems to work with FPDI too.
  • Panda : There is also a PECL extension for Panda, but I am not sure it is maintained and the project didn't release anything for a long time.
  • Cairo : Cairo has a backend for PDF rendering. Given its strengths in graphics, this can be interesting but I think it will be too limited in my case as I need to create documents with multiple pages. There is also a PECL Extension for Cairo (there are two actually, but the other one didn't make a release yet).

I now have to evaluate them and rewrite some code for our new server. But in the end, I won't have to deal with PDFLib and its licensing mess anymore, so that's for the better.
Link
PierrePHP 5.2.7RC4 released! (21.11.2008, 10:03 UTC)

Ilia has released PHP 5.2.7RC4 yesterday and we made it synced again, binaries and sources releases are available! Please test it :-)

The sources can be fetch here (zip sources are available on the windows site as well) and the binaries in the windows site.

Note to self: do not say it is the last RC (is it? :-D)

Link
Danne LundqvistFirst OpenCoffee in Karlskrona (21.11.2008, 09:31 UTC)

Yesterday we had the first OpenCoffee in Karlskrona at the new place Bistro Java. The initiative came from Martin and Christian at Svensk Webbutveckling. Really nice guys even though they seem to prefer strongly typed languages over PHP. We had a good chat about both business and web development in general as well as technology and languages.

Unfortunately we three were the only ones showing up so the event will be repeated next thursday. If you are interested in business, technology, internet and web development - and are nearby - drop in!

Link
Sebastian BergmannSpeaking at Conférence PHP Québec 2009 (20.11.2008, 08:05 UTC)
Conférence PHP Québec 2009

I will present two sessions at the Conférence PHP Québec 2009:

Of Lambda Functions, Closures and Traits

Lambda Functions and Closures allow the quick definition of throw-away functions (for use with array_map(), for instance) that are not used elsewhere. Traits reduce some limitations of single inheritance by enabling the reuse method sets freely in several independent classes. This session introduces the audience to the implementation of lambda functions and closures (which are new in PHP 5.3) as well as traits (which will be added in PHP 6).

PHP Code Review (together with Stefan Priebsch)

Attendees of this lab will learn how experts look at code, what good code and bad code looks like, and how to avoid the most common gotchas. They are invited to bring their own code for an anonymous code review for an increased benefit from the lab.

See you in Montréal next March!

Link
Evert PotI'm programmer of the year! (19.11.2008, 20:29 UTC)

Last night the CNMA awards were held here in Toronto, and I turned out to go home with an award!

Award

Although I still feel I didn't really deserve such a prize, I feel honored and proud of the team.

Thanks guys! Its been an amazing ride so far, and also thanks to the CNMA organization and judges.

Link
Kevin WatersonClass Hierachies And Overriding (19.11.2008, 07:41 UTC)
The PHP Object Oriented method of programming brings many exciting possiblities to application code. Many of the theories surrounding PHP Object Oriented code comes from some simple concepts. To the new comer, some of these concepts seem a little abstract, and with good reason. Abstraction is a key concept on Object Oriented code, but to the un-initiated, may seem rather vague. This tutorial attempts to bring to light, the concept of abstration, class hierachies, and polymorphism. But rather than boggle the mind with pages of theory, lets look at how it works.
Link
PHP in ActionZend_Test (18.11.2008, 22:45 UTC)

I admit I don't follow Zend Framework very closely, since I haven't been using it for any serious work. But I did write a piece about testing a Zend Framework action controller with View Helpers.

This might need updating, since the testing capabilities of the Zend Framework have grown substantially since then. In particular, there is now a component called Zend_Test. I haven't had time to study it closely yet, but I hope to do so soon.

Link
Richard HeyesReferences are not pointers (18.11.2008, 18:56 UTC)

Surprising that this is still cropping up. It's quite simple really, PHP references are not pointers. You don't need to take my word for it though, the manual puts it just as succinctly: http://uk3.php.net/manual/en/language.references.arent.php I quote: "As said before, references aren't pointers." I'll reiterate: PHP4 passed objects around by value. This was fun. (?) PHP5 corrected this and passes things around by reference, which (I think) is more intuitive, and saves a lot of puzzlers. In PHP4 you could use this: =& to get things passed by reference, which in some cases, in particular with objects, was necessary. But with PHP5 you don't have to use this operator so much. Which is nice, since you don't have to think as much, which is always a boon.

Link
Henri BergiusMaemo.org goes Ragnaroek (18.11.2008, 16:54 UTC)

Maemo.org, the community site for Nokia's mobile Linux environment has this week been upgraded to 8.09.2 Ragnaroek, the much faster and long-term supported version of the Midgard framework. Thanks to Niels and Piotras for working with me on this!

in October, I spent quite a bit of time optimizing this release, shaving off an estimated 60-70% of queries through some smart caching and removed redundancies. In addition, a new database server is now in place. Together, these should get us quite far in the "Fast Server" agenda.

Maemo on Nov 18th

We're however still not done, and now we will do more optimizations that will be part of 8.09.3, due next week, and will move static files (images and javascript) to a separate lighttpd instance to remove that load from the normal Apache. When all this is done, the Maemo community should have infrastructure that will be able to serve it for a long time.

In addition to optimization, we've been working on some other features related to the website:

Midgard is a big and complex piece of software. If you notice any issues related to this upgrade, please let us know. And if you have any ideas on improving the website, be sure to file those too!

Technorati Tags: , , , ,

Link
LinksRSS 0.92   RDF 1.
Atom Feed   100% Popoon
PHP5 powered   PEAR
ButtonsPlanet PHP   Planet PHP
Planet PHP