Archive for the 'PHP' Category
Blogwalk => blogg:anser.se
Friday, May 26th, 2006I was surfing the swedish internet when I noticed that a blog service, Blogwalk, had been suspended by the owner and that he had released the source under GPL. I decided to try to run the service.
UPDATE: released, see blogg:anser. However, the service is by no means stable yet. Christian writes about blogwalk here.
A lot of confusion was caused by the fact that he had hard-coded the paths for all files into the code. This caused a lot of trouble, as well as the fact that there was a quite smart caching algo and that the server returned “not modified” headers, which I didn’t realise until it nearly drove me mad! But generally speaking, I must say that the code is very well-written and easy to understan. Thanks Christian!
PEAR HTML_QuickForm
Monday, May 15th, 2006HTML_QuickForm - this is the package I’ve been looking for for the latest week :) It automates form management in PHP in a very nice manner. I’ve already tested a couple of third-party classes and they either contain bugs (and the project I intend to use it in is critical) or they don’t have the functions I need. I will test it (in particular, I was looking for such a package since I have a big project going on with lots of forms) and update this post with some experiences.
UPDATE: so, here comes some input.
QuickForm is easy to use and has all the functions I expected it to have. One possible bug/problem I found was that you can’t set the default value for a <select> using SetDefaults(…). Neither using indexes or the actual values works :( Other than that, everything is great: forms are constructed with a few lines of PHP, new validation rules are easy to add (one small disappointment was that it is impossible to provide a custom error message from within a validation rule), the form can be “frozen” and shown to the user. Another important thing is that the documentation is reasonably good for such a project (I never had to look at the source code, just dig deeeeep into the help file sometimes :) ).
I like the PEAR packages. Now that I’m pretty sure they work I think it’s worth to take the time to examine some of them. Particularly, these look nice to me: a progress bar, AJAX library (you can’t have enough of them! ;) )