PHP :: a programmer's best friend |
Friday, August 18. 2006PHP Design Patterns finished Today I received a message from O'Reilly, that my book PHP Design Patterns is now going to print and is scheduled to be released in September 2006. The work of the last six months is finally bearing fruit and I will be able to spend my spare time on coding again instead of just writing. If you wondered, why patTemplate or any of my other open source projects did not show any progress, this announcement should answer your questions.I put nearly all of my thoughts on software architecture, OO design and patterns into this book and thus it consists of 370 pages dealing with OO development in PHP 5.1, creational patterns, structural patterns, behavioural patterns as well as enterprise patterns and MVC architectures. Furthermore it covers SPL, Propel and patTemplate to provide some real-life examples of the patterns. If you intend to buy the book, you should be warned that it has been written completely in German. If you still are interested, you will find more information on the book as well as the code example on the website or you can already pre-order it from Amazon. Thanks go to gERD, luckec and Frank who supported me with their knowledge as well as Toby, who introduced me to O'Reilly. Thursday, August 17. 2006patForms Gettext Patch
Usually i18n and multi language support is not a big issue in web business. Even if web-sites seem to be global players, most of them get along with support for very few languages. patForms for example comes with support for English, French and German and therefore covers pretty much everything I ever wanted.
On the contrary non-French, non-English and non-Germans may blame patForms for lack of support for Danish, Swedish, Spanish, Russian etc. Rightly, I suppose. Unfortinately, the supported languages are within the form elements and rules. Hence it would mean to change a lot of files (classes) to simply add another languaga's messages. Knowing that we started to introduce support for extrernal translation tables - stored in ini-files. Another idea was to use the PHP Gettext extension which should be available on most servers. The two major advanteages of this method are: (1) You simply don't have to bother about NLS (native language support) while you write some geek patForm rules or element. (2) Gettext is widly spread and comes with a bunch of tools to extract translatable strings and maintain translation tables. This makes it fairly simple to add support for additional languages like Spanish, Danish and even Gungan. So far, patForms does not use Gettext. Still, I created a patch which works extremly well. I love to invite you to test this patch and and tell me what you think about patForms using Gettext. Please also tell me your opinon whether we should move to Gettext for the next release of patForms. Download: - Zip file: patForms-Gettext.zip 512 kByte - Tar Bz2 archive: patForms-Gettext.tar.bz2 188 kByte Checkout from our Subversion repository $ svn co http://www.php-tools.net/svn/patForms/branches/gettext/ Links: - PHP Gettext - GNU Gettext - Translation editor PO Edit, KBabel Monday, August 7. 2006Der Zauberlehrling - Sorcerer's ApprenticeRecently the German PHP Magazine published the August 2006 issue. The principal topic is AJAX and Web 2.0 technologies, including an article covering the PEAR package HTML_AJAX This article's target is (1st) to give a brief introduction to AJAX and how things work from Javascript an PHP side in contrary. Also (2nd) I wanted to show that you actually don't have to muck around with a mess of Javascript (browser compatibility issues and such) because it's it is all done by the Joshua Eichorn's HTML_AJAX framework. Unfortunately, four odd pages arn't enough to build up a complete application. Still, it tells you where to begin and how you can add Web 2.0 features to your site within minutes. Also there is one more crux: it's German only Sunday, August 6. 2006patTemplate 3.1.0a2 released
I just released patTemplate 3.1.0a2. This will be the last alpha version for 3.1.0 and I hope to release a stable version during the next 6-8 weeks. The major changes since 3.0.1a1 include:
Exploring PHP to be published soonThe article I contributed showcases how event-driven-development can be used to create component based, flexible applications that allow you to easily plug in new features without modifying the core application. The examples in the book use PEAR's Event_Dispatcher. Other articles cover unit testing with SimpleTest (by Frank), the generation of 3D images with PEAR's Image_3D (by Kore), migration to PHP 5 and refactoring (by Sandro) as well as news on PHP 6 (by Christian). The editor for the book is Markus Nix, he compiled all the articles. If you take a closer look at the cover, you might see that there are different names listed on the cover than those mentioned in the blog. This is because some of the original authors did not manage to deliver their articles in time and have been replaced. The planned release date for the book is 08/17/2006, so keep your eyes open. Thursday, June 15. 2006Reprogramming wheels
Clay Loveless recently posted a small rant [1] about loner applications, and that inspired me to write up a comment of sorts.
I think that the interoperability Clay wants requires out-of-the-box thinking, but sadly most of the programming world lives in tight boxes. To change that tide would require a lot of dedication and time, both of which I for one am not prepared to invest. It is really quite sad, but the time and effort I need to get the author(s) of any piece of software to become aware of the non-interoperability with software XY I prefer to invest in getting a solution done - especially since the answers are usually "works for me", "don't need software XY", "it's open source, fix it yourself", "nobody needs that except you", "no time, maybe this winter". I usually try contacting the authors in case I should get lucky, but tend to avoid those kinds of discussions as they lead nowhere. I think that one of the core reasons for the lack of interoperability is the reprogramming the wheel syndrome. I did that quite a few times myself, and while it may often be because the programmer feels he can do it better, I think there is more to it than just that. These are a few issues I can think of on the spot:
I am sure a psychiatrist specializing in modern software developers would be able to find quite a bunch more issues, but I am not sure I want to know about that in such detail after all. Expectations, Approaches This is one more issue that I feel compelled to write about, since it is the reason why I have reprogrammed the wheel a few times in the past, and actually still do: different approaches to a problem. As an example, have you ever wondered why there are really that many CMSs out there? Is it really because someone said "I can do it better"? That may very well be the case, but why did he/she think so? I think it is because that someone had a different idea of how a CMS should work, dismissing the other system because it did not match his expectations. Like the users using a software like a CMS will be more at ease with one or the other system, developers will be more at ease with one or the other library. PEAR's HTML_QuickForm [2] essentially does the same than patForms [3], but in a different way - why does one developer choose the one over the other? The choice is not always based on the featureset. I know that when I look at a library and it does not work the way I expect it to, I am easily tempted to find another (if possible) or think of writing one of my own. My friends and colleagues have largely succeeded in curing me of the syndrome, like by teaching me how to use wrappers to overcome the awkwardness of using an "alien" API. Now I usually only program a new wheel when there are not really any good libraries for the task at hand, or the library of choice has serious issues. Real life and productivity vs interoperability When I started my own business, I knew I would need an application that would help me build the websites for my customers, so I started looking around. There are many great frameworks and CMSs out there, and I took a good look at them. My decisionmaking was based on a few simple rules: The system had to
In everyday use, the goals were
I don't want to turn this post into a feature comparison, so I will skip that step. After reviewing several frameworks and CMSs, I realized that none would fit what I wanted. Only a custom solution would work, because for the rate of development I targeted I needed a tool that functions on a level I can comprehend. Inspired by patPortal, I planned and started the development of SimpleSite [4]. As a strictly solo project at first and due to the development timeline priorities, interoperability was the least of my worries. Even now, after about a year and a half of constant development it is still lacking in that regard. However, I have made sure that it is interoperability-ready: all the required interfaces and structures are built to allow swapping components as you see fit. I think that knowing how to prepare for interoperability and adding it to your application development plans is much more important than actually offering it, as it makes the job for other developers that much easier. I also know that it is not always that simple either however - in SimpleSite, the templating engine of choice is patTemplate. While you can use any template engine you like in your modules, the main structure is always handled by patTemplate, and there are related helper methods that only work with patTemplate. It is sometimes really a matter of weighing the development effort and related costs against the added value interoperability would add. Related links [1] Clay loveless' "Stop writing loner applications" post [2] PEAR HTML_QuickForm [3] patForms [4] The SimpleSite development portal Monday, June 5. 2006XML_Parser tutorial published
In January 2005 I wrote a tutorial on the PEAR package XML_Parser, that I maintain. This tutorial was supposed to be published in the PEAR section of Zend's developer zone, as they planned on sponsoring PEAR developers that were willing to write tutorials for their packages. Sadly enough this tutorial has never been published, although Zend promised me to do so and I also never received the promised discount on the Zend certification.
When cleaning up my hard disk yesterday, I stumbled across the tutorial and decided, that it would probably be better to publish it on my own website instead of waiting for Zend to finally put it online. So if you still are using PHP4 or prefer SAX-based parsing although PHP5 offers a decent DOM implementation, you can now find the XML_Parser tutorial on my website. Be warned: Although the tutorial itself has been written in English, the rest of the website is in German, so you might find the navigation a bit strange. But no need to worry, the this link will guide you directly to the tutorial. Thursday, May 11. 2006Nero goes PHP - join us!
Of course, Nero AG in Karlsbad (Germany) if famous for CD-burning software, which is far away from web technologies and PHP. Still, Nero applications grow together with the need of communication in the world wide web. Also there are plenty of traditional web projects as well as AJAX based PHP programming going on.
Still there are so many lines of code to write, so many ideas to implement and so many visions to think about that we can't handle it on our own. Therefore we need your expirience, your skilly, your brain and enthusiasm. We need your help! Have a look and apply for a job in our team, we are looking forward to meet you! German job offers at Nero AG: Job offers GERMAN Job description GERMAN English job offers at Nero AG: Job offers ENGLISH Monday, April 3. 2006Date_Holidays - New releases
The past weekend Stephan spent some time to fix all filed bugs for Date_Holidays. The result was the release of version 0.15.2. Meanwhile I finally managed to install all the tools on my new MacBook I needed for PHP development. Wasn't that easy because I had a hard time deciding what IDE I should use. Since my old Zend-Studio 3.5 couldn't be installed on the MacIntel and I was not willing to spent the money for the current version I switched over to PHPEclipse. I didn't yet try whether debugging and more advanced stuff works, but it's for free and keeping that in mind it's pretty good (IMO better than the Zend PHP-IDE, at the moment). The switch from ZendStudio to Eclipse wasn't a problem as I develop a lot of Java and like Eclipse very much - it's a great platform. Anyhow, as I coded a bit to test the features PHPEclipse offers I implemented a feature-request for Date_Holidays that allows to create drivers not only by a unique driver-id (until now this was the only way to create a driver):
$driver = Date_Holidays::factory('Germany');but also by using an ISO3166 country code: $driver = Date_Holidays::factoryISO3166('de'); as well as: $driver = Date_Holidays::factoryISO3166('deu'); I published this some minutes ago and the 0.16.0 release can be found at the PEAR package home. Tuesday, March 7. 2006patError documentation available
patError has been developed as we needed a simple tool to unify the error management in all our different projects such as patTemplate, patForms or patBBCode. Although we liked the error handling provided by PEAR, we did not want to use it, as we did not want to force our users to use PEAR in combination with our tools. Still, we adopted several concepts from the PEAR error handling, so most of the uses who already have been familiar with PEAR were able to use patError without the need to learn a lot of new concepts.
However, in the past months, more and more people asked us questions about patError and so I decided as was time to write some decent documentation on all the features. As Aaron announced that his upcoming talk at the next PHP Usergroup Frankfurt meeting would also include patError, I realized that it was now or never and wrote the full documentation for patError, which includes advanced topics like registering new error levels are replacing the error class with your own class. The documentation is available on our new Trac-powered site, which also provides SVN-access and a bug tracker. If you ever wanted to know more about patError, you will hopefully find all that you need on our new site. Wednesday, March 1. 2006patTemplate tag reference
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. Tuesday, February 28. 2006Regular expressions for dummies
If like me, regular expressions are constantly nagging at you because you just can't get the knack of them, you'll be happy to learn that I have finally found that software I have been waiting for all these years: RegexBuddy. Behind this mindbogglingly dull name hides a very nice visual regular expression editor, debugger, tester and optimizer. Regular expression nirvana!
I am a completely lost case regarding regexes, so I have purchased a copy - and I can honestly say that's the most well spent money I ever spent on software (with the exception of Photoshop, I think). The integrated regexp parser tree view shows you exactly what a regexp is made of, what it matches, where you could optimize it as well as correct common errors. It supports Perl-Compatible regexes as well as POSIX extended ones, has integrated PHP syntax highlighting... I'll stop here before anyone thinks I am affiliated with the creators of the software (but you were probably already thinking just that). As pictures tell more than words, I'll let these screenshots speak for themselves: The regex wizards out there will probably laugh at this, but I can highly recommend it if you want to learn regular expressions or simply to be able to make some of your own without external help Saturday, September 24. 2005Pearadise.net now lists pat-releases
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. Monday, August 15. 2005patForms v0.9.0b1 released
Yesterday we released the first beta of patForms, following our second alpha release. There has been a lot of activity around patForms lately, and most notably a new lead developer has joined the team: Sven Fuchs. Among other things he has added a complete layer that allows patForms propel integration, and has contributed new renderers.
Quick overview of changes:
With all the bugfixes and enhancements in this new version, the whole package has become a lot more stable and along with the new functionality has taken a step more towards making working with forms fun If you are using patForms in your projets, please upgrade and test the new version (please see the section on upgrading further down in this post for additional notes). If you do not know patForms yet, I think this is a good time to discover the projet. With the extensive and comprehensive examples collection, you can start working with it in a breeze! You can report any bugs or feature requests in our new Trac-powered project manager, where you can also find a documentation wiki. [1] Download via our PEAR channel server [2] Download via the traditional download page [3] Project manager (bugs, feature request, wiki) [4] Online examples collection Continue reading "patForms v0.9.0b1 released" Saturday, August 13. 2005patConfiguration 2.0.0 stable released
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).
« previous page
(Page 2 of 10, totaling 149 entries)
» next page
View as PDF: Category PHP | This month | Full blog |
Buy schst's booksCalendar
QuicksearchCategoriesOur latest releasespatError 1.2.0 (stable) Saturday, July 19. 2008 vfsStream 0.3.1 (alpha) Monday, February 18. 2008 vfsStream 0.3.0 (alpha) Wednesday, January 2. 2008 vfsStream 0.2.0 (alpha) Saturday, December 29. 2007 vfsStream 0.1.0 (alpha) Friday, December 14. 2007 pat resources3rdPEARty releasesUtil_AideAnalyzer 0.1.0 (alpha) Sunday, August 27. 2006 HTTP_Cache 0.2.0 (alpha) Tuesday, August 9. 2005 P3AR_Exception 0.6.0 (beta) Tuesday, July 19. 2005 Util_Checksum 0.1.0 (alpha) Saturday, June 11. 2005 Syndicate This BlogBlog AdministrationTechnorati |
||||||||||||||||||||||||||||||||||||||||||||||||||||