Dec 17, 2007 -
Back from the weekend in Dublin it’s time to write an update on my nightly coding sessions on P4A 3.
Well, a bunch of things were already done, porting to Zend Framework seems to be easier than what I expected, I’m working hard (you know time is always low) and I still have many many things to do but things start working and this is really exciting.
Here you have a changelog of what I did in the past weeks:
- Zend Framework 1.0.3 was added
- Database connection now relies on Zend_DB PDO adapters
- check_configuration.php was ported to Zend_DB to check the database connection
- P4A_DB_Source was ported to Zend_DB (not completely done and tested, check the TODO list)
- P4A_DB_Source::setFields() syntax was changed, now you must provide only fields from the main table and not from joines ones
- P4A_DB_Source::addJoin() syntax was changed, join type param was dropped and now you have a third param to pass the columns you want to extract from the joined table (default extracts all columns)
- P4A_DB_Source now has many methods to add joins: addJoinCross(), addJoinFull(), addJoinInner(), addJoinLeft(), addJoinNatural(), addJoinRight()
- P4A_I18N does not manage charset anymore, only UTF-8 will be supported from now on
- P4A_I18N numbers format/normalization now relies on Zend_Locale
- P4A_I18N dates format/normalization now relies on Zend_Date and Zend_Locale
- P4A_I18N::getCountry() was renamed to getRegion()
- P4A_I18N::autoFormat() was renamed to format()
- P4A_I18N::autoUnFormat() was renamed to format()
- P4A_Number format/normalization class was removed
- P4A_Date format/normalization class was removed
- all P4A i18n format definition files were removed
- translation messages files were reorganized and renamed
- days and months translations were removed from translation messages files (now they’re provided by Zend_Locale)
- yes/no translations were removed from translation messages files (now they’re provided by Zend_Locale)
- boolean normalization works much better now (eg for italian language: it detects “sì” or “si” or “s” without case difference and the same engine works for every language)
and a TODO list of what I need to keep in my mind:
- “time” format/normalize
- “currency” format/normalize
- move translations to Zend_Translate (in progress)
- check db_source with multivalues
- check db_source for aliases
- make ui.datepicker.js work with our date format definitions
- rename constructors to __construct
Many of you would like to know what we’ll do with the graphic layer… actually we’ve decided to stop experiments on extjs and other javascript frameworks, they’ve been too time-consuming and we found bugs and limitations thus, at the moment, we’re keeping the old rendering layer. Being real, I think that P4A 3 will still generate the HTML markup but we’ll rewrite the CSS from scratch without relying on javascript frameworks that seem to not fit our needs.
Stay tuned! ;-)
Filed in: CreaLabs, P4A, PHP, Things I do
Dec 6, 2007 -
Changelog:
- Major bugfix on P4A_DB_Source::saveRow(), the patch from Edr (introduced in 2.2.0) was removed and a few checks were added to prevent inconsistency
- some little bugs on P4A_DB_Source were fixed
Download P4A 2.2.2
Filed in: CreaLabs, P4A, PHP, Things I do
Dec 5, 2007 -
This post will not be easy to write… I’ll try to explain you what kept us really busy in the past 2 weeks. ok a screenshot could help me :-)

In the P4A 3 roadmap post, I told you about a new widget rendering system… I didn’t post more technical info intentionally, I wanted to create a bit of suspense :) but I also wanted to do some tests before publishing news.
For P4A 3 we’d like to have a killer graphic with killer features (resizable widgets, border layouts, beautiful and powerful menu and so on) thus we looked to the biggest javascript frameworks out there: extjs and dojo. Both have great features and both have issues.
Extjs as really a killer graphic layout, and it’s released under LGPL3 (developers wrote some licensing notes that I can’t really understand… actually I think that those notes could conflict with LGPL3 itself) but it has not an open SVN and development is quite closed. Another note: only community support is for free.
Dojo is more polite with licensing and it’s released under BSD, but I don’t like the graphic layout too much and the way you’ve to code your applications writing a non-standard HTML with dojo-only attributes. It has some accessibility features.
Some considerations:
- In my tests I found bugs in both frameworks
- porting P4A to one of these tools is a “1 way road”
- relying the rendering layer to a 3rd party project means we’ve to 1000% trust this project
- these tools do not have a good print CSS support
We would have a 3rd option: continue on our road with quite standard HTML but rewrite our CSS from scratch with a CSS reset and a modular design which will give us better control.
I wrote extjs developers to know if they’re interested in a collaboration with P4A, I’m waiting for an answer but I’m looking for your considerations too, community it’s important to me, please let me know what you think and what are your experiences with those tools (or suggest others).
Filed in: CreaLabs, Javascript, P4A, PHP, Things I do
Tags: CreaLabs, dojo, Extjs, Javascript, Programming languages
Dec 1, 2007 -
Changelog:
- multicheckbox field and multiselect field now support saving in single table field
- P4A_Field::setMultivalueSeparator method was added
- a bug with images on p4a_table wal solved
- rich_textarea “Full” theme was added
- jQuery::form was updated to 2.01
- a bug with empty “file” fields submitted with an ajax call was solved
Download P4A 2.2.1 here
Filed in: CreaLabs, P4A, PHP, Things I do
Nov 22, 2007 -
ok here you have:
- brand new widget rendering system, it will provide a new experience from the users point of view, a richer set of widgets and the best browser support (we’re doing deep tests right now, more info will follow)
- PHP5 only
- add Zend Framework
- replace adodb with Zend_DB
- define which database engine will be supported (I think MySQL, PostgreSQL, Oracle, SQLite) and drop support for all the others
- solve definitively all the problems with all supported databases
- replace our date parsing/formatting library with Zend_Date
- drop all localization formats and use Zend_Locale’s (which uses unicode.org formats)
- replace our numbers/currency formatting library with Zend_Locale
- replace our translation library with Zend_Translate
- make every output string to be translated and make the translation system work the way gettext work (making possible to include partial translations)
- create a tiny php5 optimized library to replace phpThumb
- completely remove PEAR
Yes, it will be a huge, massive and killer release, I promise it will rock!
Filed in: CreaLabs, P4A, PHP, Things I do
Nov 19, 2007 -
This is the month of the big releases :-) first was UCK 2.0 a few days ago, now it’s time for P4A - PHP For Applications 2.2!

Highlights of this release:
- Prototype/scriptaculous were dropped and jQuery was added. Thanks to jQuery and some wonderful plugins we added a new color picker field type, the ajax file upload feature, some great improvements to the popup system also with the ability to block the underlying interface and a beautiful audio/video preview system.
- Answering to many request the tooltip system was implemented, $field->setTooltip() and you’ve done the work of providing information about fields on your mask.
- Another requested feature: field autocomplete, similar to the google suggest one, enjoy it
- A smooth “helpers system” was introduced, now everyone can really write plugins for P4A, overriding core mothods without having to patch framework’s file (this only works with PHP5)
- The getid3 library was added, its work is to read all data from multimedia files and pass them to P4A that will use them and store them. Now we have a better width/height/mime-type detection for many and many multimedia file formats.
- …and many many improvements and bugfixes, check the changelog for the complete list
Upgrade:
You should have no problems directly upgrading from 2.0.6 to 2.2.0, otherwise write us on the help forum!
Download:
Can’t you wait? Here you have:
P4A 2.2.0 download
Future:
You already know that we can’t stop, things are already moving… we’ll publish more info very soon, also because I’m going to commit some preliminary tests for the next big step: P4A 3.0. Don’t miss it, I swear you’ll like it.
Technical note:
If you use P4A SVN, please switch to the 2.2 branch and don’t use the main trunk anymore!!! That’s because we’re working on it for P4A 3.0!
see you :)
Filed in: CreaLabs, P4A, PHP, Things I do, jQuery
Oct 15, 2007 -
Zend Framework has a quite impressive Zend_Date and Zend_Locale modules which finally do things we needed 4 years ago with MerlinWork and then P4A, like normalizing localized dates and parsing the Unicode’s Common Locale Data Repository but I think we still need a good calendar module that would do the things that Pear::Calendar does now. I’ll post an issue to Zend ASAP.
Filed in: PHP
Tags: PHP, Programming languages, Zend Framework
Sep 20, 2007 -
PDT is the new PHP development plugin for Eclipse, officially recognized and supported by Eclipse.org.
PDT 1.0 is out today and I’m upgrading right now, I just found a cool new feature I want to share with you all, look at the screenshot (I was committing a small file), focus on the red zone and look at the way DIFF is shown:

Can you see that within the same line, changed chars are highlighted? Cool hu? Now everyone can really find the differenced within the same line, not just the whole line! I really like that :)
Filed in: PHP
Tags: Eclipse, Zend
Aug 6, 2007 -
htmlentities, htmlspecialchars and html_entity_decode have 3 parameters:
- string to be converted
- quote_style
- charset
but charset default is ISO-8859-1 and there’s no way to change that default, what happens if you’re porting 1,000,000 lines of code from ISO-8859-1 to UTF-8? you’ve to wrap those functions or patch every call passing all the 3 params. All these 2 solutions are bad solutions.
PHP should implement a customizable default, maybe also reading mbstring.internal_encoding if available.
Filed in: PHP
Aug 3, 2007 -
In the latest days I took a deep breath and went on finishing some pending tasks on P4A devel snapshot, they were waiting since too long… I was thinking about releasing the 2.1.4 as 2.2.0 but… better wait till the end of summer.
The main part of the work was finishing porting the P4A_DB_Navigator drag&drop to jQuery, finally this task is over and it seems to work the right way.
In this release you’ll find the color picker field type and some libraries updates.
Here you have the changelog:
- P4A_Field::setType(’color’) was added with nice color picker plugin (fabrtastic) from jQuery
- a bug with file upload error trapping was solved
- FCKEditor was updated to 2.4.3
- jQuery was updated to 1.1.3.1
- jqModal was updated to 2007.07.30 +r10
- P4A_DB_Navigator drag&drop functionalities were implemented thru jQuery
and the download link:
http://tinyurl.com/2ruu76
Filed in: CreaLabs, P4A, PHP, Things I do