Entries by gERD :: a programmer's best friend |
Wednesday, February 25. 2009patTemplate bits and pieces
Well, the code base of patTemplate is pretty majure and new releases quite seldom. Still patTemplate is alive and in heavy use. Working with patTemplate in larger projects always includes writing custom extensions like variable modifier and template functions for it. Every now and then, modules for general use appear and I usually add them to patTemplate's code base. This way patTemplate grows little by little, even if it's core stays the same.
Here are some variable modifiers that were recently added: Calc (like a pocket calculator), Dateformat, Numberformat, Sizeformat (displays human readable file sizes) and Truncate (makes verbose text brief). This week Torben Egmose provided a template caching driver based on famous Memcache. Now there are five cache backend modules available: File, eAccelerator, Memcache, MMCache and XCache. As mentioned above, there are no major changes, but as usual, it those little bits and pieces that make life enjoyable. Saturday, July 14. 2007Conference-ish Autumn
Today Timo told me that his session proposal got approved! Yippie! We both applied for the AJAX in Action in Frankfurt November this year.
I submitted a session about some essential JavaScript tricks for modular sites that make extensive use of Web 2.0 technologies. I planed to focus on real live examples - stuff that we implemented at My Nero, in other words sneak into a big AJAX site's internals . Unfortunately it got rejected However I'm looking forward to see Timo's session about a flexible and easy to use AutoSave Framework. Adapting his thoughts, you can add the AutoSave feature to any form on a web-site easily. As I know some internals about his implementation, I can tell you that he solved some big issues. Though he focused on reusability and came out with a bunch of really nice lines of code. It's going to become a very interesting conference this autumn. Wednesday, June 20. 2007Testing FIT
I just uploaded the package Testing_FIT to PEAR. Testing_FIT is the PHP and pearish version of Ward Cunningham's FIT http://fit.c2.com/. As such it provides an easy to use framework for acceptance software tests.
pear install Testing_FIT-beta Simply install the PEAR package Testing_FIT browse the examples and write your own test classes. Of course, the PHP version of FIT provides the four basic fixtures: Action-, Column-, Row- and Primitve-Fixture. Also there is a Summary-Fixture that shows some statistics. You'll see, writing tests with this PEAR package is a piece of cake. Besides, the basic idea of FIT - using HTML documents providing test data will convince you. Monday, June 18. 2007I18n and such
In lack of a better idea, I founded a new PAT Package: patI18n. So far this package is just a draft and only exists in the SVN repository. As you might guess, patI18n is an abstraction layer for translating issues. Therefore it provides nearly the same interface as the famous GNU Gettext. Still, the actual translation is done by a chain of modules - this way everything is possible and the design stays open to new ideas.
Of course, I didn't start patI18n out of the blue. Last year, I branched patForms to use Gettext for translation instead of the proprietary internal solution. Since then, we have to maintain two branches of patForms. Yesterday I mended the implementation of patForms' gettext branch to use patI18n. This way patForms got rid of all I18n functions (like setLocle) and stuff. My first tests show that everything works fine - still this code is experimental. However you are invited to check out the new versions and give it a go. Download the sources from our subversion server: patI18n: svn co http://www.php-tools.net/svn/patI18n/trunk/ patI18n patForms: svn co http://www.php-tools.net/svn/patForms/branches/gettext/ patForms View the source code of patI18n at gERD's playground. Thursday, February 1. 2007patTemplate Documentation in Bahasa Indonesia
We are vary proud to hear that there are patTemplate enthusiasts around the world. Actually, we just learned thet there is a patTemplate Documentation in Bahasa Indonesia available. Thanks a lot for translation!
patTemplate Documentation in Bahasa Indonesia
We are vary proud to hear that there are patTemplate enthusiasts around the world. Actually, we just learned thet there is a patTemplate Documentation in Bahasa Indonesia available. Thanks a lot for translation!
Tuesday, October 17. 2006FIT for PHPFIT stands for Framework for Integrated Test (See: FIT Wiki) realices acceptance tests with heavy use of HTML documents. Those documents do not just contain the usual blah-blah but hard facts. The factsare actually stored in (HTML) tables. This is where FIT - respectively PHPFIT - comes in. The FIT knows which testing class must be executed for a particular table and which function to call to calculate the results of a specific cell and the framework makes it very easy for you to implement concrete test-classes. Also FIT simply handles HTML documents. As such they can be viewed a common browsers and even created with Word-a-like editors. Hence FIT goes far beyond what traditional unit testing offers (FIT is not meant to replace unit-tests) and may enrich your next project. Hopefully PHPFIT will be available as official PEAR package. Unfortunately I lost my password. So I was not capable to push the proposal any further 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 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 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. Tuesday, September 28. 2004New Project: patSession
After adding some documentation we added another project to the list of public releases: patSession.
patSession is an abstraction layer for handling storing values in sessions the object oriented way. The modular design of this utility allows to extend it with custom storage drivers. Currently the package includes the Native driver, which implements a storage container based on the build-in PHP-session features. Furthermore, patSession comes with heaps of features to make sessions secure. Visit the patSession pages for further reading and code examples. Of course, patSession is open-source and free for usage and download, as well. Thursday, July 29. 2004Brisbane Backpacker
Well, backpacker's live is hard! Sightseeing every day, getting up early for tourist tours, watching wales and dolphins, hanging around on beautiful beaches, walking through faszinating rain forests, visiting art galleries, going out at night and having weekend every day - that 's really hard work.
Therefore I'm looking for a job in Brisbane (QLD). So if you are in Brisbane and look for a system administrator or web developer, I will be glad hearing from you. Just send me an email and I'll call you for a chat. Friday, April 16. 2004A 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. Thursday, March 25. 2004Bugzillas greatest bug
A few hours ago I had some trouble logging into our bug-tracking system. Of course there was no real problem, I just forgot my passwort and I've never logged into it from this computer, so there was no password-manager to assist me. Even worse, I could not use the "I'm so stupid, I forgot my password, please email me a new one"-Button because my mailserver has hanged since the day before and my provider hasn't fixed the problem, yet.
So I decided to use my shell-account, open, run the mysql-client and search for the password in the database. Finding the database useb by bugzill was no problem, but there was no "user" table! I took another few minutes to ascertain: there where lots of tables, a "groups"-table, a "user_group_map" and so on. But no table named "user" or something similar. I could not believe, that bugzilla may work without a "user"-table, so I asked my friend to log into bugzilla. As I assumed, he could not log into bugzilla, too! My fears became true - somehow the user-table of bugzilla was removed. Maybe by an SQL-injection-attack from some bad guys, maybe by a terrible bug in bugzilla or maybe by one of the system's administrators who droped this table by accident. It took some time searching for a file containing the SQL-statements used during the installation of bugzilla that initializes the database-structure. Later we decoverd a table in the existing database. This table is called "profiles" and contains all the data we expected in the non-exiting table "user"! Logging in bugzilla was quit easy after changing my password stored this table. But my friends still seemed to be in trouble. He had not forgotten his password, but he also could not to log in. Once again, we updated his password in the database - without success. Finally we recognized, that he tried to access with his user-name and password instead of his email-address and password. Shortly after solving this problem, we realized once more: usually the bug is in front of the screen. |
php_network_getaddresses: getaddrinfo failed: Name or service not knownphp_network_getaddresses: getaddrinfo failed: Name or service not known |