a programmer's best friend :: Entries from April 2004 |
Sunday, April 25. 2004Assimiliating HTML_Template_IT
Yesterday, I added a new feature to patTemplate 3.0: It is possible to read templates, that have been designed for HTML_Template_IT and work with them, like they are patTemplate templates. This could be done with a few lines of code, as the reader is seperated from the main templating engine.
All I had to do is create a new reader by extending the standard reader and change the preg_split() expression that is used to emulate SAX-parsing of the templates as well as the loop that calls the element handlers. But this was mainly copy & paste. As the feature resides in a different reader, it does not slow patTemplate down. You can take a look at how it works on our examples site or view the sourcecode in CVS. By using patTemplate as the engine for your IT templates, you also get some new features, like the output filters or template caches, as well as the easy PHP syntax to build tables or lists. The example I provided does exactly the same as the example in the PEAR manual, but needs only one line of code instead of seven. Just to set things straight: I'm not saying that HTML_Template_IT sucks, It still can be used for a lot of things, but I wanted to show how easy it can be to switch from HTML_Template_IT to patTemplate without having to change all of your templates. A first beta of patTemplate will probably be released during next week, but may download a CVS snapshot from snaps.php-tools.net. Friday, April 23. 2004XML_Parser 1.1.0 released
Today I released XML_Parser 1.1.0 stable. This is the first release since early 2003 and the first since I adopted the package from Stig.
I plan to add several more features by providing subclasses and decoraters for XML_Parser, including support for namespaces and an XML Pull parser, similar to Rob's xmlreader for PECL. Wednesday, April 21. 2004patTemplate examples online
Regular readers of our blog probably know it already: I've nearly finished the development of patTemplate 3.0.0, which has been completely recoded and boasts with features like variable modifiers, custom tags, filters for input- and output stream etc.
I will release the first beta version later this week or early next week, but if you'd like to see what patTemplate is able to do, you may take a look at the online examples at http://examples.php-tools.net/. All examples come with syntax-highlighted PHP source and syntax-highlighted template sources, visible online. If you prefer to test the examples on your own server, you may download the latest snapshot from snaps.php-tools.net or get a CVS checkout at cvs.php-tools.net/. Tuesday, April 20. 2004PHP magazine 3.04 released
Today the latest issue of the php magazine has been released. Topics include the Phing build system, mcrypt, DOM and using AdoDB as a container for session data. Furthermore, Chris Shifflet talks about the roots of the PHPCommunity project.
In the news section there's a short article on my XML_XUL project. Please visit the php magazine website for more information. Monday, April 19. 2004PEAR::XML_Parser 1.1.0
Last week I've taken maintainership for PEAR's XML_Parser, as Stig does not have enough time to maintain it anymore and all PEAR developers thought that I was the perfect match for this job.
My first course of action was to fix the outstanding bugs, clean up the inline docs, add error codes and prepare XML_Parser for PHP5. On saturday I released a first beta, which was followed by beta2 quite soon after a bug report by Michael Wallner (thanks for the fast response). Since then, I haven't heard of any problems regarding XML_Parser. To make sure that the new version is bug free and I can proceed and release it as stable, I'd like you to test XML_Parser 1.1.0beta2 with your applications relying on older XML_Parser versions. Friday, April 16. 2004pat at O'Reilly Open Source Convention This year, I will be giving a talk at the O'Reilly Open Source Convention (OSCON) in Portland/Oregon. The session is an introduction to PEAR, entitled PEAR For The Masses and will feature the usage of the installer, error handling concepts, pearweb and I'll also showcase some of the most important concepts.The OSCON focusses on open source technoligies, ranging from Linux to MySQL, Perl and XML. This year is the fourth year that there is also a PHP conference. My session will be the last of the PHP Conference, it takes place on Friday, July 30, I hope I'll see you there. A question of Transport
Next month one pat-Team guy will travel to the fifth continent - me! I applied for a visa, resigned from my loved job and we move out of our smart apartement. I planed stay in Australia about one year - enough time for working, vacation and to do little socializing.
Beside these daily adventures expected Down Under, I tried to sign on an freighter and travel as a shipboy to Australia. Sadly, I havn't found a ship or a skipper, yet. Of course there are lot of shipping companies running vessel from Europe to Australia, but they don't want to hire a novice sailor just for a single transit. So I decided to post me tragedy, maybe you know somebody who knows somebody who may help me ... Thanks in advance. Tuesday, April 13. 2004patBBCode in the works
Lately I needed a BBCode parser for my Etherlords fanpage, Ether Planes, as the language-dependent texts are stored in XML files, and I needed to be able to add links and text formatting. I had a look at what is already available out there - no need to reinvent the wheel each time... After taking a look at PEAR::HTML_BBCodeParser, however, I decided to reinvent the wheel after all.
Continue reading "patBBCode in the works" Thursday, April 8. 2004Auto-Generated API Documentation
Since today, we are providing API documentation for all of our tools at http://dogs.php-tools.net (no, this is not a typo, we mean dogs).
The docs are being generated every night from the latest CVS sources using phpDocumentor. So the documentation compliments the snapshots you may download from http://snaps.php-tools.net. Soon we'll also provide different formats as well as ZIPs to download the generated docs. Friday, April 2. 2004The end is near!
No, it's not the end of the world and this does not have anything to do with April Fool's Day. I'm referring to the development of patTemplate 3.0.0. I implemented all features that have been available in previous versions as well as a bunch of new functions like (not the complete list):
The architecture has been completely revamped, it's much cleaner now and can be extended by the user in many ways. Furthermore a lot of bugs have been fixed, especially regarding varscopes, conditions, etc. If you want to try the new version before it is released, you can download a CVS snapshot from cvs.php-tools.net. Please report any bugs you find at bugs.php-tools.net. |
php_network_getaddresses: getaddrinfo failed: Name or service not knownphp_network_getaddresses: getaddrinfo failed: Name or service not known |