Wednesday, March 1. 2006
This is just a quick note to let you know, that our project has not died. We are currently in the process of moving all available documentation from our website to the Trac installations we will be using to maintain our projects. While moving the exsiting documentation, I also added a new page, which contains a tag reference for patTemplate.
We will keep you updated on our future plans for our projects.
Saturday, September 24. 2005
This week, I finally managed to upgrade our server to the latest version of Chiara_PEAR_Server, which is now uses REST instead of XML-RPC. Besides all the new features this enables in our channel, one huge advantage of using REST is that I finally could add our channel to pearadise.net.
pearadise.net is the channel aggregation portal for PEAR compliant channel servers. So if you are looking for a package that solves a specific problem you do not need to search for this package on every website that offers, PEAR packages. You just go to pearadise.net and browse the listings of all channels that are registered there. If you are even more lazy than the average developer, you just use the search functionality offers. For example, if you are looking for a template engine, you just search for "template engine" using the form the website offers and it will list you all "official" template engines as well as Smarty and our own patTemplate.
There are already seven channels registered, which is really great, as the site is still in beta-state and PEAR 1.4.0, which brought us the channel features is only stable for a few days.
The developer behind pearadise.net is Tobias 'toby' Schlitt, who is well-known in the PEAR community for his work on the PEAR website and several PEAR packages. He is also a member of the PEAR-QA-Core-Team, so you can all rest assured that this new project of his will surely improve over the next time and will soon be the number one site to search for re-useable PEAR components. If you are maintaining a PEAR compliant channel, make sure to register your channel at pearadise.net.
Saturday, August 13. 2005
I finally released a stable version of patConfiguration 2.0.0. patConfiguration is a package to read and write configuration files in different formats, like XML, WDDX and INI. The most powerful driver is the XML driver, which allows you to write rules how the XML tags should be interpreted. This means, that you can map any XML document to arrays, objects and scalar variables by defining the target types of the tags and their attributes. This makes reading configuration files from XML as easy as just passing the configuration as a PHP variable.
You can download patConfiguration either from our website or use the PEAR installer and get it from our channel-server. Be sure that you have patError installed (which is done automatically, when using the PEAR installer).
Wednesday, August 10. 2005
While relocating to a new server, we decided to use subversion instead of CVS to manage the source code of all our projects. This lead to some problems, as we had to adjust several of our scripts that automatically generated the API documentation and the nightly builds of our projects.
I just finished the last adjustments and now it's possible to download a ZIP or TAR.GZ file of the current development version of any our projects from snaps.php-tools.net. If you prefer to checkout the projects from our subversion repository, that's possible as well as we are allowing anonymous read access. All you need to do is the following (if you have a subversion client installed):
$ svn checkout http://www.php-tools.net/svn/patTemplate/trunk patTemplateIf you want to checkout patForms or patBBCode instead of patTemplate, just replace the project name. To browse the subversion repository online, you may just enter the same URL in your browser.
For some of our more active projects, we also provide an installation of Trac which brings you a nicer web-svn-viewer (including pretty diffs), a bug-tracker, a roadmap and a wiki for the project. You can access our trac installations at trac.php-tools.net. The project, which is currently the most active is patForms, which you can see using the Trac timeline. We are nearing a first stable release, but this will be the topic of another post.
Tuesday, August 9. 2005
Today I made the first release of HTTP_Cache on 3rdPEARty.net, the channel server provided by Carsten Lucke. If you are already using HTTP_Cache, please change your installations and register the new channel-server:
$ pear channel-discover 3rdpearty.net
$ pear install 3p/HTTP_Cache
If you are already using HTTP_Cache, make sure to uninstall it beforehand to avoid conflicts:
$ pear uninstall pat/HTTP_Cache3rdPEARty.net is relatively new and will provide packages by several PEAR and PAT developers that are not available in the PEAR repository, more on this subject will probably follow soon by Carsten. I moved HTTP_Cache to this server, so that the PAT server will only provide packages prefixed with pat. Other packages available at 3rdPEARty are Util_Checksum, which is able to generate various checksums as well as a package that provides commonly used exceptions, called P3AR_Exception.
Monday, August 8. 2005
As I'm currently using Java a lot at work (90% of the time), I started porting some of the classes, that I use a lot to Java and make them available to the public under an open source license. Most of the time, you only read of projects ported from Java to PHP, but I think the PHP community offers a lot of projects which currently are not available in Java and a lot of Java developers can learn a lot from PHP.
The first two projects I ported are patConfiguration, which is now named XJConf and Event_Dispatcher (now called EventDispatcher). XJConf allows you to map any XML document to Java objects by defining rules for the mapping process. These rules allow you to call setter-methods and the constructor and define the classes used for the tags and attributes. It also is extendible using XML namespaces, I already implemented basic XInclude support. XJConf is a lot more powerful than the PHP version, but I plan to port the new features back to a PHP5-only version of patConfiguration.
EventDispatcher is a package that helps you build event-centered applications by dispatching the event-objects to the listeners that have been registered for the various objects. The package provides almost the same functionality as the PHP version, which has been developed by Bertrand Mansion and myself.
Documentation for both packages is available at my new website java.schst.net, which also provides a web-SVN viewer, ticketing system, a roadmap and many other features (powered by Trac). Currently there aren't any ready-to-use JAR files, but you can get them from SVN and build them using ant.
Sunday, July 17. 2005
As some of you may have noticed, our forum at http://forum.php-tools.net has been offline for the last two weeks. The cause has been that someone hacked our server and used it for file-sharing which caused a lot of traffic, which we have to pay for. As the hacker used a security hole in phpBB (which has been fixed in newer versions, but our installation wasn't up to date), which we used as a forum software, we decided to disable or forum until we had evaluated, whether to install a different software.
Since today, our forum is back online, but we switched from phpBB to FUDForum, as we experienced several problems with phpBB during the last year and FUDForum seems to be a lot more secure. Thanks to a lot of help from Ilia, I also was able to import all userdata and all postings from the old software so you can still login with the same username and read the old postings. A big "THANK YOU" for this from the pat team to Ilia, this has been the best support we experienced for an open-source product.
Saturday, June 25. 2005
 Just in time for the LinuxTag 2005 O'Reilly Germany released the "PHP5 Kochbuch". This is a new edition of the translation of the original PHP cookbook by Adam Trachtenberg and David Sklar.
For the new revision which now completely focusses on PHP5 I contributed four chapters: XML, Webservices, PEAR and "PHP on the commandline".
These chapters deal with all new features of PHP5 like the new DOM, XSL and SOAP extensions, but also with some features that will only be included in PHP 5.1 like xmlReader and xmlWriter and even the brand-new XML-RPCi extension in PECL. Through all my chapters I'm also making constant use of PEAR packages like Net_Server, XML_Serializer, XML_RPC or Services_Ebay. The PEAR chapter itself even deals with PEAR 1.4.0 and explains you how to set-up a channel server. If you read the book, I'm happy to receive any feedback on my work.
Monday, June 6. 2005
Although the Call-for-Papers for the International PHP Conference 2005 in Frankfurt has just been anounced I won't be submitting any sessions this year. But of course neither the conference nor the organizers are responsible (the conference has been great all the past years), but at the time the conference takes place, I'll be in my honeymoon on Hawaii after getting married in Las Vegas in the first week of November. I bet, this experience will sure beat another PHP conference, although I won't be able to meet all of the PHP folks I regularly meet there like Christian, Toby, Aaron as well as a whole bunch of PEAR-developers.
For the same reasons I did not propose any sessions for any of the upcoming conferences, I'll hopefully ba back, next year (At least, I do not plan to getting married again...)
Sunday, June 5. 2005
I just released HTTP_Cache 0.1.0 through our own PEAR-Channel at pear.php-tools.net. I proposed this package via PEPr some time ago, but because some of the functionality already is available in the packages HTTP_Header and HTTP_Download I never initiated the call for votes. But still I think this small package is quite useful when you need HTTP-Caching using ETag. As it supplies a handler for PHP's output buffering all you need to add to your scripts are two lines of code:
require_once 'HTTP/Cache.php';
$cache = &new HTTP_Cache(array('auto' => true));
echo "You now may send any data to the browser";
If a user now requests this page twice, it will be only sent to the browser once, unless the output has changed in the meantime.
If you are using PEAR 1.4 installing the package is nearly as easy as installing a package from PEAR:
$ pear channel-discover pear.php-tools.net
$ pear install pat/HTTP_Cache
The package will be get installed in the PEAR directory of you server and you can instantly start to use it.
Thursday, May 5. 2005
I just released the next alpha version of patForms, our form generation and validation package. This release contains some small bugfixes as well as a feature request from Helgi.
One of the coolest features of patForms is that you may embedd your form elements using XML tags directly in HTML files, like web controls in ASP.Net or Java Server Faces. patForms will then parse the HTML code and creates PHP objects from the embedded components that interact with the data the user submitted and automatically serializes them back at the end of the request. Other features are support for event-driven development and the subject/observer pattern to get rid of spaghetti code. Furthermore patForms provides custom filters and rules for the user input and is easily extendible.
Starting with this version, patForms is now also available through our PEAR channel, which makes the installation quite easy (if you have PEAR 1.4.0a11 or higher installed):
$ pear channel-discover pear.php-tools.net
$ pear install --alldeps pat/patForms
patForms also gets more and more acceptance in the community, currently there's work done on a patForms / Propel integration by Sven Fuchs and some other developers. This will allow you to build forms from Propel objects that automatically load and save data from and to the database. You can read more about these plans in the weblog of Sven. There's already some working code available and we expect a release of this quite soon.
Friday, April 22. 2005
This week, this latest issue of the PHP Magazine International Edition has been released. This issue contains the second part of my "Go OO!" series which deals with design patterns in PHP5. If you are interested in decorators, iterators or the delegation pattern, make sure to buy a copy. Sebastian also contributed his first article and shows you how patForms can be a timesaver when creating form-based user interfaces. And last but not least, Carsten Lucke (another pat-related developer and friend) showcases his PEAR package Date_Holidays. And of course there a a lot of other interesting topics covered.
Wednesday, April 6. 2005
Yesterday I released patTemplate 3.1.0a1, the first alpha version of the 3.1 branch of my templating engine. This release provides dozens of new features and although it's labelled alpha, it's nearly production quality. I'm currently using it in one of my projects, that servers 400.000 visitors a day.
patConfiguration 2.0.0b2 mainly contains some bugfixes and is supposed to be the last beta version before I'm going stable. If you are using any of these, please test the new versions and report any bugs you find.
If you are using PEAR 1.4.0 you can also get them from our channel server.
Monday, March 7. 2005
I just made a bugfix release of the patTemplate 3.0.x branch, which fixes some small notices and bugs that have been reported in the last few months. If you are using patTemplate 3.0.0 I recommend you to upgrade.
If you would like to test some of the new features I have added to patTemplate you may grab the latest snapshot of the 3.1.x series from snap.php-tools.net.
Sunday, March 6. 2005
I finally managed to release a first public beta of my configuration reader patConfiguration.
Starting with this release it is now driver-based which keeps the codebase small and at the same time allows you to read and write XML, INI and WDDX files using the same API. The XML-reader is the most powerful driver as it allows you to define how you would like the tags to be handled. This means you can define that the tag <foo one="1" bar="totmato"/> should automatically be converted to an array that should contain the attributes of the tag as values. Of course you can also choose which types to use for the attribute values, so they get converted to booleans, floats, integers, strings, arrays or objects.
To achieve this, patConfiguration provides a very easy-to-use built-in tag:
<!-- define a new namespace -->
<define ns="shop">
<!-- define a tag in the namespace -->
<define tag="articles" type="array"/>
<!-- Define a tag with no name (indexed array) -->
<define tag="article" name="_none" type="array">
<!-- define three attributes for this tag -->
<define attribute="vendor" type="string"/>
<define attribute="title" type="string"/>
<define attribute="price" type="float" default="99.99"/>
</define>
</define>
Now that you've defined, how patConfiguration should interpret the tags, you may use them in your configuration:
<shop:articles>
<shop:article title="Power battery" vendor="Green Lantern"/>
<shop:article title="Batarang" vendor="Batman" price="500"/>
</shop:articles>
Parsing this configuration is extremely easy:
<?php
$conf = new patConfiguration(
array(
'configDir' => './config'
)
);
// parse config file
$conf->loadConfig('example_define_basic.xml');
$config = $conf->getConfigValue('articles');
?>
If you worry about the overhead of parsing XML files on every request, you may want to switch-on the caching system which makes loading the configuration faster then reading it from PHP files. If you want to use your tag definitions in more than one file, just use external entities or xInclude tags, patConfiguration supports both, even in PHP4.
After reading this XML-document with patConfiguration, you'll get the following array structure back:
Array
(
[0] => Array
(
[vendor] => Green Lantern
[title] => Power battery
[price] => 99.99
)
[1] => Array
(
[vendor] => Batman
[title] => Batarang
[price] => 500
)
)
patConfiguration allows you to return the complete configuration or only parts of it, using a mixture of PHP's array snytax and a path to the desired value. If you'd like to see more features of patConfiguration in action, you may want to take a look at the online examples or download it from our site.
If you are using PEAR 1.4.0 you may also get it from our PEAR-channel:
$ pear channel-discover pear.php-tools.net
$ pear install --alldeps pat/patConfiguration
If you stumble upon a bug, please report it using our bugtracker.
|